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

Unified Diff: Source/core/rendering/line/BreakingContextInlineHeaders.h

Issue 889563002: Make RenderObject::style() return a const object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix a crashers (everything is building!) Created 5 years, 11 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/rendering/line/BreakingContextInlineHeaders.h
diff --git a/Source/core/rendering/line/BreakingContextInlineHeaders.h b/Source/core/rendering/line/BreakingContextInlineHeaders.h
index 324b8bc9f6b70c82df1f06e03f35b3ae46558216..ee6652538442c52e0c136e2a56b4d20b31322b21 100644
--- a/Source/core/rendering/line/BreakingContextInlineHeaders.h
+++ b/Source/core/rendering/line/BreakingContextInlineHeaders.h
@@ -119,8 +119,8 @@ private:
RenderObject* m_lastObject;
RenderObject* m_nextObject;
- RenderStyle* m_currentStyle;
- RenderStyle* m_blockStyle;
+ const RenderStyle* m_currentStyle;
+ const RenderStyle* m_blockStyle;
LineInfo& m_lineInfo;
@@ -502,7 +502,7 @@ inline float firstPositiveWidth(const WordMeasurements& wordMeasurements)
inline float measureHyphenWidth(RenderText* renderer, const Font& font, TextDirection textDirection)
{
- RenderStyle* style = renderer->style();
+ const RenderStyle* style = renderer->style();
return font.width(constructTextRun(renderer, font,
style->hyphenString().string(), style, style->direction()));
}
@@ -553,7 +553,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool
}
}
- RenderStyle* style = renderText->style(m_lineInfo.isFirstLine());
+ const RenderStyle* style = renderText->style(m_lineInfo.isFirstLine());
const Font& font = style->font();
bool isFixedPitch = font.isFixedPitch();
@@ -899,7 +899,7 @@ inline void BreakingContext::commitAndUpdateLineBreakIfNeeded()
}
}
-inline IndentTextOrNot requiresIndent(bool isFirstLine, bool isAfterHardLineBreak, RenderStyle* style)
+inline IndentTextOrNot requiresIndent(bool isFirstLine, bool isAfterHardLineBreak, const RenderStyle* style)
{
IndentTextOrNot shouldIndentText = DoNotIndentText;
if (isFirstLine || (isAfterHardLineBreak && style->textIndentLine()) == TextIndentEachLine)

Powered by Google App Engine
This is Rietveld 408576698