The following tests imported from the W3C CSS Shapes test suite are failing because they use the sandbag JS utility code to estimate the text flow around the shape. The expected results generated by the code isn't matching the actual, so we should first look at the utility code to make sure it's current. LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001.html LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-002.html LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-003.html LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-004.html If it turns out that the util code needs to be updated, the change must first be updated in the W3C repo and re-imported.
I don't think this is a fault of the JS utility code. I replaced the JS code in the expected file with a circle() shape outside (in the 001 test), and the JS code and the circle() both give the same shape that is different from the shape created by the gradient. Examining the shape drawn by the inspector for both the gradient shape case and the circle shape case, it looks to me like the gradient creates a shape, that while circular, has a much rougher contour, so there are places where it is farther our and places where it is closer in than the clean circle. It may make the most sense to use math like in the JS utility to figure out where the text should be positioned in the ideal case, and then have a delta that it can vary and just check that the text is positioned within that delta. (Making it a testharness test instead of a ref test.)
Created attachment 241191 [details] Patch
Created attachment 241193 [details] Patch
Comment on attachment 241193 [details] Patch r=me
Comment on attachment 241193 [details] Patch Clearing flags on attachment: 241193 Committed r175755: <http://trac.webkit.org/changeset/175755>
All reviewed patches have been landed. Closing bug.