Rename/tweak some StylePropertySet/CSSStyleDeclaration copying functions.
<http://webkit.org/b/114569>
Reviewed by Anders Carlsson.
- StylePropertySet::copy() -> mutableCopy()
This function now returns a MutableStylePropertySet, and this is also reflected in the name.
- CSSStyleDeclaration::copy() -> copyProperties()
Renamed to reflect that it's the properties being copied, not the CSSStyleDeclaration.
They also now return MutableStylePropertySets.
- StylePropertySet::copyPropertiesInSet()
- CSSStyleDeclaration::copyPropertiesInSet()
These functions now return MutableStylePropertySets.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::copyProperties):
(WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
* css/CSSComputedStyleDeclaration.h:
(CSSComputedStyleDeclaration):
* css/CSSStyleDeclaration.h:
(CSSStyleDeclaration):
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::copyProperties):
* css/PropertySetCSSStyleDeclaration.h:
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::mutableCopy):
(WebCore::StylePropertySet::copyPropertiesInSet):
* css/StylePropertySet.h:
(StylePropertySet):
* css/StyleRule.cpp:
(WebCore::StyleRule::StyleRule):
(WebCore::StyleRule::mutableProperties):
(WebCore::StyleRulePage::StyleRulePage):
(WebCore::StyleRulePage::mutableProperties):
(WebCore::StyleRuleFontFace::StyleRuleFontFace):
(WebCore::StyleRuleFontFace::mutableProperties):
(WebCore::StyleRuleViewport::StyleRuleViewport):
(WebCore::StyleRuleViewport::mutableProperties):
(WebCore::StyleRuleFilter::StyleRuleFilter):
(WebCore::StyleRuleFilter::mutableProperties):
* css/ViewportStyleResolver.cpp:
(WebCore::ViewportStyleResolver::addViewportRule):
* css/WebKitCSSKeyframeRule.cpp:
(WebCore::StyleKeyframe::mutableProperties):
* dom/Element.cpp:
(WebCore::UniqueElementData::UniqueElementData):
* dom/StyledElement.cpp:
(WebCore::StyledElement::ensureMutableInlineStyle):
* editing/ApplyStyleCommand.cpp:
(WebCore::copyStyleOrCreateEmpty):
* editing/EditingStyle.cpp:
(WebCore::copyEditingProperties):
(WebCore::editingStyleFromComputedStyle):
(WebCore::EditingStyle::EditingStyle):
(WebCore::EditingStyle::init):
(WebCore::EditingStyle::copy):
(WebCore::EditingStyle::mergeStyle):
(WebCore::getPropertiesNotIn):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::copyTypingStyle):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148365 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/css/StyleRule.cpp b/Source/WebCore/css/StyleRule.cpp
index e0046c1..0af0999 100644
--- a/Source/WebCore/css/StyleRule.cpp
+++ b/Source/WebCore/css/StyleRule.cpp
@@ -304,7 +304,7 @@
StyleRule::StyleRule(const StyleRule& o)
: StyleRuleBase(o)
- , m_properties(o.m_properties->copy())
+ , m_properties(o.m_properties->mutableCopy())
, m_selectorList(o.m_selectorList)
{
}
@@ -316,7 +316,7 @@
StylePropertySet* StyleRule::mutableProperties()
{
if (!m_properties->isMutable())
- m_properties = m_properties->copy();
+ m_properties = m_properties->mutableCopy();
return m_properties.get();
}
@@ -332,7 +332,7 @@
StyleRulePage::StyleRulePage(const StyleRulePage& o)
: StyleRuleBase(o)
- , m_properties(o.m_properties->copy())
+ , m_properties(o.m_properties->mutableCopy())
, m_selectorList(o.m_selectorList)
{
}
@@ -344,7 +344,7 @@
StylePropertySet* StyleRulePage::mutableProperties()
{
if (!m_properties->isMutable())
- m_properties = m_properties->copy();
+ m_properties = m_properties->mutableCopy();
return m_properties.get();
}
@@ -367,7 +367,7 @@
StyleRuleFontFace::StyleRuleFontFace(const StyleRuleFontFace& o)
: StyleRuleBase(o)
- , m_properties(o.m_properties->copy())
+ , m_properties(o.m_properties->mutableCopy())
{
}
@@ -378,7 +378,7 @@
StylePropertySet* StyleRuleFontFace::mutableProperties()
{
if (!m_properties->isMutable())
- m_properties = m_properties->copy();
+ m_properties = m_properties->mutableCopy();
return m_properties.get();
}
@@ -486,7 +486,7 @@
StyleRuleViewport::StyleRuleViewport(const StyleRuleViewport& o)
: StyleRuleBase(o)
- , m_properties(o.m_properties->copy())
+ , m_properties(o.m_properties->mutableCopy())
{
}
@@ -497,7 +497,7 @@
StylePropertySet* StyleRuleViewport::mutableProperties()
{
if (!m_properties->isMutable())
- m_properties = m_properties->copy();
+ m_properties = m_properties->mutableCopy();
return m_properties.get();
}
@@ -523,7 +523,7 @@
StyleRuleFilter::StyleRuleFilter(const StyleRuleFilter& o)
: StyleRuleBase(o)
, m_filterName(o.m_filterName)
- , m_properties(o.m_properties->copy())
+ , m_properties(o.m_properties->mutableCopy())
{
}
@@ -534,7 +534,7 @@
StylePropertySet* StyleRuleFilter::mutableProperties()
{
if (!m_properties->isMutable())
- m_properties = m_properties->copy();
+ m_properties = m_properties->mutableCopy();
return m_properties.get();
}