RESOLVED FIXED 99933
Factor stylesheet invalidation analysis code into a class
https://bugs.webkit.org/show_bug.cgi?id=99933
Summary Factor stylesheet invalidation analysis code into a class
Antti Koivisto
Reported 2012-10-21 07:38:26 PDT
Currently the code is all over the place. It should be factored into a class to make further progress easier.
Attachments
patch (36.59 KB, patch)
2012-10-21 07:43 PDT, Antti Koivisto
sam: review+
Antti Koivisto
Comment 1 2012-10-21 07:43:22 PDT
Sam Weinig
Comment 2 2012-10-21 14:12:43 PDT
Comment on attachment 169798 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=169798&action=review > Source/WebCore/css/StyleInvalidationAnalysis.h:30 > +#include <wtf/OwnPtr.h> OwnPtr is unused in the header (though PassOwnPtr is).
Sam Weinig
Comment 3 2012-10-21 14:13:19 PDT
Comment on attachment 169798 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=169798&action=review > Source/WebCore/dom/DocumentStyleSheetCollection.cpp:406 > + OwnPtr<StyleInvalidationAnalysis> invalidationAnalysis = StyleInvalidationAnalysis::create(addedSheets); > + if (invalidationAnalysis->dirtiesAllStyle()) > + return; > + invalidationAnalysis->invalidateStyle(m_document); Could we create the StyleInvalidationAnalysis on the stack?
Antti Koivisto
Comment 4 2012-10-21 14:40:44 PDT
(In reply to comment #3) > Could we create the StyleInvalidationAnalysis on the stack? We could but I was sort of considering caching it later. Doesn't make any meaningful difference in terms of performance.
Antti Koivisto
Comment 5 2012-10-21 15:03:53 PDT
http://trac.webkit.org/changeset/132009 (with stack allocated analysis object)
Note You need to log in before you can comment on or make changes to this bug.