[Webkit-unassigned] [Bug 126069] Start refactoring Filter code to reuse CachedSVGDocument for clipPath

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 20 10:42:10 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=126069





--- Comment #3 from Dirk Schulze <krit at webkit.org>  2013-12-20 10:40:12 PST ---
(In reply to comment #2)
> (From update of attachment 219759 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=219759&action=review
> 
> > Source/WebCore/ChangeLog:12
> > +        Smaller refactoring of the CSS filter style resolver code. Previously the code
> > +        requested the FilterOperations list from RenderStyle and compared the content
> > +        in this list with an internal map. Then the resource loading was triggered.
> > +        With the refactoring we do not request the list from RenderStyle anymore but
> > +        rely on the hash map data entirely.
> 
> Why is this not necessary anymore?

The HashMap has a pointer to the FilterOperation that needs the cached resource. The function currently has access to this pointer but instead uses RenderStyle to get the operator again. Even worst, we now need to iterate through the whole list of FilterOperations instead just taking the FilterOperations we know that they need resources.


> 
> > Source/WebCore/css/StyleResolver.cpp:3418
> > +    PendingSVGDocumentMap::iterator end = state.pendingSVGDocuments().end();
> > +    for (PendingSVGDocumentMap::iterator it = state.pendingSVGDocuments().begin(); it != end; ++it) {
> 
> I'd shorten this down a bit with auto:
> 
> for (auto it = state.pendingSVGDocuments().begin(), end = state.pendingSVGDocuments().end(); it != end; ++it) {


Will do.

-- 
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