Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 493666

Summary: [win32][HiDPI][IE] Images in Browser widget not scaled
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: SWTAssignee: Niraj Modi <niraj.modi>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, niraj.modi, peter, sravankumarl
Version: 4.6Flags: sravankumarl: review+
Target Milestone: 4.6.1   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/75943
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=539a6153646fdff2ffa011732f02d2ed7a11a108
Whiteboard:
Bug Depends on:    
Bug Blocks: 495269    
Attachments:
Description Flags
Test.html
none
Screenshot none

Description Markus Keller CLA 2016-05-13 11:41:52 EDT
Created attachment 261728 [details]
Test.html

4.6.0.I20160512-1000, Windows 7 @ 200%, IE 11

In Javadoc hovers and the Javadoc view, the element image is rendered too small.

The problem can also be reproduced with a simple and completely valid HTML file in Snippet148 using this setUrl(..) invocation:

    browser.setUrl(Snippet148.class.getResource("Test.html").toString());

Save the attached Test.html in the org.eclipse.swt.snippets package.

Note that the IE 11 application and other browsers correctly resize the image when you open the Test.html file. Only the embedded SWT browser widget has this problem (in standalone snippets as well as in the Internal Browser view in Eclipse). It's strange that the embedded browser widget does scale fonts but not not images.
Comment 1 Markus Keller CLA 2016-05-13 11:42:24 EDT
Created attachment 261729 [details]
Screenshot
Comment 2 Markus Keller CLA 2016-05-13 12:20:09 EDT
This is also a problem in the Eclipse Help system when using the internal browser. Help looks fine in normal browsers (Firefox, Chrome). In IE 11 (embedded and external), there's also a font-scaling issue, see bug 493667.
Comment 3 Niraj Modi CLA 2016-06-24 04:40:07 EDT
Targeting for 4.6.1
Comment 4 Niraj Modi CLA 2016-06-24 05:46:56 EDT
There is option available to make the embedded IE DPI aware on high DPI monitor, see below MSDN article which specifically talks about this:
https://msdn.microsoft.com/en-us/library/cc849094%28v=vs.85%29.aspx#OptInHighDPI

Am working on a fix based on this approach, will share a patch shortly.
Comment 5 Eclipse Genie CLA 2016-06-24 12:27:55 EDT
New Gerrit change created: https://git.eclipse.org/r/75943
Comment 6 Niraj Modi CLA 2016-06-27 12:39:01 EDT
(In reply to Eclipse Genie from comment #5)
> New Gerrit change created: https://git.eclipse.org/r/75943

With this patch embedded IE behaves as stand-alone IE on HighDPI settings, tried below scenarios:
- HTML in attachment 261728 [details]
- Welcome page contents
- Images in Javadoc hovers
Comment 8 Niraj Modi CLA 2016-07-13 03:10:16 EDT
Hi Sravan, For your review to back-port this bug to 4.6.1
Comment 9 Sravan Kumar Lakkimsetti CLA 2016-07-19 05:11:01 EDT
(In reply to Niraj Modi from comment #8)
> Hi Sravan, For your review to back-port this bug to 4.6.1

+1 for 4.6.1
Comment 10 Niraj Modi CLA 2016-07-19 10:23:12 EDT
Resolving now, fix back-ported to 4.6.1 branch via below git commit:
http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?h=R4_6_maintenance&id=6716e0c4a4b83f3d9493d470816c37746c51d883
Comment 11 Niraj Modi CLA 2016-07-28 02:49:41 EDT
Verified fix in M-Build: M20160727-1700 on Win7.
Comment 12 Niraj Modi CLA 2016-08-02 05:38:17 EDT
Verified fix in 4.7 I-Build: I20160801-2000 on Win7.