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

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: Extracting paintCompositionBackgrounds() from paint(). 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
« no previous file with comments | « Source/web/tests/WebViewTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebCompositionUnderline.h
diff --git a/public/web/WebCompositionUnderline.h b/public/web/WebCompositionUnderline.h
index 2c5866205375ca6cab9e649b613c4fa047e9a837..21c065ba4871de539c20e9446311c05960bcc77d 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) { }
+ // FIXME(huangs): remove this constructor.
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
« no previous file with comments | « Source/web/tests/WebViewTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698