[Webkit-unassigned] [Bug 127102] New: External SVG filter references don't work as expected
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 16 05:29:17 PST 2014
https://bugs.webkit.org/show_bug.cgi?id=127102
Summary: External SVG filter references don't work as expected
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: CSS
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: krit at webkit.org
CC: koivisto at iki.fi, dino at apple.com, akling at apple.com
Given the following HTML file:
<style>
div {
width: 200px;
height: 200px;
-webkit-filter: url(resource.svg#f);
}
</style>
<div></div>
resource.svg looks like this:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
<filter id="f">
<feFlood flood-color="green"/>
</filter>
</svg>
The div box in the HTML file will not get filtered.
Replace <feFlood> with <feColorMatrix> and it will work just fine. The reason is probably the following:
We download the SVG file as expected and store the reference to the created SVG document. We have a proper pending resource management. The style resolving process can access the SVG document and more important the SVG fe-primitives just fine.
However, feFlood needs a RenderObject, feColorMatrix doesn't. This is mainly because feFlood has flood-color and flood-opacity: two CSS properties. feColorMatrix doesn't depend on CSS properties and we can get all information from the DOM.
It means, we never create a render tree for the external SVG file. It might even be that the problem existed the whole time. That might explain why certain external SVG filter examples never worked in Safari or Chrome.
We need to create a Render tree for the external SVG filters. Or find a way to have style resolving (with proper updating) without the help of RenderObject.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list