|
|
Store features in the ScopedStyleResoolver.
This now means that using a class/id/attribute selector in one scope will
not cause style recalcs in other scopes in the page when something with
that feature changes.
It also removes an iteration over all the scopes that used to collect
features.
I also removed all the extra cases around adding/removing classes since
the general case can handle them.
In addition I removed the check for classStringHasClassName which looked
to see if the string was all whitespace. This check dated way back to
fixing an assert in code we don't even have anymore. Assertion fix aside
all the extra check optimized for was if you wrote class=" " with no
names, which will now cause an extra malloc of the SpaceSplitString::Data.
This seems super rare, it makes more sense to not scan the class string
every time the list of classes changes which is far more common than
setting a string of only whitespace.
R=ojan@chromium.org
Committed: https://chromium.googlesource.com/external/mojo/+/a1fb756cef8219f43af55ded8ea72f6e2af29f99
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+113 lines, -224 lines) |
Patch |
 |
M |
sky/engine/core/css/RuleFeature.h
|
View
|
|
1 chunk |
+0 lines, -7 lines |
0 comments
|
Download
|
 |
M |
sky/engine/core/css/RuleFeature.cpp
|
View
|
|
1 chunk |
+0 lines, -67 lines |
0 comments
|
Download
|
 |
M |
sky/engine/core/css/resolver/ScopedStyleResolver.h
|
View
|
1
|
3 chunks |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
sky/engine/core/css/resolver/ScopedStyleResolver.cpp
|
View
|
1
|
1 chunk |
+2 lines, -8 lines |
0 comments
|
Download
|
 |
M |
sky/engine/core/css/resolver/SharedStyleFinder.h
|
View
|
|
3 chunks |
+2 lines, -8 lines |
0 comments
|
Download
|
 |
M |
sky/engine/core/css/resolver/SharedStyleFinder.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
sky/engine/core/css/resolver/StyleResolver.h
|
View
|
|
6 chunks |
+1 line, -24 lines |
0 comments
|
Download
|
 |
M |
sky/engine/core/css/resolver/StyleResolver.cpp
|
View
|
|
5 chunks |
+1 line, -33 lines |
0 comments
|
Download
|
 |
M |
sky/engine/core/dom/Element.h
|
View
|
|
2 chunks |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
sky/engine/core/dom/Element.cpp
|
View
|
1
|
6 chunks |
+91 lines, -53 lines |
1 comment
|
Download
|
 |
M |
sky/engine/core/dom/SpaceSplitString.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
sky/engine/core/dom/StyleEngine.h
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
sky/engine/core/dom/StyleEngine.cpp
|
View
|
|
1 chunk |
+0 lines, -17 lines |
0 comments
|
Download
|
 |
M |
sky/engine/core/dom/StyleSheetCollection.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 5 (1 generated)
|