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

Unified Diff: Source/core/layout/compositing/CompositedSelection.h

Issue 929213004: Plumb selection bounds as a single unit (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: TODO for moving WebSelectionBound Created 5 years, 8 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
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/layout/compositing/CompositedSelectionBound.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/compositing/CompositedSelection.h
diff --git a/Source/core/layout/compositing/CompositedSelectionBound.h b/Source/core/layout/compositing/CompositedSelection.h
similarity index 69%
copy from Source/core/layout/compositing/CompositedSelectionBound.h
copy to Source/core/layout/compositing/CompositedSelection.h
index d9cc88a412fa983f32f4f8a587f8d281ceafb718..8a5baa289b95c06d5a3249c7b56bc970f9bc8281 100644
--- a/Source/core/layout/compositing/CompositedSelectionBound.h
+++ b/Source/core/layout/compositing/CompositedSelection.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014 Google Inc. All rights reserved.
+ * Copyright (C) 2015 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -28,37 +28,35 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef CompositedSelectionBound_h
-#define CompositedSelectionBound_h
+#ifndef CompositedSelection_h
+#define CompositedSelection_h
+#include "core/editing/SelectionType.h"
+#include "core/layout/compositing/CompositedSelectionBound.h"
#include "platform/geometry/FloatPoint.h"
#include "platform/graphics/GraphicsLayer.h"
namespace blink {
-struct CompositedSelectionBound {
- enum Type {
- Caret,
- SelectionLeft,
- SelectionRight
- };
+// The active selection region, containing compositing data for the selection
+// end points as well as metadata for the selection region.
+// See |WebSelection|.
+struct CompositedSelection {
- CompositedSelectionBound()
- : type(Caret)
- , layer(nullptr)
+ CompositedSelection()
+ : type(NoSelection)
+ , isEditable(false)
+ , isEmptyTextFormControl(false)
{
}
- Type type;
-
- // The structure describes the position of a caret in space of the GraphicsLayer the caret resides in.
- // Where edgeTopInLayer is the top point of the caret, usually on the ascend line of the line box,
- // and edgeBottomInLayer it the bottom point, on the baseline of the line box.
- GraphicsLayer* layer;
- FloatPoint edgeTopInLayer;
- FloatPoint edgeBottomInLayer;
+ SelectionType type;
+ CompositedSelectionBound start;
+ CompositedSelectionBound end;
+ bool isEditable;
+ bool isEmptyTextFormControl;
};
} // namespace blink
-#endif
+#endif // CompositedSelection_h
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/layout/compositing/CompositedSelectionBound.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698