Index: Source/core/css/StylePropertySet.cpp |
diff --git a/Source/core/css/StylePropertySet.cpp b/Source/core/css/StylePropertySet.cpp |
index 731bac5da967c1d5d228f5a3e358b240520bce65..b1fadd6f03b4bc98fdae03b4b681e1a8381e7b4c 100644 |
--- a/Source/core/css/StylePropertySet.cpp |
+++ b/Source/core/css/StylePropertySet.cpp |
@@ -521,31 +521,27 @@ PropertySetCSSStyleDeclaration* StylePropertySet::cssStyleDeclaration() |
return propertySetCSSOMWrapperMap().get(this); |
} |
-CSSStyleDeclaration* StylePropertySet::ensureCSSStyleDeclaration() |
+CSSStyleDeclaration* MutableStylePropertySet::ensureCSSStyleDeclaration() |
{ |
- ASSERT(isMutable()); |
- |
if (m_ownsCSSOMWrapper) { |
ASSERT(!static_cast<CSSStyleDeclaration*>(propertySetCSSOMWrapperMap().get(this))->parentRule()); |
ASSERT(!propertySetCSSOMWrapperMap().get(this)->parentElement()); |
return propertySetCSSOMWrapperMap().get(this); |
} |
m_ownsCSSOMWrapper = true; |
- PropertySetCSSStyleDeclaration* cssomWrapper = new PropertySetCSSStyleDeclaration(const_cast<StylePropertySet*>(this)); |
+ PropertySetCSSStyleDeclaration* cssomWrapper = new PropertySetCSSStyleDeclaration(this); |
propertySetCSSOMWrapperMap().add(this, adoptPtr(cssomWrapper)); |
return cssomWrapper; |
} |
-CSSStyleDeclaration* StylePropertySet::ensureInlineCSSStyleDeclaration(const StyledElement* parentElement) |
+CSSStyleDeclaration* MutableStylePropertySet::ensureInlineCSSStyleDeclaration(const StyledElement* parentElement) |
{ |
- ASSERT(isMutable()); |
- |
if (m_ownsCSSOMWrapper) { |
ASSERT(propertySetCSSOMWrapperMap().get(this)->parentElement() == parentElement); |
return propertySetCSSOMWrapperMap().get(this); |
} |
m_ownsCSSOMWrapper = true; |
- PropertySetCSSStyleDeclaration* cssomWrapper = new InlineCSSStyleDeclaration(const_cast<StylePropertySet*>(this), const_cast<StyledElement*>(parentElement)); |
+ PropertySetCSSStyleDeclaration* cssomWrapper = new InlineCSSStyleDeclaration(this, const_cast<StyledElement*>(parentElement)); |
propertySetCSSOMWrapperMap().add(this, adoptPtr(cssomWrapper)); |
return cssomWrapper; |
} |