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

Unified Diff: Source/core/css/CSSKeyframeRule.cpp

Issue 814083003: Update animation when changes in animation keyframes are detected. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase and address comments Created 5 years, 11 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: Source/core/css/CSSKeyframeRule.cpp
diff --git a/Source/core/css/CSSKeyframeRule.cpp b/Source/core/css/CSSKeyframeRule.cpp
index 1aeeff988d75d22090289b1c540d30372d11e158..c57bbeb335c69c0ce677f4929b7bdd5450c876d7 100644
--- a/Source/core/css/CSSKeyframeRule.cpp
+++ b/Source/core/css/CSSKeyframeRule.cpp
@@ -28,6 +28,7 @@
#include "bindings/core/v8/ExceptionState.h"
#include "core/css/CSSKeyframesRule.h"
+#include "core/css/CSSStyleSheet.h"
#include "core/css/PropertySetCSSStyleDeclaration.h"
#include "core/dom/ExceptionCode.h"
@@ -52,12 +53,14 @@ void CSSKeyframeRule::setKeyText(const String& keyText, ExceptionState& exceptio
{
if (!m_keyframe->setKeyText(keyText))
exceptionState.throwDOMException(SyntaxError, "The key '" + keyText + "' is invalid and cannot be parsed");
+
+ toCSSKeyframesRule(parentRule())->styleChanged();
}
CSSStyleDeclaration* CSSKeyframeRule::style() const
{
if (!m_propertiesCSSOMWrapper)
- m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_keyframe->mutableProperties(), const_cast<CSSKeyframeRule*>(this));
+ m_propertiesCSSOMWrapper = KeyframeStyleRuleCSSStyleDeclaration::create(m_keyframe->mutableProperties(), const_cast<CSSKeyframeRule*>(this));
return m_propertiesCSSOMWrapper.get();
}

Powered by Google App Engine
This is Rietveld 408576698