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

Unified Diff: third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp

Issue 2932913002: Move spellcheck underline colors into LayoutTheme (Closed)
Patch Set: Fix Mac buildc Created 3 years, 6 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 | « third_party/WebKit/Source/core/layout/LayoutThemeMac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
index 83530023b7de60b2f0972dfeec8c79d7814e2a9a..3cfe7ca8ce956f77cfe217d10e59a15935f941ac 100644
--- a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
@@ -705,9 +705,12 @@ static const float kMarkerWidth = 4;
static const float kMarkerHeight = 2;
sk_sp<PaintRecord> RecordMarker(DocumentMarker::MarkerType marker_type) {
- SkColor color = (marker_type == DocumentMarker::kGrammar)
- ? SkColorSetRGB(0xC0, 0xC0, 0xC0)
- : SK_ColorRED;
+ SkColor color =
+ (marker_type == DocumentMarker::kGrammar)
+ ? LayoutTheme::GetTheme().PlatformGrammarMarkerUnderlineColor().Rgb()
+ : LayoutTheme::GetTheme()
+ .PlatformSpellingMarkerUnderlineColor()
+ .Rgb();
// Record the path equivalent to this legacy pattern:
// X o o X o o X
@@ -746,9 +749,12 @@ static const float kMarkerWidth = 4;
static const float kMarkerHeight = 3;
sk_sp<PaintRecord> RecordMarker(DocumentMarker::MarkerType marker_type) {
- SkColor color = (marker_type == DocumentMarker::kGrammar)
- ? SkColorSetRGB(0x6B, 0x6B, 0x6B)
- : SkColorSetRGB(0xFB, 0x2D, 0x1D);
+ SkColor color =
+ (marker_type == DocumentMarker::kGrammar)
+ ? LayoutTheme::GetTheme().PlatformGrammarMarkerUnderlineColor().Rgb()
+ : LayoutTheme::GetTheme()
+ .PlatformSpellingMarkerUnderlineColor()
+ .Rgb();
// Match the artwork used by the Mac.
static const float kR = 1.5f;
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutThemeMac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698