Hi Semyon,

 

Did you try it in Windows or Linux? I have tested it on Mac, and found that it 
fails before the fix and passes after the fix.

 

Thanks,

Krishna

 

From: Semyon Sadetsky 
Sent: Monday, March 5, 2018 10:01 PM
To: Krishna Addepalli <krishna.addepa...@oracle.com>; Prasanta Sadhukhan 
<prasanta.sadhuk...@oracle.com>; swing-dev@openjdk.java.net
Subject: Re: <Swing Dev> [11][JDK-8195095]Images are not scaled correctly in 
JEditorPane

 

Hi Krishna,

I tried your test before the fix and it passed.

--Semyon

 

On 03/03/2018 12:07 AM, Krishna Addepalli wrote:

Hi Prasanta,

 

Thanks for the quick review. I have updated the testcase with your suggestion. 
Here it is: HYPERLINK 
"http://cr.openjdk.java.net/%7Ekaddepalli/8195095/webrev01"http://cr.openjdk.java.net/~kaddepalli/8195095/webrev01

 

Krishna

 

From: Prasanta Sadhukhan 
Sent: Saturday, March 3, 2018 1:06 PM
To: Krishna Addepalli HYPERLINK 
"mailto:krishna.addepa...@oracle.com";<krishna.addepa...@oracle.com>; HYPERLINK 
"mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net
Subject: Re: <Swing Dev> [11][JDK-8195095]Images are not scaled correctly in 
JEditorPane

 

looks good to me. 

Only thing, in test, JFrame creation also needs to be in EDT.

Regards
Prasanta

On 3/3/2018 12:40 PM, Krishna Addepalli wrote:

Hi All,

 

Please review a fix for JDK-8195095: 
https://bugs.openjdk.java.net/browse/JDK-8195095

 

Webrev: HYPERLINK 
"http://cr.openjdk.java.net/%7Ekaddepalli/8195095/webrev00"http://cr.openjdk.java.net/~kaddepalli/8195095/webrev00

 

Problem: When a text html is specified with an image, omitting either the 
height/width parameter, JEditorPane scales it to default value of the missing 
parameter, whereas it should fetch the actual value from the image.

 

Fix: The problem is in ImageView.java. In the imageUpdate function, in the 
resizing logic the "changed" flag is set to 1 if height is present, and to 2 if 
width is present. But while updating the width, the check is swapped, i.e width 
is set if flag is 1 and vice versa.

 

PS: The webrev contains a new "circle.png" file, so when you import the patch, 
you may need to manually copy the file, since "hg import" doesnot automatically 
import the .png files from the patch file.

 

Thanks

Krishna

 

 

Reply via email to