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

Unified Diff: Source/core/dom/Text.cpp

Issue 889563002: Make RenderObject::style() return a const object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated patch after splitting 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
Index: Source/core/dom/Text.cpp
diff --git a/Source/core/dom/Text.cpp b/Source/core/dom/Text.cpp
index 1436baa977b7a440d3554a1f7f4f834e3726ec11..8de36ca8dbe0c0bdde30a81e381192bbcc881f45 100644
--- a/Source/core/dom/Text.cpp
+++ b/Source/core/dom/Text.cpp
@@ -315,12 +315,12 @@ static bool isSVGText(Text* text)
return parentOrShadowHostNode->isSVGElement() && !isSVGForeignObjectElement(*parentOrShadowHostNode);
}
-RenderText* Text::createTextRenderer(LayoutStyle* style)
+RenderText* Text::createTextRenderer(const LayoutStyle& style)
{
if (isSVGText(this))
return new RenderSVGInlineText(this, dataImpl());
- if (style->hasTextCombine())
+ if (style.hasTextCombine())
return new RenderCombineText(this, dataImpl());
return new RenderText(this, dataImpl());
@@ -383,7 +383,7 @@ void Text::recalcTextStyle(StyleRecalcChange change, Text* nextTextSibling)
bool Text::needsWhitespaceRenderer()
{
ASSERT(!renderer());
- if (LayoutStyle* style = parentLayoutStyle())
+ if (const LayoutStyle* style = parentLayoutStyle())
return style->preserveNewline();
return false;
}

Powered by Google App Engine
This is Rietveld 408576698