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

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

Issue 2361733004: Adding @keyframes rules only affects TreeScope plus host. (Closed)
Patch Set: Rebased 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 04a64fc4c7a0eeef79cd52b6e0f34d65fe4be1e4..59bf86fb78e6df0d6907b852d58f58594a764768 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;
}

Powered by Google App Engine
This is Rietveld 408576698