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

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

Issue 2932913002: Move spellcheck underline colors into LayoutTheme (Closed)
Patch Set: Fix Mac build 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
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..1bb2cb2638946e95cb50d257c6b8602fe5a9f5e3 100644
--- a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
@@ -705,9 +705,10 @@ 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().GrammarMarkerUnderlineColor().Rgb()
+ : LayoutTheme::GetTheme().SpellingMarkerUnderlineColor().Rgb();
// Record the path equivalent to this legacy pattern:
// X o o X o o X
@@ -746,9 +747,10 @@ 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().GrammarMarkerUnderlineColor().Rgb()
+ : LayoutTheme::GetTheme().SpellingMarkerUnderlineColor().Rgb();
// Match the artwork used by the Mac.
static const float kR = 1.5f;

Powered by Google App Engine
This is Rietveld 408576698