Index: public/platform/WebSelectionBounds.h |
diff --git a/public/platform/WebSelectionBounds.h b/public/platform/WebSelectionBounds.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6678370d72b98269e399f666ab5f97c15ae87438 |
--- /dev/null |
+++ b/public/platform/WebSelectionBounds.h |
@@ -0,0 +1,39 @@ |
+// Copyright 2015 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 WebSelectionBounds_h |
+#define WebSelectionBounds_h |
+ |
+#include "public/platform/WebSelectionBound.h" |
+ |
+namespace blink { |
+ |
+// The endpoints for an active selection region. |
+struct WebSelectionBounds { |
aelias_OOO_until_Jul13
2015/03/12 19:29:16
Just WebSelection might be a better name?
jdduke (slow)
2015/03/16 18:15:41
Sure. I hesitated to name it that to prevent confu
jdduke (slow)
2015/03/16 18:19:20
Maybe WebCompositedSelection?
|
+ |
+ WebSelectionBounds(const WebSelectionBound& start, const WebSelectionBound& end) |
+ : start(start) |
+ , end(end) |
+ , isEditable(false) |
+ , isEditableRegionEmpty(false) |
+ { |
+ } |
+ |
+ // If the (empty) selection is an insertion point, |start| and |end| will be |
+ // identical with type |Caret|. |
+ // If the (non-empty) selection has mixed RTL/LTR text, |start| and |end| |
+ // may share the same type, |SelectionLeft| or |SelectionRight|. |
+ WebSelectionBound start; |
+ WebSelectionBound end; |
+ |
+ // Whether the selection region is editable. |
+ bool isEditable; |
+ |
+ // If the selection region is editable, whether it is empty. |
yosin_UTC9
2015/03/13 02:06:37
Q: Do you mean "region" as "range"?
It is confusin
jdduke (slow)
2015/03/16 18:15:41
Right, this isn't ideal. We should have sent the b
|
+ bool isEditableRegionEmpty; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif |