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

Unified Diff: public/web/WebCompositionUnderline.h

Issue 313233002: Adding backgroundColor to WebCompositionUnderline and using it for InlineTextBox drawing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removing over-eager cleanups; adding CompositionUnderlineRangeFilter::operator->(). Created 6 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: public/web/WebCompositionUnderline.h
diff --git a/public/web/WebCompositionUnderline.h b/public/web/WebCompositionUnderline.h
index 2c5866205375ca6cab9e649b613c4fa047e9a837..7a4bf54e0f56172f6c292c9ee92b92b082358ecd 100644
--- a/public/web/WebCompositionUnderline.h
+++ b/public/web/WebCompositionUnderline.h
@@ -42,18 +42,36 @@ struct WebCompositionUnderline {
: startOffset(0)
, endOffset(0)
, color(0)
- , thick(false) { }
+ , thick(false)
+ , backgroundColor(0) { }
+ // TODO(huangs): remove this constructor.
tkent 2014/06/13 04:31:43 Use FIXME: instead of TODO().
huangs 2014/06/13 17:22:25 Done.
WebCompositionUnderline(unsigned s, unsigned e, WebColor c, bool t)
: startOffset(s)
, endOffset(e)
, color(c)
- , thick(t) { }
+ , thick(t)
+ , backgroundColor(0) { }
+ WebCompositionUnderline(unsigned s, unsigned e, WebColor c, bool t, WebColor bc)
+ : startOffset(s)
+ , endOffset(e)
+ , color(c)
+ , thick(t)
+ , backgroundColor(bc) { }
+
+ bool operator<(const WebCompositionUnderline& other) const
+ {
+ return startOffset != other.startOffset ? startOffset < other.startOffset : endOffset < other.endOffset;
+ }
+
+ // Need to update IPC_STRUCT_TRAITS_BEGIN(blink::WebCompositionUnderline)
+ // if members change.
unsigned startOffset;
unsigned endOffset;
WebColor color;
bool thick;
+ WebColor backgroundColor;
};
} // namespace blink
« Source/core/rendering/InlineTextBox.cpp ('K') | « Source/web/tests/WebViewTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698