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

Unified Diff: public/platform/WebSelectionBound.h

Issue 352173002: Expose public interface for composited selection bounds (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Public API only Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« public/platform/WebLayerTreeView.h ('K') | « public/platform/WebLayerTreeView.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebSelectionBound.h
diff --git a/public/platform/WebSelectionBound.h b/public/platform/WebSelectionBound.h
new file mode 100644
index 0000000000000000000000000000000000000000..b795442cb73ed4469ce06457086624a51f085f10
--- /dev/null
+++ b/public/platform/WebSelectionBound.h
@@ -0,0 +1,40 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WebSelectionBound_h
+#define WebSelectionBound_h
+
+#include "public/platform/WebRect.h"
+
+namespace blink {
+
+// An endpoint for an active selection region.
+struct WebSelectionBound {
+ enum Type {
+ Caret,
+ SelectionLeft,
+ SelectionRight
+ };
+
+ explicit WebSelectionBound(Type type)
+ : type(type)
+ , layerId(0)
+ {
+ }
+
+ // The logical type of the endpoint. Note that this is dependent not only on
+ // the bound's relative location, but also the underlying text direction.
+ Type type;
+
+ // The id of the platform layer to which the bound should be anchored.
+ int layerId;
+
+ // The bound endpoint region in layer coordinates, not to be confused with
+ // the selection region.
+ WebRect layerRect;
abarth-chromium 2014/06/25 22:27:03 Is this the rect of the handle itself? It sounds
jdduke (slow) 2014/06/25 22:58:10 Hmm, I'm not actually sure if they're always one-d
+};
+
+} // namespace blink
+
+#endif
« public/platform/WebLayerTreeView.h ('K') | « public/platform/WebLayerTreeView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698