WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
55573
Selector usage flags should not be set by the CSS parser
https://bugs.webkit.org/show_bug.cgi?id=55573
Summary
Selector usage flags should not be set by the CSS parser
Antti Koivisto
Reported
2011-03-02 05:42:06 PST
Currently flags like Document::usesSiblingRules() are set directly by the CSS parser. This is wrong as we may parse stylesheets that are not actually used for document rendering. This is especially bad when the page uses querySelectorAll(). As a result we may end up in various performance penalty boxes triggered by complex selectors for no good reason.
Attachments
move figuring out the selector flags to CSSStyleSelector
(25.13 KB, patch)
2011-03-02 05:56 PST
,
Antti Koivisto
hyatt
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Antti Koivisto
Comment 1
2011-03-02 05:56:36 PST
Created
attachment 84410
[details]
move figuring out the selector flags to CSSStyleSelector - Use the selector traversal in style selector constructor to figure out which flags actually are needed for the currently active style sheets. - Remove the flag related code from the CSS parser/grammar. - Remove the usesDescendantRules flag completely. We have descendant rules in the default style sheet, so every document uses them.
Dave Hyatt
Comment 2
2011-03-02 09:48:36 PST
Comment on
attachment 84410
[details]
move figuring out the selector flags to CSSStyleSelector r=me
Antti Koivisto
Comment 3
2011-03-02 11:09:11 PST
http://trac.webkit.org/changeset/80150
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug