[Webkit-unassigned] [Bug 115513] Improving PageSerializer.cpp to retrieve the subresources specified in @media rules in css

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 3 10:01:09 PDT 2013


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


Andreas Kling <akling at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |akling at apple.com




--- Comment #20 from Andreas Kling <akling at apple.com>  2013-05-03 09:59:31 PST ---
(In reply to comment #9)
> (From update of attachment 200308 [details])
> > Source/WebCore/page/PageSerializer.cpp:284
> > +                if (mediaRule->item(i)->isStyleRule())
> > +                    retrieveResourcesForRule(static_cast<CSSStyleRule*>(mediaRule->item(i))->styleRule(), document);
> 
> This is a slow way to iterate the style rules. It’s doing multiple function calls and levels of virtual dispatch each time we call item(i). At the very least we need to put medaRule->item(i) into a local variable, but it would be even better to eventually make this code use our internal style data structures rather than the DOM wrappers.

Right. It would be better if PageSerializer accessed the internal rules through styleSheet->contents()->ruleAt(index). This code currently causes instantiation of CSSOM wrappers for everything in the page's stylesheets.

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