JDK-8160260 : WebView cannot render CSS background image with SVG data
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: 8u112,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2016-06-24
  • Updated: 2020-01-31
  • Resolved: 2016-07-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u112Fixed 9Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
Web View cannot render CSS background image with SVG data like:
background-image: url('data:image/svg+xml;charset=utf8, ...') is not rendered
Comments
changeset: c2547d1f25e8 user: arajkumar date: Wed Jul 06 08:48:30 2016 +0100 Reviewed-by: ghb, azvegint, mbilla URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/c2547d1f25e8
06-07-2016

+1
05-07-2016

Looks good to me.
05-07-2016

+1
05-07-2016

Addressed Guru's review comment #2 in http://cr.openjdk.java.net/~arajkumar/8160260/webrev.01.
05-07-2016

>> 1. 768 GraphicsContextState& state, --> gc.state() will avoid modification at GraphicsContext::clip, GraphicsContext::clipPath, GraphicsContext::clipOut GraphicsContext::state() returns state as a const value which we can't modify. >> 2. will it be a good idea to check (w.r.t to cairo and cg port) >> !path.isNull() & path.isEmpty() in "static void setClipPath" I will add emptiness check, because isNull will be always false to our case. >> 3. IntRect GraphicsContext::clipBounds() const >> instead of "enclosingIntRect(m_state.transform.inverse().mapRect(m_state.clipBounds));" can we improve this ? by providing only the visible (Prisim) rect . Even though we start with infinite rect, WebCore sets the viewport rect as a clip rect first before doing any paintings. Also we can't get any info from Prism at this point, we don't have getter access since every call is async.
05-07-2016

1. 768 GraphicsContextState& state, --> gc.state() will avoid modification at GraphicsContext::clip, GraphicsContext::clipPath, GraphicsContext::clipOut 2. will it be a good idea to check (w.r.t to cairo and cg port) !path.isNull() & path.isEmpty() in "static void setClipPath" 3. IntRect GraphicsContext::clipBounds() const instead of "enclosingIntRect(m_state.transform.inverse().mapRect(m_state.clipBounds));" can we improve this ? by providing only the visible (Prisim) rect .
05-07-2016

http://cr.openjdk.java.net/~arajkumar/8160260/webrev.00
04-07-2016

There is no solid way to get clipBounds from WCGraphicsContextPrism. I tried storing the clip state in GraphicsContextState, but it is not working. Right now I'm trying implement it by debugging GTK WebKit. Quick workaround would be returning FloatRect::infiniteRect(), it won't regress any of our test case, except mentioned in [1] [1] http://trac.webkit.org/changeset/179335
01-07-2016

Issue is a side effect of r179335. We need to implement GraphicsContext::clipBounds for Java platform. Tried reverting changeset [1], it works. [1] http://trac.webkit.org/changeset/179335
30-06-2016

RULE "sites/washingtonpost.com" any any RULE "sites/wsj.com" any any
29-06-2016

RULE "sites/yandex.ru" any any RULE "sites/constantcontact.com" any any RULE "sites/constantcontact.com" any any RULE "sites/dailymotion.com" any any RULE "sites/live.com" any any RULE "sites/skype.com" any any RULE "sites/stackoverflow.com" any any RULE "sites/about.com" any any
29-06-2016

New test which display svg image in 3 forms, 1. as css background 2. using <img> 3. as svg document inside html document. #3 is working, but #1 & #2 is not.
29-06-2016

Attached a reduced test case to reproduce the issue.
29-06-2016

duplicate of JDK-8160265
28-06-2016

8u102 build 14 works ok.
24-06-2016

This is reproduced on Mac OSX passed with 8u111 b01 but failed with 1.8.0_112-ea-langtools-nightly-h7157-20160609-b01
24-06-2016

[~mkhramov] Suspecting this to be duplicate of JDK-8159701 (Doesn't work only on Linux). Could you please confirm which OS is used while testing ?
24-06-2016