From 1b914638db989aaa98631a1c1e02c7b2d44805d8 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 11 May 2012 09:43:24 +0200 Subject: Imported WebKit commit 9a52e27980f47e8b0d8f8b7cc0fd7b5741bceb92 (http://svn.webkit.org/repository/webkit/trunk@116736) New snapshot to include QDeclarative* -> QQml* build fixes --- Source/WebCore/css/WebKitCSSKeyframesRule.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'Source/WebCore/css/WebKitCSSKeyframesRule.cpp') 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 -- cgit v1.2.1