[webkit] [9] Review request for 8160260: WebView cannot render CSS background image with SVG data

Arunprasad Rajkumar arunprasad.rajkumar at oracle.com
Mon Jul 4 13:44:22 UTC 2016

Hello Alexander Z, Chien, Guru

Please review the following fix.

JIRA: https://bugs.openjdk.java.net/browse/JDK-8160260

Webrev: http://cr.openjdk.java.net/~arajkumar/8160260/webrev.00

Issue: SVG images are not shown when rendering initiated in the context 
of <img> or CSS background property.

Analysis: After r179335[1], WebKit started using 
GraphicsContext::clipBounds from SVGImage::draw to eliminated 
unnecessary rendering. Our JavaFX port doesn't implement 
GraphicsContext::clipBounds and returns empty bounds which is (0,0 0x0). 
Due to empty bounds, SVG image drawing is skipped. In order to implement 
GraphicsContext::clipBounds, we need to get clip information from 
WCPrismGraphicsContext object, but is not accessible from WebCore.

Solution: Added a shadow variable in GraphicsContextState to maintain 
current clip information, it will be updated on each call to platform 
clip API.

[1] http://trac.webkit.org/changeset/179335


More information about the openjfx-dev mailing list