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

Unified Diff: trunk/Source/core/layout/LayoutObject.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/layout/LayoutObject.h ('k') | trunk/Source/core/layout/LayoutObjectInlines.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/core/layout/LayoutObject.cpp
===================================================================
--- trunk/Source/core/layout/LayoutObject.cpp (revision 190671)
+++ trunk/Source/core/layout/LayoutObject.cpp (working copy)
@@ -2624,11 +2624,11 @@
}
} else if (!rendererForFirstLineStyle->isAnonymous() && rendererForFirstLineStyle->isRenderInline()
&& !rendererForFirstLineStyle->node()->isFirstLetterPseudoElement()) {
- const LayoutStyle* parentStyle = rendererForFirstLineStyle->parent()->firstLineStyle();
+ LayoutStyle* parentStyle = rendererForFirstLineStyle->parent()->firstLineStyle();
if (parentStyle != rendererForFirstLineStyle->parent()->style()) {
if (type == Cached) {
// A first-line style is in effect. Cache a first-line style for ourselves.
- rendererForFirstLineStyle->mutableStyle()->setHasPseudoStyle(FIRST_LINE_INHERITED);
+ rendererForFirstLineStyle->style()->setHasPseudoStyle(FIRST_LINE_INHERITED);
return rendererForFirstLineStyle->getCachedPseudoStyle(FIRST_LINE_INHERITED, parentStyle);
}
return rendererForFirstLineStyle->getUncachedPseudoStyle(PseudoStyleRequest(FIRST_LINE_INHERITED), parentStyle, style);
@@ -2657,7 +2657,7 @@
return m_style.get();
}
-LayoutStyle* LayoutObject::getCachedPseudoStyle(PseudoId pseudo, const LayoutStyle* parentStyle) const
+LayoutStyle* LayoutObject::getCachedPseudoStyle(PseudoId pseudo, LayoutStyle* parentStyle) const
{
if (pseudo < FIRST_INTERNAL_PSEUDOID && !style()->hasPseudoStyle(pseudo))
return 0;
@@ -2668,11 +2668,11 @@
RefPtr<LayoutStyle> result = getUncachedPseudoStyle(PseudoStyleRequest(pseudo), parentStyle);
if (result)
- return mutableStyle()->addCachedPseudoStyle(result.release());
+ return style()->addCachedPseudoStyle(result.release());
return 0;
}
-PassRefPtr<LayoutStyle> LayoutObject::getUncachedPseudoStyle(const PseudoStyleRequest& pseudoStyleRequest, const LayoutStyle* parentStyle, const LayoutStyle* ownStyle) const
+PassRefPtr<LayoutStyle> LayoutObject::getUncachedPseudoStyle(const PseudoStyleRequest& pseudoStyleRequest, LayoutStyle* parentStyle, LayoutStyle* ownStyle) const
{
if (pseudoStyleRequest.pseudoId < FIRST_INTERNAL_PSEUDOID && !ownStyle && !style()->hasPseudoStyle(pseudoStyleRequest.pseudoId))
return nullptr;
@@ -2717,7 +2717,7 @@
void LayoutObject::getTextDecorations(unsigned decorations, AppliedTextDecoration& underline, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool quirksMode, bool firstlineStyle)
{
LayoutObject* curr = this;
- const LayoutStyle* styleToUse = 0;
+ LayoutStyle* styleToUse = 0;
unsigned currDecs = TextDecorationNone;
Color resultColor;
TextDecorationStyle resultStyle;
« no previous file with comments | « trunk/Source/core/layout/LayoutObject.h ('k') | trunk/Source/core/layout/LayoutObjectInlines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698