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

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

Issue 2942523003: Introduce Find{Left,Right}BoundaryOfBidiRun() and variations (Closed)
Patch Set: 2017-06-15T12:30:33 Pass Bidi level to FindBoundary Created 3 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
Index: third_party/WebKit/Source/core/editing/InlineBoxTraversal.h
diff --git a/third_party/WebKit/Source/core/editing/InlineBoxTraversal.h b/third_party/WebKit/Source/core/editing/InlineBoxTraversal.h
new file mode 100644
index 0000000000000000000000000000000000000000..e7c1b374b93619b863212381c6f4f1a827e18bc1
--- /dev/null
+++ b/third_party/WebKit/Source/core/editing/InlineBoxTraversal.h
@@ -0,0 +1,44 @@
+// Copyright 2017 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 InlineBoxTraversal_h
+#define InlineBoxTraversal_h
+
+#include "platform/wtf/Allocator.h"
+
+namespace blink {
+
+class InlineBox;
+
+// This class provides common traveral functions on list of |InlineBox|.
+class InlineBoxTraversal final {
+ STATIC_ONLY(InlineBoxTraversal);
+
+ public:
+ // TODO(yosin): We should take |bidi_level| from |InlineBox::BidiLevel()|,
+ // once all call sites satisfy it.
+ // Find left boundary variations
+ static InlineBox* FindLeftBoundaryOfBidiRunIgnoringLineBreak(
+ const InlineBox&,
+ unsigned bidi_level);
+ static InlineBox* FindLeftBoundaryOfEntireBidiRun(const InlineBox&,
+ unsigned bidi_level);
+ static InlineBox* FindLeftBoundaryOfEntireBidiRunIgnoringLineBreak(
+ const InlineBox&,
+ unsigned bidi_level);
+
+ // Find right boundary variations
+ static InlineBox* FindRightBoundaryOfBidiRunIgnoringLineBreak(
+ const InlineBox&,
+ unsigned bidi_level);
+ static InlineBox* FindRightBoundaryOfEntireBidiRun(const InlineBox&,
+ unsigned bidi_level);
+ static InlineBox* FindRightBoundaryOfEntireBidiRunIgnoringLineBreak(
+ const InlineBox&,
+ unsigned bidi_level);
+};
+
+} // namespace blink
+
+#endif // InlineBoxTraversal_h
« no previous file with comments | « third_party/WebKit/Source/core/editing/BUILD.gn ('k') | third_party/WebKit/Source/core/editing/InlineBoxTraversal.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698