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

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

Issue 2761963002: CANCELLED Merge SelectionAdjuster into VisibleSelection part 1 (Closed)
Patch Set: Fix typo Created 3 years, 9 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
index 92df242ae6802d952a1163c79ec7f054f13d712d..13a1f1361e8b36a225e8244f5c1eb36e355e6ff2 100644
--- a/third_party/WebKit/Source/core/editing/SelectionAdjuster.h
+++ b/third_party/WebKit/Source/core/editing/SelectionAdjuster.h
@@ -6,21 +6,17 @@
#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 CORE_EXPORT SelectionAdjuster final {
- STATIC_ONLY(SelectionAdjuster);
-
- public:
- static void adjustSelectionToAvoidCrossingShadowBoundaries(VisibleSelection*);
- static void adjustSelectionToAvoidCrossingShadowBoundaries(
- VisibleSelectionInFlatTree*);
-};
+// TODO(xiaochengh): Move everything to VisibleSelection.cpp.
+
+enum class AdjustDirection { kAdjustNone, kAdjustStart, kAdjustEnd };
+
+std::pair<AdjustDirection, Position> adjustmentToAvoidCrossingShadowBoundaries(
+ const VisibleSelection&);
+std::pair<AdjustDirection, PositionInFlatTree>
+adjustmentToAvoidCrossingShadowBoundaries(const VisibleSelectionInFlatTree&);
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698