Index: Source/core/dom/Element.cpp |
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp |
index 7ed385f12649b8ee4e6a28001d6003723a18e56c..dfe0b23285104ef3e7ce5bbe7287a2a4e3a841c2 100644 |
--- a/Source/core/dom/Element.cpp |
+++ b/Source/core/dom/Element.cpp |
@@ -1634,7 +1634,7 @@ StyleRecalcChange Element::recalcOwnStyle(StyleRecalcChange change) |
ASSERT(change >= Inherit || needsStyleRecalc()); |
ASSERT(parentLayoutStyle()); |
- RefPtr<LayoutStyle> oldStyle = layoutStyle(); |
+ RefPtr<LayoutStyle> oldStyle = mutableLayoutStyle(); |
RefPtr<LayoutStyle> newStyle = styleForRenderer(); |
StyleRecalcChange localChange = LayoutStyle::stylePropagationDiff(oldStyle.get(), newStyle.get()); |
@@ -1679,7 +1679,7 @@ StyleRecalcChange Element::recalcOwnStyle(StyleRecalcChange change) |
return localChange; |
} |
-void Element::updateCallbackSelectors(LayoutStyle* oldStyle, LayoutStyle* newStyle) |
+void Element::updateCallbackSelectors(const LayoutStyle* oldStyle, const LayoutStyle* newStyle) |
{ |
Vector<String> emptyVector; |
const Vector<String>& oldCallbackSelectors = oldStyle ? oldStyle->callbackSelectors() : emptyVector; |
@@ -1830,7 +1830,7 @@ bool Element::childTypeAllowed(NodeType type) const |
void Element::checkForEmptyStyleChange() |
{ |
- LayoutStyle* style = layoutStyle(); |
+ const LayoutStyle* style = layoutStyle(); |
if (!style && !styleAffectedByEmpty()) |
return; |
@@ -2522,7 +2522,7 @@ LayoutStyle* Element::computedStyle(PseudoId pseudoElementSpecifier) |
// FIXME: Find and use the renderer from the pseudo element instead of the actual element so that the 'length' |
// properties, which are only known by the renderer because it did the layout, will be correct and so that the |
// values returned for the ":selection" pseudo-element will be correct. |
- LayoutStyle* elementStyle = layoutStyle(); |
+ LayoutStyle* elementStyle = mutableLayoutStyle(); |
if (!elementStyle) { |
ElementRareData& rareData = ensureElementRareData(); |
if (!rareData.computedStyle()) |
@@ -2605,7 +2605,7 @@ void Element::updatePseudoElement(PseudoId pseudoId, StyleRecalcChange change) |
// Need to clear the cached style if the PseudoElement wants a recalc so it |
// computes a new style. |
if (element->needsStyleRecalc()) |
- renderer()->style()->removeCachedPseudoStyle(pseudoId); |
+ renderer()->mutableStyleRef().removeCachedPseudoStyle(pseudoId); |
// PseudoElement styles hang off their parent element's style so if we needed |
// a style recalc we should Force one on the pseudo. |