JDK-8208638 : Instead of circle rendered in appl window, but ellipse is produced JEditor Pane
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
This is a customer bug, which was reported for jdk8u, which has been fixed in 12. The fix addresses the image scaling as per the earlier comment, and it has been verified in 12 and in jdk8u locally. Fortunately, for 11u, the same webrev as for 12 can be applied without any changes : http://cr.openjdk.java.net/~kaddepalli/8208638/webrev02/
The code has been reviewed by Prasanta.email@example.com and Sergey.Bylokhov@oracle.com
The way image scaling is handled is as follows:
1. If both width and height are specified in html, then use them instead.
2. If both are not specified, then use the image dimensions.
3. If either one is specified, then proportionately adjust the other dimension to preserve the aspect ratio of the image.
The problem is present because of the fact of wrong assumption in the fix. There was no clear indication of how unspecified attribute (height/width) should be handled. Atleast, it was not easily visible on the net to me. The image used in the original fix, which was a circle inscribed in a square, didnot bring out the assumption correctly. The image provided by the customer which is 100x200, with a 50x50 circle rendered in the middle brings out this problem.