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

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

Issue 2361733004: Adding @keyframes rules only affects TreeScope plus host. (Closed)
Patch Set: Moved scope check to CSSAnimations Created 4 years, 3 months 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
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 8905d091bce27a3401b0b2131877252b7d7fa1b5..18f7ee6507696d6655130835571f321e462566f3 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
@@ -1159,10 +1159,13 @@ StyleRuleKeyframes* StyleResolver::findKeyframesRule(const Element* element, con
if (ScopedStyleResolver* scopedResolver = element->treeScope().scopedStyleResolver())
resolvers.append(scopedResolver);
- for (size_t i = 0; i < resolvers.size(); ++i) {
- if (StyleRuleKeyframes* keyframesRule = resolvers[i]->keyframeStylesForAnimation(animationName.impl()))
+ for (auto& resolver : resolvers) {
+ if (StyleRuleKeyframes* keyframesRule = resolver->keyframeStylesForAnimation(animationName.impl()))
return keyframesRule;
}
+
+ for (auto& resolver : resolvers)
+ resolver->setHasUnresolvedKeyframesRule();
return nullptr;
}
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp ('k') | third_party/WebKit/Source/core/dom/StyleEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698