OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 25 matching lines...) Expand all Loading... |
36 namespace blink { | 36 namespace blink { |
37 | 37 |
38 // Class WebCompositionUnderline is intended to be used with WebWidget's | 38 // Class WebCompositionUnderline is intended to be used with WebWidget's |
39 // setComposition() method. | 39 // setComposition() method. |
40 struct WebCompositionUnderline { | 40 struct WebCompositionUnderline { |
41 WebCompositionUnderline() | 41 WebCompositionUnderline() |
42 : startOffset(0), | 42 : startOffset(0), |
43 endOffset(0), | 43 endOffset(0), |
44 color(0), | 44 color(0), |
45 thick(false), | 45 thick(false), |
46 backgroundColor(0) {} | 46 backgroundColor(0), |
| 47 persist(false) {} |
47 | 48 |
48 WebCompositionUnderline(unsigned s, | 49 WebCompositionUnderline(unsigned s, |
49 unsigned e, | 50 unsigned e, |
50 WebColor c, | 51 WebColor c, |
51 bool t, | 52 bool t, |
52 WebColor bc) | 53 WebColor bc, |
53 : startOffset(s), endOffset(e), color(c), thick(t), backgroundColor(bc) {} | 54 bool p) |
| 55 : startOffset(s), |
| 56 endOffset(e), |
| 57 color(c), |
| 58 thick(t), |
| 59 backgroundColor(bc), |
| 60 persist(p) {} |
54 | 61 |
55 bool operator<(const WebCompositionUnderline& other) const { | 62 bool operator<(const WebCompositionUnderline& other) const { |
56 return startOffset != other.startOffset ? startOffset < other.startOffset | 63 return startOffset != other.startOffset ? startOffset < other.startOffset |
57 : endOffset < other.endOffset; | 64 : endOffset < other.endOffset; |
58 } | 65 } |
59 | 66 |
60 // Need to update IPC_STRUCT_TRAITS_BEGIN(blink::WebCompositionUnderline) | 67 // Need to update IPC_STRUCT_TRAITS_BEGIN(blink::WebCompositionUnderline) |
61 // if members change. | 68 // if members change. |
62 unsigned startOffset; | 69 unsigned startOffset; |
63 unsigned endOffset; | 70 unsigned endOffset; |
64 WebColor color; | 71 WebColor color; |
65 bool thick; | 72 bool thick; |
66 WebColor backgroundColor; | 73 WebColor backgroundColor; |
| 74 bool persist; |
67 }; | 75 }; |
68 | 76 |
69 } // namespace blink | 77 } // namespace blink |
70 | 78 |
71 #endif | 79 #endif |
OLD | NEW |