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.
5 #ifndef WebSelectionBound_h
6 #define WebSelectionBound_h
8 #include "public/platform/WebPoint.h"
12 // An endpoint for an active selection region.
13 // TODO(jdduke): Move this to web/ after downstream code adopts |WebSelection|.
14 struct WebSelectionBound
{
15 // TODO(jdduke): Remove the type identifier after downstream code adopts
16 // |WebSelection| for determining bound orientation.
23 explicit WebSelectionBound(Type type
)
26 , isTextDirectionRTL(false)
30 // The logical type of the endpoint. Note that this is dependent not only on
31 // the bound's relative location, but also the underlying text direction.
34 // The id of the platform layer to which the bound should be anchored.
37 // The bottom and top coordinates of the edge (caret), in layer coordinates,
38 // that define the selection bound.
39 WebPoint edgeTopInLayer
;
40 WebPoint edgeBottomInLayer
;
42 // Whether the text direction at this location is RTL.
43 bool isTextDirectionRTL
;