summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/public/web/WebCompositionUnderline.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/public/web/WebCompositionUnderline.h')
-rw-r--r--chromium/third_party/WebKit/public/web/WebCompositionUnderline.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/chromium/third_party/WebKit/public/web/WebCompositionUnderline.h b/chromium/third_party/WebKit/public/web/WebCompositionUnderline.h
index 2c586620537..21c065ba487 100644
--- a/chromium/third_party/WebKit/public/web/WebCompositionUnderline.h
+++ b/chromium/third_party/WebKit/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