WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
128321
Check selectors exactly when invalidating style
https://bugs.webkit.org/show_bug.cgi?id=128321
Summary
Check selectors exactly when invalidating style
Antti Koivisto
Reported
2014-02-06 11:59:06 PST
instead of heuristics
Attachments
patch
(16.45 KB, patch)
2014-02-06 12:08 PST
,
Antti Koivisto
kling
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Antti Koivisto
Comment 1
2014-02-06 12:08:22 PST
Created
attachment 223362
[details]
patch
Andreas Kling
Comment 2
2014-02-06 12:45:10 PST
Comment on
attachment 223362
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=223362&action=review
r=me with some tweaks. Q: Can we piggyback on the already massaged data in the Document's StyleResolver here?
> Source/WebCore/ChangeLog:9 > + With selectors are really fast to match with the JIT. Take advantage of it by invalidating > + document style exactly when new stylesheets arrive (instead of heuristics).
I don't think you need the "With" here. We should remove it to achieve 60fps on mobile in 2014.
> Source/WebCore/css/StyleInvalidationAnalysis.cpp:40 > +static bool shouldDirtyAllStyle(const Vector<RefPtr<StyleRuleBase>> rules)
We should pass the rules vector by (const) reference here.
> Source/WebCore/css/StyleInvalidationAnalysis.cpp:42 > + for (auto rule : rules) {
Ref churn here. auto& would avoid it.
> Source/WebCore/css/StyleInvalidationAnalysis.cpp:57 > + for (auto import : sheet.importRules()) {
Same here.
> Source/WebCore/css/StyleInvalidationAnalysis.cpp:70 > + for (auto sheet : sheets) {
Sam has convinced me to start writing "auto*" to clarify that there's no by-value copy.
> Source/WebCore/css/StyleInvalidationAnalysis.cpp:84 > + for (auto sheet : sheets)
Same comment here.
Antti Koivisto
Comment 3
2014-02-06 15:30:05 PST
(In reply to
comment #2
)
> (From update of
attachment 223362
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=223362&action=review
> > r=me with some tweaks. > > Q: Can we piggyback on the already massaged data in the Document's StyleResolver here?
Not really. The new sheet stuff is not in StyleResolver yet. Optimally we would transfer it over instead of reprocessing but everything here is pretty cheap in any case.
Antti Koivisto
Comment 4
2014-02-06 17:54:16 PST
https://trac.webkit.org/r163592
Antti Koivisto
Comment 5
2014-02-06 17:57:03 PST
https://trac.webkit.org/r163592
https://trac.webkit.org/r163594
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