OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2015 Google Inc. All rights reserved. | 2 * Copyright (C) 2015 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 17 matching lines...) Expand all Loading... |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef CompositedSelection_h | 31 #ifndef CompositedSelection_h |
32 #define CompositedSelection_h | 32 #define CompositedSelection_h |
33 | 33 |
34 #include "core/editing/SelectionType.h" | 34 #include "core/editing/SelectionType.h" |
35 #include "core/layout/compositing/CompositedSelectionBound.h" | 35 #include "core/layout/compositing/CompositedSelectionBound.h" |
36 #include "platform/geometry/FloatPoint.h" | 36 #include "platform/geometry/FloatPoint.h" |
37 #include "platform/graphics/GraphicsLayer.h" | 37 #include "platform/graphics/GraphicsLayer.h" |
| 38 #include "wtf/Allocator.h" |
38 | 39 |
39 namespace blink { | 40 namespace blink { |
40 | 41 |
41 // The active selection region, containing compositing data for the selection | 42 // The active selection region, containing compositing data for the selection |
42 // end points as well as metadata for the selection region. | 43 // end points as well as metadata for the selection region. |
43 // See |WebSelection|. | 44 // See |WebSelection|. |
44 struct CompositedSelection { | 45 struct CompositedSelection { |
45 | 46 STACK_ALLOCATED(); |
46 CompositedSelection() | 47 CompositedSelection() |
47 : type(NoSelection) | 48 : type(NoSelection) |
48 , isEditable(false) | 49 , isEditable(false) |
49 , isEmptyTextFormControl(false) | 50 , isEmptyTextFormControl(false) |
50 { | 51 { |
51 } | 52 } |
52 | 53 |
53 SelectionType type; | 54 SelectionType type; |
54 CompositedSelectionBound start; | 55 CompositedSelectionBound start; |
55 CompositedSelectionBound end; | 56 CompositedSelectionBound end; |
56 bool isEditable; | 57 bool isEditable; |
57 bool isEmptyTextFormControl; | 58 bool isEmptyTextFormControl; |
58 }; | 59 }; |
59 | 60 |
60 } // namespace blink | 61 } // namespace blink |
61 | 62 |
62 #endif // CompositedSelection_h | 63 #endif // CompositedSelection_h |
OLD | NEW |