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

Unified Diff: Source/core/animation/css/CSSAnimations.cpp

Issue 751593002: Removed add/removeScopedStyleResolver from StyleEngine (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
Index: Source/core/animation/css/CSSAnimations.cpp
diff --git a/Source/core/animation/css/CSSAnimations.cpp b/Source/core/animation/css/CSSAnimations.cpp
index 20a667eeaddd581f0a92db2d6913efab13be805b..877b6bb9866c69a62ff3defd278689127da39d69 100644
--- a/Source/core/animation/css/CSSAnimations.cpp
+++ b/Source/core/animation/css/CSSAnimations.cpp
@@ -199,8 +199,11 @@ static void resolveKeyframes(StyleResolver* resolver, const Element* animatingEl
const StyleRuleKeyframes* CSSAnimations::matchScopedKeyframesRule(StyleResolver* resolver, const Element* element, const StringImpl* animationName)
{
// FIXME: This is all implementation detail of style resolver, CSSAnimations shouldn't be reaching into any of it.
- if (element->document().styleEngine()->hasOnlyScopedResolverForDocument())
- return element->document().scopedStyleResolver()->keyframeStylesForAnimation(animationName);
+ if (element->document().styleEngine()->onlyDocumentHasStyles()) {
+ if (ScopedStyleResolver* resolver = element->document().scopedStyleResolver())
+ return resolver->keyframeStylesForAnimation(animationName);
+ return nullptr;
+ }
WillBeHeapVector<RawPtrWillBeMember<ScopedStyleResolver>, 8> stack;
resolver->styleTreeResolveScopedKeyframesRules(element, stack);

Powered by Google App Engine
This is Rietveld 408576698