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

Unified Diff: third_party/WebKit/Source/core/editing/SelectionAdjuster.h

Issue 1640623002: Move SelectionAdjust to its own file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-01-27T14:51:58 Created 4 years, 11 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
Index: third_party/WebKit/Source/core/editing/SelectionAdjuster.h
diff --git a/third_party/WebKit/Source/core/editing/SelectionAdjuster.h b/third_party/WebKit/Source/core/editing/SelectionAdjuster.h
new file mode 100644
index 0000000000000000000000000000000000000000..396a43cceb0a8edaa02ee6ad11cd78ca6f2bb869
--- /dev/null
+++ b/third_party/WebKit/Source/core/editing/SelectionAdjuster.h
@@ -0,0 +1,27 @@
+// Copyright 2016 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 SelectionAdjuster_h
+#define SelectionAdjuster_h
+
+#include "core/editing/VisibleSelection.h"
+#include "wtf/Allocator.h"
+
+namespace blink {
+
+// |SelectionAdjuster| adjusts positions in |VisibleSelection| directly without
+// calling |validate()|. Users of |SelectionAdjuster| should keep invariant of
+// |VisibleSelection|, e.g. all positions are canonicalized.
+class SelectionAdjuster final {
+ STATIC_ONLY(SelectionAdjuster);
+public:
+ static void adjustSelectionInComposedTree(VisibleSelectionInComposedTree*, const VisibleSelection&);
+ static void adjustSelectionInDOMTree(VisibleSelection*, const VisibleSelectionInComposedTree&);
+ static void adjustSelectionToAvoidCrossingShadowBoundaries(VisibleSelection*);
+ static void adjustSelectionToAvoidCrossingShadowBoundaries(VisibleSelectionInComposedTree*);
+};
+
+} // namespace blink
+
+#endif // SelectionAdjuster_h
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698