<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:"Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"\@Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
{font-family:"Times New Roman \,serif";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:black;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.changed
{mso-style-name:changed;}
span.new
{mso-style-name:new;}
span.EmailStyle23
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle24
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle25
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle26
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Thanks for the review Prasanta.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>I need one more review to push this regression.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Thanks, <br>Krishna<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='color:windowtext'>From:</span></b><span style='color:windowtext'> Prasanta Sadhukhan <br><b>Sent:</b> Wednesday, July 11, 2018 10:28 AM<br><b>To:</b> Krishna Addepalli <krishna.addepalli@oracle.com>; swing-dev@openjdk.java.net<br><b>Subject:</b> Re: <Swing Dev> [11] RFR: JDK-8206238: Aspect ratio is not maintained when image is scaled in JEditorPane<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p>+1<span style='font-size:12.0pt'><o:p></o:p></span></p><p class=MsoNormal>Regards<br>Prasanta<o:p></o:p></p><div><p class=MsoNormal>On 7/10/2018 6:59 PM, Krishna Addepalli wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='color:#1F497D'>Sorry my bad. Here is the new webrev: </span><a href="http://cr.openjdk.java.net/%7Ekaddepalli/8206238/webrev02/">http://cr.openjdk.java.net/~kaddepalli/8206238/webrev02/</a><o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal>Krishna<o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='color:windowtext'>From:</span></b><span style='color:windowtext'> Prasanta Sadhukhan <br><b>Sent:</b> Tuesday, July 10, 2018 6:03 PM<br><b>To:</b> Krishna Addepalli <a href="mailto:krishna.addepalli@oracle.com"><krishna.addepalli@oracle.com></a>; <a href="mailto:swing-dev@openjdk.java.net">swing-dev@openjdk.java.net</a><br><b>Subject:</b> Re: <Swing Dev> [11] RFR: JDK-8206238: Aspect ratio is not maintained when image is scaled in JEditorPane</span><o:p></o:p></p></div></div><p class=MsoNormal> <o:p></o:p></p><p>Ok. Thanks for the clarification. Btw, there is another reversal as I mentioned earlier<o:p></o:p></p><pre><span class=changed>158 System.out.println("Test with only height set to 100");</span><o:p></o:p></pre><pre><span class=changed> 159 test(r, editorPanes[4], 100, 100);</span><o:p></o:p></pre><pre><span class=changed> 160 </span><o:p></o:p></pre><pre><span class=changed> 161 System.out.println("Test with only width set to 100");</span><o:p></o:p></pre><pre><span class=changed> 162 test(r, editorPanes[5], 100, 100);</span><o:p></o:p></pre><pre><span class=changed> </span><o:p></o:p></pre><pre><span class=changed>as editorPane[4] tests width 100</span><o:p></o:p></pre><pre><span class=new>121 editorPanes[4] = new JEditorPane("text/html",</span><o:p></o:p></pre><pre><span class=new> 122 "<img width=\"100\" src =\"</span><o:p></o:p></pre><p class=MsoNormal><br>Regards<br>Prasanta<o:p></o:p></p><div><p class=MsoNormal>On 7/10/2018 5:54 PM, Krishna Addepalli wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='color:#1F497D'>Hi Prasanta,</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>Thanks for your review. Here is the updated webrev: </span><a href="http://cr.openjdk.java.net/%7Ekaddepalli/8206238/webrev01/">http://cr.openjdk.java.net/~kaddepalli/8206238/webrev01/</a><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>So, the actual width and height of the image is 200, but the bug is that when any other value (only height or width) is specified, then the image should be scaled to that size(both width and height).</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>The test tests the same with different values like 100, 50 and 300 apart from the original image size of 200.</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>Hope this clarifies.</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>Thanks,</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>Krishna</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='color:windowtext'>From:</span></b><span style='color:windowtext'> Prasanta Sadhukhan <br><b>Sent:</b> Tuesday, July 10, 2018 3:48 PM<br><b>To:</b> Krishna Addepalli <a href="mailto:krishna.addepalli@oracle.com"><krishna.addepalli@oracle.com></a>; <a href="mailto:swing-dev@openjdk.java.net">swing-dev@openjdk.java.net</a><br><b>Subject:</b> Re: <Swing Dev> [11] RFR: JDK-8206238: Aspect ratio is not maintained when image is scaled in JEditorPane</span><o:p></o:p></p></div></div><p class=MsoNormal> <o:p></o:p></p><pre>Fix looks good to me. For test,<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>152 System.out.println("Test with none of them set");<o:p></o:p></pre><pre><span class=changed> 153 test(r, editorPanes[2], 200, 200);</span><o:p></o:p></pre><pre> 154 <o:p></o:p></pre><pre> 155 System.out.println("Test with both of them set to 200");<o:p></o:p></pre><pre><span class=changed> 156 test(r, editorPanes[3], 200, 200);</span><o:p></o:p></pre><p class=MsoNormal>should be reversed as you do<o:p></o:p></p><pre><span class=changed>115 editorPanes[2] = new JEditorPane("text/html",</span><o:p></o:p></pre><pre> 116 "<img width=\"200\" height=\"200\" src=\<a href="file:///">"file:///"</a> + ABSOLUTE_FILE_PATH + "\"");<o:p></o:p></pre><pre> 117 <o:p></o:p></pre><pre><span class=changed> 118 editorPanes[3] = new JEditorPane("text/html",</span><o:p></o:p></pre><pre> 119 "<img src=\<a href="file:///">"file:///"</a> + ABSOLUTE_FILE_PATH + "\"");<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>Same for 158, 161.<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>Also, what is the need for<o:p></o:p></pre><pre><span class=changed>158 System.out.println("Test with only height set to 100");</span><o:p></o:p></pre><pre><span class=changed>when you already have a test for height only</span><o:p></o:p></pre><pre><span class=changed>146 System.out.println("Test with only height set to 200");</span><o:p></o:p></pre><pre><span class=changed> </span><o:p></o:p></pre><pre><span class=changed>SImilar for width.</span><o:p></o:p></pre><div><p class=MsoNormal>Regards<br>Prasanta<br>On 7/10/2018 3:15 PM, Krishna Addepalli wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>Hi All,<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Please review a fix for the bug JDK-8206238: <a href="https://bugs.openjdk.java.net/browse/JDK-8206238">https://bugs.openjdk.java.net/browse/JDK-8206238</a><o:p></o:p></p><p class=MsoNormal>Webrev: <a href="http://cr.openjdk.java.net/%7Ekaddepalli/8206238/webrev00/">http://cr.openjdk.java.net/~kaddepalli/8206238/webrev00/</a><o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>The problem is that, when any one of the attributes for the image (height/width), are specified, it should copy the value to the other attribute. Currently, it only updates the respective attribute, and fills the other attribute with the size of the image.<o:p></o:p></p><p class=MsoNormal>Fixed this problem in the proposed patch.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal>Krishna<o:p></o:p></p></blockquote><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif'> </span><o:p></o:p></p></blockquote><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman \,serif"'> </span><o:p></o:p></p></blockquote><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif'><o:p> </o:p></span></p></div></body></html>