Dear Vadim / Kevin, 

 

Please review the fix merged from Chromium webkit to our(JFXwebkit) branch 
which address the defect logged for JDK-8090035. 

 

Tested on Linux(32 and 64 bit) with a test application (attached in JIRA) 

 

Origin of the fix taken from  
https://code.google.com/p/chromium/issues/detail?id=349873 

 

Courtesy : fixed by HYPERLINK 
"mailto:schen...@chromium.org"schen...@chromium.org in chromium and the 
comments 

 

Improve the reliability and accuracy of SVG getTotalLength

 

The existing code for SVG path.getTotalLength had two problems when

subdividing curves to estimate length. The subdivision terminated when

the straight-line vs curved length was within a fixed limit, regardless

of the scale of the curve. The termination condition for infinite loops

also failed to stop on infinite loops.

 

This patch fixes both issues. The subdivision threshold now accounts for

the magnitude of the values, so that we give more resolution on very small

curves and less on very large curves. This is consistent with the actual

precision we have in floating point numbers. The infinite loop termination

tracks and examines the total number of subdivisions thus far, terminating

after 20 (which is more than enough - most curves do no more than 10

subdivisions).

 

We also remove two unused variables and a FIXME that makes little sense and 
that we won't ever fix.

 

Thanks, 

Guru

Reply via email to