[webkit-dev] Delaying Applying CSS Effects
keyar at chromium.org
Fri Jul 27 15:03:19 PDT 2012
I think I have been following your suggestions Niko. I modified
SVGDocumentExtensions::addPendingResource and related functions to accept
any render object as well as the code paths involved with these functions.
This implicitly allowed RenderSVGResourceContainer::registerResource to
handle CSS filters.
The problem I have come across is that I am not sure where or how to tell
the filtered element to regenerate its renderer with the now findable SVG
filter. Calling reattach() on the node in
SVGResourcesCache::clientStyleChanged() works but I suspect this is the
wrong way to go about it. Do you have any suggestions?
Alex, I believe the method Niko suggested will handle your concern so long
as the cache is told to remove the filtered element from itself when the
filtered element is deleted.
On Thu, Jul 26, 2012 at 5:32 PM, Alexandru Chiculita <achicu at adobe.com>wrote:
> On 24.07.2012, at 15:56, Dean Jackson wrote:
> On 25/07/2012, at 6:09 AM, Keyar Hood <keyar at chromium.org> wrote:
> I am working on https://bugs.webkit.org/show_bug.cgi?id=90405
> The problem is that when doing SVG filters in CSS using URL references, if
> the target SVG filter is after the element that the filter is to be applied
> to (the filtered element), then the filter will not be applied.
> Looking at the code, a getElementByID() call is made when looking for the
> target SVG filter. However, this does not work when the target SVG filter
> is after the filtered element. I believe this is because the DOM element
> for the target SVG filter does not exist yet.
> I am wondering if there is some way to delay resolving these CSS effects
> until after the DOM has finished loading.
> Your analysis sounds right. I think we'll have to do exactly that: delay
> calling buildFilterEffectRenderer until the document has loaded.
> Don't we need to always check for the ID? The element might get
> removed/replaced between repaints.
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev