<Swing Dev> [14] RFR JDK-8230235 - Rendering HTML with empty img attribute and documentBaseKey cause Exception

Alexey Ivanov alexey.ivanov at oracle.com
Mon Nov 25 10:26:50 UTC 2019


+1

On 23/11/2019 00:03, Sergey Bylokhov wrote:
> Looks fine.
>
> On 11/21/19 3:00 am, Pankaj Bansal wrote:
>> Hi Sergey,
>>
>> << Is it fine that we pass "-1" to the "adjustWidthHeight"? I am not 
>> sure that it is ready for the negative values(where it calculates 
>> proportions). Note that prepareImage() expects only positive or "-1".
>> <<Should not we update the "WIDTH_FLAG | HEIGHT_FLAG" only if the 
>> newHeight/newWidth are positive?
>>
>> In the adjustWidthHeight function, looks like the value expected is 
>> >0. It is calculating the proportions and also dividing by the passed 
>> value. So, the value should be >0. Also,  it makes sense to update 
>> the newState with (WIDTH_FLAG | HEIGHT_FLAG) only when the values are 
>> positive as the prepareImage is called with proper values depending 
>> upon whether newState has flags set or not.
>>
>> I have also made the formatting changes Alexey had asked for.
>>
>> Webrev: http://cr.openjdk.java.net/~pbansal/8230235/webrev04/
>>
>>
>> Regards,
>> Pankaj
>>
-- 
Regards,
Alexey


More information about the swing-dev mailing list