Changeset 176157 in webkit for trunk/Source/WebCore/css/CSSKeyframesRule.cpp
- Timestamp:
- Nov 15, 2014, 3:02:43 PM (11 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/css/CSSKeyframesRule.cpp
-
Property svn:keywords
set to
Date Author Id Revision HeadURL
r176156 r176157 1 1 /* 2 * Copyright (C) 2007, 2008, 2012, 2013 Apple Inc. All rights reserved.2 * Copyright (C) 2007, 2008, 2012, 2013, 2014 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 25 25 26 26 #include "config.h" 27 #include "WebKitCSSKeyframesRule.h" 28 27 #include "CSSKeyframesRule.h" 28 29 #include "CSSKeyframeRule.h" 29 30 #include "CSSParser.h" 30 31 #include "CSSRuleList.h" … … 33 34 #include "StyleProperties.h" 34 35 #include "StyleSheet.h" 35 #include "WebKitCSSKeyframeRule.h"36 36 #include <wtf/text/StringBuilder.h> 37 37 … … 88 88 } 89 89 90 WebKitCSSKeyframesRule::WebKitCSSKeyframesRule(StyleRuleKeyframes& keyframesRule, CSSStyleSheet* parent)90 CSSKeyframesRule::CSSKeyframesRule(StyleRuleKeyframes& keyframesRule, CSSStyleSheet* parent) 91 91 : CSSRule(parent) 92 92 , m_keyframesRule(keyframesRule) … … 95 95 } 96 96 97 WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule()97 CSSKeyframesRule::~CSSKeyframesRule() 98 98 { 99 99 ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size()); … … 105 105 } 106 106 107 void WebKitCSSKeyframesRule::setName(const String& name)107 void CSSKeyframesRule::setName(const String& name) 108 108 { 109 109 CSSStyleSheet::RuleMutationScope mutationScope(this); … … 112 112 } 113 113 114 void WebKitCSSKeyframesRule::appendRule(const String& ruleText)114 void CSSKeyframesRule::appendRule(const String& ruleText) 115 115 { 116 116 if (CSSStyleSheet* parent = parentStyleSheet()) { … … 121 121 } 122 122 123 void WebKitCSSKeyframesRule::insertRule(const String& ruleText)123 void CSSKeyframesRule::insertRule(const String& ruleText) 124 124 { 125 125 ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size()); … … 138 138 } 139 139 140 void WebKitCSSKeyframesRule::deleteRule(const String& s)140 void CSSKeyframesRule::deleteRule(const String& s) 141 141 { 142 142 ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size()); … … 155 155 } 156 156 157 WebKitCSSKeyframeRule* WebKitCSSKeyframesRule::findRule(const String& s)157 CSSKeyframeRule* CSSKeyframesRule::findRule(const String& s) 158 158 { 159 159 int i = m_keyframesRule->findKeyframeIndex(s); … … 161 161 } 162 162 163 String WebKitCSSKeyframesRule::cssText() const163 String CSSKeyframesRule::cssText() const 164 164 { 165 165 StringBuilder result; … … 178 178 } 179 179 180 unsigned WebKitCSSKeyframesRule::length() const180 unsigned CSSKeyframesRule::length() const 181 181 { 182 182 return m_keyframesRule->keyframes().size(); 183 183 } 184 184 185 WebKitCSSKeyframeRule* WebKitCSSKeyframesRule::item(unsigned index) const185 CSSKeyframeRule* CSSKeyframesRule::item(unsigned index) const 186 186 { 187 187 if (index >= length()) … … 189 189 190 190 ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size()); 191 RefPtr< WebKitCSSKeyframeRule>& rule = m_childRuleCSSOMWrappers[index];191 RefPtr<CSSKeyframeRule>& rule = m_childRuleCSSOMWrappers[index]; 192 192 if (!rule) 193 rule = adoptRef(new WebKitCSSKeyframeRule(*m_keyframesRule->keyframes()[index], const_cast<WebKitCSSKeyframesRule*>(this)));193 rule = adoptRef(new CSSKeyframeRule(*m_keyframesRule->keyframes()[index], const_cast<CSSKeyframesRule*>(this))); 194 194 195 195 return rule.get(); 196 196 } 197 197 198 CSSRuleList& WebKitCSSKeyframesRule::cssRules()198 CSSRuleList& CSSKeyframesRule::cssRules() 199 199 { 200 200 if (!m_ruleListCSSOMWrapper) 201 m_ruleListCSSOMWrapper = std::make_unique<LiveCSSRuleList< WebKitCSSKeyframesRule>>(this);201 m_ruleListCSSOMWrapper = std::make_unique<LiveCSSRuleList<CSSKeyframesRule>>(this); 202 202 return *m_ruleListCSSOMWrapper; 203 203 } 204 204 205 void WebKitCSSKeyframesRule::reattach(StyleRuleBase& rule)205 void CSSKeyframesRule::reattach(StyleRuleBase& rule) 206 206 { 207 207 ASSERT_WITH_SECURITY_IMPLICATION(rule.isKeyframesRule()); -
Property svn:keywords
set to
Note:
See TracChangeset
for help on using the changeset viewer.