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

Unified Diff: trunk/Source/core/dom/Element.cpp

Issue 948053002: Revert 190605 "Make RenderObject::style() return a const object" (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 5 years, 10 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 | « trunk/Source/core/dom/Element.h ('k') | trunk/Source/core/dom/FirstLetterPseudoElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/core/dom/Element.cpp
===================================================================
--- trunk/Source/core/dom/Element.cpp (revision 190671)
+++ trunk/Source/core/dom/Element.cpp (working copy)
@@ -1634,7 +1634,7 @@
ASSERT(change >= Inherit || needsStyleRecalc());
ASSERT(parentLayoutStyle());
- RefPtr<LayoutStyle> oldStyle = mutableLayoutStyle();
+ RefPtr<LayoutStyle> oldStyle = layoutStyle();
RefPtr<LayoutStyle> newStyle = styleForRenderer();
StyleRecalcChange localChange = LayoutStyle::stylePropagationDiff(oldStyle.get(), newStyle.get());
@@ -1679,7 +1679,7 @@
return localChange;
}
-void Element::updateCallbackSelectors(const LayoutStyle* oldStyle, const LayoutStyle* newStyle)
+void Element::updateCallbackSelectors(LayoutStyle* oldStyle, LayoutStyle* newStyle)
{
Vector<String> emptyVector;
const Vector<String>& oldCallbackSelectors = oldStyle ? oldStyle->callbackSelectors() : emptyVector;
@@ -1830,7 +1830,7 @@
void Element::checkForEmptyStyleChange()
{
- const LayoutStyle* style = layoutStyle();
+ LayoutStyle* style = layoutStyle();
if (!style && !styleAffectedByEmpty())
return;
@@ -2533,7 +2533,7 @@
// 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 = mutableLayoutStyle();
+ LayoutStyle* elementStyle = layoutStyle();
if (!elementStyle) {
ElementRareData& rareData = ensureElementRareData();
if (!rareData.computedStyle())
@@ -2616,7 +2616,7 @@
// Need to clear the cached style if the PseudoElement wants a recalc so it
// computes a new style.
if (element->needsStyleRecalc())
- renderer()->mutableStyleRef().removeCachedPseudoStyle(pseudoId);
+ renderer()->style()->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.
« no previous file with comments | « trunk/Source/core/dom/Element.h ('k') | trunk/Source/core/dom/FirstLetterPseudoElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698