Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1655)

Side by Side Diff: public/platform/WebSelectionBound.h

Issue 454643002: Route selection bounds updates through WebLayerTreeView (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revised Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebSelectionBound_h 5 #ifndef WebSelectionBound_h
6 #define WebSelectionBound_h 6 #define WebSelectionBound_h
7 7
8 #include "public/platform/WebPoint.h" 8 #include "public/platform/WebPoint.h"
9 #include "public/platform/WebRect.h"
10 9
11 namespace blink { 10 namespace blink {
12 11
13 // An endpoint for an active selection region. 12 // An endpoint for an active selection region.
14 struct WebSelectionBound { 13 struct WebSelectionBound {
15 enum Type { 14 enum Type {
16 Caret, 15 Caret,
17 SelectionLeft, 16 SelectionLeft,
18 SelectionRight 17 SelectionRight
19 }; 18 };
20 19
21 explicit WebSelectionBound(Type type) 20 explicit WebSelectionBound(Type type)
22 : type(type) 21 : type(type)
23 , layerId(0) 22 , layerId(0)
24 { 23 {
25 } 24 }
26 25
27 // The logical type of the endpoint. Note that this is dependent not only on 26 // The logical type of the endpoint. Note that this is dependent not only on
28 // the bound's relative location, but also the underlying text direction. 27 // the bound's relative location, but also the underlying text direction.
29 Type type; 28 Type type;
30 29
31 // The id of the platform layer to which the bound should be anchored. 30 // The id of the platform layer to which the bound should be anchored.
32 int layerId; 31 int layerId;
33 32
34 // The one-dimensional rect of the bound's edge in layer coordinates, not to
35 // be confused with the selection region.
36 // FIXME: Remove when downstream code uses |edge{Top|Bottom}InLayer|,
37 // crbug.com/405666.
38 WebRect edgeRectInLayer;
39
40 // The bottom and top coordinates of the edge (caret), in layer coordinates, 33 // The bottom and top coordinates of the edge (caret), in layer coordinates,
41 // that define the selection bound. 34 // that define the selection bound.
42 WebPoint edgeTopInLayer; 35 WebPoint edgeTopInLayer;
43 WebPoint edgeBottomInLayer; 36 WebPoint edgeBottomInLayer;
44 }; 37 };
45 38
46 } // namespace blink 39 } // namespace blink
47 40
48 #endif 41 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698