Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp

Issue 2317903003: Add CSS property priority for CSS animation affecting properties (Closed)
Patch Set: Rebase onto latest optimisation Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/CSSPropertyPriority.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
index ad9f8e77bd61635df46d1d2c840b8abf0695e8c5..01eb156db9950be9c70767e1bc40199f45186355 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
@@ -1021,7 +1021,9 @@ PassRefPtr<ComputedStyle> StyleResolver::styleForPage(int pageIndex) {
NeedsApplyPass needsApplyPass;
const MatchResult& result = collector.matchedResult();
- applyMatchedProperties<HighPropertyPriority, UpdateNeedsApplyPass>(
+ applyMatchedProperties<AnimationPropertyPriority, UpdateNeedsApplyPass>(
+ state, result.allRules(), false, inheritedOnly, needsApplyPass);
+ applyMatchedProperties<HighPropertyPriority, CheckNeedsApplyPass>(
state, result.allRules(), false, inheritedOnly, needsApplyPass);
// If our font got dirtied, go ahead and update it now.
@@ -1512,6 +1514,7 @@ void StyleResolver::applyProperties(
if (property == CSSPropertyAll && isImportant == current.isImportant()) {
if (shouldUpdateNeedsApplyPass) {
+ needsApplyPass.set(AnimationPropertyPriority, isImportant);
needsApplyPass.set(HighPropertyPriority, isImportant);
needsApplyPass.set(LowPropertyPriority, isImportant);
}
@@ -1680,12 +1683,18 @@ void StyleResolver::applyMatchedProperties(StyleResolverState& state,
}
}
+ // Apply animation affecting properties.
+ applyMatchedProperties<AnimationPropertyPriority, UpdateNeedsApplyPass>(
+ state, matchResult.allRules(), false, applyInheritedOnly, needsApplyPass);
+ applyMatchedProperties<AnimationPropertyPriority, CheckNeedsApplyPass>(
+ state, matchResult.allRules(), true, applyInheritedOnly, needsApplyPass);
+
// Now we have all of the matched rules in the appropriate order. Walk the
// rules and apply high-priority properties first, i.e., those properties that
// other properties depend on. The order is (1) high-priority not important,
// (2) high-priority important, (3) normal not important and (4) normal
// important.
- applyMatchedProperties<HighPropertyPriority, UpdateNeedsApplyPass>(
+ applyMatchedProperties<HighPropertyPriority, CheckNeedsApplyPass>(
state, matchResult.allRules(), false, applyInheritedOnly, needsApplyPass);
for (auto range : ImportantAuthorRanges(matchResult)) {
applyMatchedProperties<HighPropertyPriority, CheckNeedsApplyPass>(
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/CSSPropertyPriority.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698