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

Unified Diff: third_party/WebKit/Source/core/editing/spellcheck/TextCheckingParagraph.cpp

Issue 2869213002: Move ExpandToParagraphBoundary to VisibleUnits (Closed)
Patch Set: Created 3 years, 7 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 | « third_party/WebKit/Source/core/editing/VisibleUnits.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/spellcheck/TextCheckingParagraph.cpp
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/TextCheckingParagraph.cpp b/third_party/WebKit/Source/core/editing/spellcheck/TextCheckingParagraph.cpp
index f79a12d8fea714a478a9c3df96b794e5b7a894c4..6f8f18d3d88c5fd7d0b911fe98728426c24e8f12 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/TextCheckingParagraph.cpp
+++ b/third_party/WebKit/Source/core/editing/spellcheck/TextCheckingParagraph.cpp
@@ -33,33 +33,6 @@
namespace blink {
-static EphemeralRange ExpandToParagraphBoundary(const EphemeralRange& range) {
- const VisiblePosition& start = CreateVisiblePosition(range.StartPosition());
- DCHECK(start.IsNotNull()) << range.StartPosition();
- const Position& paragraph_start = StartOfParagraph(start).DeepEquivalent();
- DCHECK(paragraph_start.IsNotNull()) << range.StartPosition();
-
- const VisiblePosition& end = CreateVisiblePosition(range.EndPosition());
- DCHECK(end.IsNotNull()) << range.EndPosition();
- const Position& paragraph_end = EndOfParagraph(end).DeepEquivalent();
- DCHECK(paragraph_end.IsNotNull()) << range.EndPosition();
-
- // TODO(xiaochengh): There are some cases (crbug.com/640112) where we get
- // |paragraphStart > paragraphEnd|, which is the reason we cannot directly
- // return |EphemeralRange(paragraphStart, paragraphEnd)|. This is not
- // desired, though. We should do more investigation to ensure that why
- // |paragraphStart <= paragraphEnd| is violated.
- const Position& result_start =
- paragraph_start.IsNotNull() && paragraph_start <= range.StartPosition()
- ? paragraph_start
- : range.StartPosition();
- const Position& result_end =
- paragraph_end.IsNotNull() && paragraph_end >= range.EndPosition()
- ? paragraph_end
- : range.EndPosition();
- return EphemeralRange(result_start, result_end);
-}
-
TextCheckingParagraph::TextCheckingParagraph(
const EphemeralRange& checking_range)
: checking_range_(checking_range),
« no previous file with comments | « third_party/WebKit/Source/core/editing/VisibleUnits.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698