Chromium Code Reviews| 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 |