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

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 change after Doug's review. 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 | « Source/core/dom/Text.h ('k') | Source/core/dom/TreeScope.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Text.cpp
diff --git a/Source/core/dom/Text.cpp b/Source/core/dom/Text.cpp
index c983fbd9874729c34dc3b92ddc3c86b7b47abf15..fda82942a6398076d20a58bf0a01972e33a9b2a7 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 LayoutSVGInlineText(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;
}
« no previous file with comments | « Source/core/dom/Text.h ('k') | Source/core/dom/TreeScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698