summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/WebKitCSSKeyframesRule.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-11 09:43:24 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-11 09:43:24 +0200
commit1b914638db989aaa98631a1c1e02c7b2d44805d8 (patch)
tree87f4fd2c7b38db320079a5de8877890d2ca3c485 /Source/WebCore/css/WebKitCSSKeyframesRule.cpp
parent2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (diff)
downloadqtwebkit-1b914638db989aaa98631a1c1e02c7b2d44805d8.tar.gz
Imported WebKit commit 9a52e27980f47e8b0d8f8b7cc0fd7b5741bceb92 (http://svn.webkit.org/repository/webkit/trunk@116736)
New snapshot to include QDeclarative* -> QQml* build fixes
Diffstat (limited to 'Source/WebCore/css/WebKitCSSKeyframesRule.cpp')
-rw-r--r--Source/WebCore/css/WebKitCSSKeyframesRule.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/Source/WebCore/css/WebKitCSSKeyframesRule.cpp b/Source/WebCore/css/WebKitCSSKeyframesRule.cpp
index cbf97d5fa..dcd79034f 100644
--- a/Source/WebCore/css/WebKitCSSKeyframesRule.cpp
+++ b/Source/WebCore/css/WebKitCSSKeyframesRule.cpp
@@ -28,6 +28,7 @@
#include "CSSParser.h"
#include "CSSRuleList.h"
+#include "CSSStyleSheet.h"
#include "StylePropertySet.h"
#include "StyleSheet.h"
#include "WebKitCSSKeyframeRule.h"
@@ -104,12 +105,9 @@ WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule()
void WebKitCSSKeyframesRule::setName(const String& name)
{
- m_keyframesRule->setName(name);
+ CSSStyleSheet::RuleMutationScope mutationScope(this);
- // Since the name is used in the keyframe map list in StyleResolver, we need
- // to recompute the style sheet to get the updated name.
- if (CSSStyleSheet* styleSheet = parentStyleSheet())
- styleSheet->styleSheetChanged();
+ m_keyframesRule->setName(name);
}
void WebKitCSSKeyframesRule::insertRule(const String& ruleText)
@@ -122,6 +120,8 @@ void WebKitCSSKeyframesRule::insertRule(const String& ruleText)
if (!keyframe)
return;
+ CSSStyleSheet::RuleMutationScope mutationScope(this);
+
m_keyframesRule->wrapperAppendKeyframe(keyframe);
m_childRuleCSSOMWrappers.grow(length());
@@ -135,6 +135,8 @@ void WebKitCSSKeyframesRule::deleteRule(const String& s)
if (i < 0)
return;
+ CSSStyleSheet::RuleMutationScope mutationScope(this);
+
m_keyframesRule->wrapperRemoveKeyframe(i);
if (m_childRuleCSSOMWrappers[i])
@@ -190,4 +192,10 @@ CSSRuleList* WebKitCSSKeyframesRule::cssRules()
return m_ruleListCSSOMWrapper.get();
}
+void WebKitCSSKeyframesRule::reattach(StyleRuleKeyframes* rule)
+{
+ ASSERT(rule);
+ m_keyframesRule = rule;
+}
+
} // namespace WebCore