| Index: Source/core/dom/Element.cpp
|
| diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
|
| index 33c0ff473585e38e1e15ce7edfe73f28d0e81818..09c4752cfe44acff268f4182ffb782147242f332 100644
|
| --- a/Source/core/dom/Element.cpp
|
| +++ b/Source/core/dom/Element.cpp
|
| @@ -3096,7 +3096,7 @@ void Element::didMoveToNewDocument(Document& oldDocument)
|
| }
|
|
|
| if (needsURLResolutionForInlineStyle(*this, oldDocument, document()))
|
| - reResolveURLsInInlineStyle(document(), *ensureMutableInlineStyle());
|
| + reResolveURLsInInlineStyle(document(), ensureMutableInlineStyle());
|
| }
|
|
|
| void Element::updateNamedItemRegistration(const AtomicString& oldName, const AtomicString& newName)
|
| @@ -3348,7 +3348,7 @@ CSSStyleDeclaration* Element::style()
|
| return ensureElementRareData().ensureInlineCSSStyleDeclaration(this);
|
| }
|
|
|
| -MutableStylePropertySet* Element::ensureMutableInlineStyle()
|
| +MutableStylePropertySet& Element::ensureMutableInlineStyle()
|
| {
|
| ASSERT(isStyledElement());
|
| RefPtr<StylePropertySet>& inlineStyle = ensureUniqueElementData().m_inlineStyle;
|
| @@ -3358,12 +3358,12 @@ MutableStylePropertySet* Element::ensureMutableInlineStyle()
|
| } else if (!inlineStyle->isMutable()) {
|
| inlineStyle = inlineStyle->mutableCopy();
|
| }
|
| - return toMutableStylePropertySet(inlineStyle);
|
| + return *toMutableStylePropertySet(inlineStyle);
|
| }
|
|
|
| void Element::clearMutableInlineStyleIfEmpty()
|
| {
|
| - if (ensureMutableInlineStyle()->isEmpty()) {
|
| + if (ensureMutableInlineStyle().isEmpty()) {
|
| ensureUniqueElementData().m_inlineStyle.clear();
|
| }
|
| }
|
| @@ -3421,7 +3421,7 @@ void Element::inlineStyleChanged()
|
| bool Element::setInlineStyleProperty(CSSPropertyID propertyID, CSSValueID identifier, bool important)
|
| {
|
| ASSERT(isStyledElement());
|
| - ensureMutableInlineStyle()->setProperty(propertyID, cssValuePool().createIdentifierValue(identifier), important);
|
| + ensureMutableInlineStyle().setProperty(propertyID, cssValuePool().createIdentifierValue(identifier), important);
|
| inlineStyleChanged();
|
| return true;
|
| }
|
| @@ -3429,7 +3429,7 @@ bool Element::setInlineStyleProperty(CSSPropertyID propertyID, CSSValueID identi
|
| bool Element::setInlineStyleProperty(CSSPropertyID propertyID, CSSPropertyID identifier, bool important)
|
| {
|
| ASSERT(isStyledElement());
|
| - ensureMutableInlineStyle()->setProperty(propertyID, cssValuePool().createIdentifierValue(identifier), important);
|
| + ensureMutableInlineStyle().setProperty(propertyID, cssValuePool().createIdentifierValue(identifier), important);
|
| inlineStyleChanged();
|
| return true;
|
| }
|
| @@ -3437,7 +3437,7 @@ bool Element::setInlineStyleProperty(CSSPropertyID propertyID, CSSPropertyID ide
|
| bool Element::setInlineStyleProperty(CSSPropertyID propertyID, double value, CSSPrimitiveValue::UnitTypes unit, bool important)
|
| {
|
| ASSERT(isStyledElement());
|
| - ensureMutableInlineStyle()->setProperty(propertyID, cssValuePool().createValue(value, unit), important);
|
| + ensureMutableInlineStyle().setProperty(propertyID, cssValuePool().createValue(value, unit), important);
|
| inlineStyleChanged();
|
| return true;
|
| }
|
| @@ -3445,7 +3445,7 @@ bool Element::setInlineStyleProperty(CSSPropertyID propertyID, double value, CSS
|
| bool Element::setInlineStyleProperty(CSSPropertyID propertyID, const String& value, bool important)
|
| {
|
| ASSERT(isStyledElement());
|
| - bool changes = ensureMutableInlineStyle()->setProperty(propertyID, value, important, document().elementSheet().contents());
|
| + bool changes = ensureMutableInlineStyle().setProperty(propertyID, value, important, document().elementSheet().contents());
|
| if (changes)
|
| inlineStyleChanged();
|
| return changes;
|
| @@ -3456,7 +3456,7 @@ bool Element::removeInlineStyleProperty(CSSPropertyID propertyID)
|
| ASSERT(isStyledElement());
|
| if (!inlineStyle())
|
| return false;
|
| - bool changes = ensureMutableInlineStyle()->removeProperty(propertyID);
|
| + bool changes = ensureMutableInlineStyle().removeProperty(propertyID);
|
| if (changes)
|
| inlineStyleChanged();
|
| return changes;
|
| @@ -3467,7 +3467,7 @@ void Element::removeAllInlineStyleProperties()
|
| ASSERT(isStyledElement());
|
| if (!inlineStyle())
|
| return;
|
| - ensureMutableInlineStyle()->clear();
|
| + ensureMutableInlineStyle().clear();
|
| inlineStyleChanged();
|
| }
|
|
|
|
|