OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 19 matching lines...) Expand all Loading... |
30 | 30 |
31 #ifndef CompositedSelectionBound_h | 31 #ifndef CompositedSelectionBound_h |
32 #define CompositedSelectionBound_h | 32 #define CompositedSelectionBound_h |
33 | 33 |
34 #include "platform/geometry/FloatPoint.h" | 34 #include "platform/geometry/FloatPoint.h" |
35 #include "platform/graphics/GraphicsLayer.h" | 35 #include "platform/graphics/GraphicsLayer.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 struct CompositedSelectionBound { | 39 struct CompositedSelectionBound { |
40 enum Type { | |
41 Caret, | |
42 SelectionLeft, | |
43 SelectionRight | |
44 }; | |
45 | |
46 CompositedSelectionBound() | 40 CompositedSelectionBound() |
47 : type(Caret) | 41 : layer(nullptr) |
48 , layer(nullptr) | 42 , isTextDirectionRTL(false) |
49 { | 43 { |
50 } | 44 } |
51 | 45 |
52 Type type; | |
53 | |
54 // The structure describes the position of a caret in space of the GraphicsL
ayer the caret resides in. | 46 // The structure describes the position of a caret in space of the GraphicsL
ayer the caret resides in. |
55 // Where edgeTopInLayer is the top point of the caret, usually on the ascend
line of the line box, | 47 // Where edgeTopInLayer is the top point of the caret, usually on the ascend
line of the line box, |
56 // and edgeBottomInLayer it the bottom point, on the baseline of the line bo
x. | 48 // and edgeBottomInLayer it the bottom point, on the baseline of the line bo
x. |
57 GraphicsLayer* layer; | 49 GraphicsLayer* layer; |
58 FloatPoint edgeTopInLayer; | 50 FloatPoint edgeTopInLayer; |
59 FloatPoint edgeBottomInLayer; | 51 FloatPoint edgeBottomInLayer; |
| 52 |
| 53 bool isTextDirectionRTL; |
60 }; | 54 }; |
61 | 55 |
62 } // namespace blink | 56 } // namespace blink |
63 | 57 |
64 #endif | 58 #endif |
OLD | NEW |