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

Unified Diff: Source/core/paint/TextPainter.cpp

Issue 889563002: Make RenderObject::style() return a const object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Blind fix for Mac. 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/paint/TextPainter.cpp
diff --git a/Source/core/paint/TextPainter.cpp b/Source/core/paint/TextPainter.cpp
index 405b374e57a7d4ca8b75e5c41678cb8e76722488..0d3bab9704e5f226db484a0685cfadd8b95461ec 100644
--- a/Source/core/paint/TextPainter.cpp
+++ b/Source/core/paint/TextPainter.cpp
@@ -108,7 +108,7 @@ static Color textColorForWhiteBackground(Color textColor)
}
// static
-TextPainter::Style TextPainter::textPaintingStyle(RenderObject& renderer, RenderStyle* style, bool forceBlackText, bool isPrinting)
+TextPainter::Style TextPainter::textPaintingStyle(RenderObject& renderer, const RenderStyle* style, bool forceBlackText, bool isPrinting)
{
TextPainter::Style textStyle;
@@ -157,7 +157,7 @@ TextPainter::Style TextPainter::selectionPaintingStyle(RenderObject& renderer, b
selectionStyle.emphasisMarkColor = renderer.selectionEmphasisMarkColor();
}
- if (RenderStyle* pseudoStyle = renderer.getCachedPseudoStyle(SELECTION)) {
+ if (const RenderStyle* pseudoStyle = renderer.getCachedPseudoStyle(SELECTION)) {
selectionStyle.strokeColor = forceBlackText ? Color::black : renderer.resolveColor(pseudoStyle, CSSPropertyWebkitTextStrokeColor);
selectionStyle.strokeWidth = pseudoStyle->textStrokeWidth();
selectionStyle.shadow = forceBlackText ? 0 : pseudoStyle->textShadow();

Powered by Google App Engine
This is Rietveld 408576698