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

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

Issue 1854583003: Make leadingWhitespacePosition() to respect "white-space" CSS property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-04-01T14:49:00 Created 4 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/EditingUtilities.h
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilities.h b/third_party/WebKit/Source/core/editing/EditingUtilities.h
index 7632c5c301dd84e422655ae272cb36b297805770..8e38eff6833481bf87f9a9b783bbfdc7ec7fb01c 100644
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.h
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.h
@@ -241,6 +241,14 @@ bool isAtUnsplittableElement(const Position&);
// miscellaneous functions on Position
enum WhitespacePositionOption { NotConsiderNonCollapsibleWhitespace, ConsiderNonCollapsibleWhitespace };
+
+// |leadingWhitespacePosition(position)| returns a previous position of
+// |position| if it is at collapsible whitespace, otherwise it returns null
+// position. When it is called with |NotConsiderNonCollapsibleWhitespace| and
+// a previous position in a element which has CSS property "white-space:pre",
+// or its variant, |leadingWhitespacePosition()| returns null position.
+// TODO(yosin) We should rename |leadingWhitespacePosition()| to
+// |leadingCollapsibleWhitespacePosition()| as this function really returns.
Position leadingWhitespacePosition(const Position&, TextAffinity, WhitespacePositionOption = NotConsiderNonCollapsibleWhitespace);
Position trailingWhitespacePosition(const Position&, TextAffinity, WhitespacePositionOption = NotConsiderNonCollapsibleWhitespace);
unsigned numEnclosingMailBlockquotes(const Position&);

Powered by Google App Engine
This is Rietveld 408576698