OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WebSelectionBound_h |
| 6 #define WebSelectionBound_h |
| 7 |
| 8 #include "public/platform/WebRect.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 // An endpoint for an active selection region. |
| 13 struct WebSelectionBound { |
| 14 enum Type { |
| 15 Caret, |
| 16 SelectionLeft, |
| 17 SelectionRight |
| 18 }; |
| 19 |
| 20 explicit WebSelectionBound(Type type) |
| 21 : type(type) |
| 22 , layerId(0) |
| 23 { |
| 24 } |
| 25 |
| 26 // The logical type of the endpoint. Note that this is dependent not only on |
| 27 // the bound's relative location, but also the underlying text direction. |
| 28 Type type; |
| 29 |
| 30 // The id of the platform layer to which the bound should be anchored. |
| 31 int layerId; |
| 32 |
| 33 // The one-dimensional rect of the bound's edge in layer coordinates, not to |
| 34 // be confused with the selection region. |
| 35 WebRect edgeRectInLayer; |
| 36 }; |
| 37 |
| 38 } // namespace blink |
| 39 |
| 40 #endif |
OLD | NEW |