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

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

Issue 15923002: Move CSSOM classes to using MutableStylePropertySet over StylePropertySet. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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
« no previous file with comments | « Source/core/css/StylePropertySet.h ('k') | Source/core/css/StyleRule.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « Source/core/css/StylePropertySet.h ('k') | Source/core/css/StyleRule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698