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

Unified Diff: third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.cpp

Issue 2919433006: Stop using TextIteratorBehavior in TextIteratorTextState (Closed)
Patch Set: Sun Jun 4 22:44:20 PDT 2017 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.h ('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/iterators/TextIteratorTextState.cpp
diff --git a/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.cpp b/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.cpp
index 060b53887d09d0f5e076f789f45ff07e82681cde..005dad5bd84a501f399abbcb620f952be36c3119 100644
--- a/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.cpp
+++ b/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.cpp
@@ -27,15 +27,10 @@
#include "core/editing/iterators/TextIteratorTextState.h"
-#include "core/editing/iterators/TextIteratorBehavior.h"
#include "platform/wtf/text/StringBuilder.h"
namespace blink {
-TextIteratorTextState::TextIteratorTextState(
- const TextIteratorBehavior& behavior)
- : behavior_(behavior) {}
-
DEFINE_TRACE(TextIteratorTextState) {
visitor->Trace(position_node_);
visitor->Trace(position_offset_base_node_);
@@ -150,11 +145,6 @@ void TextIteratorTextState::EmitText(Node* text_node,
DCHECK(text_node);
text_ = string;
- // TODO(xiaochengh): Hoist the conversion to TextIteratorTextNodeHandler, so
- // that we can remove |behavior_| from TextIteratorTextState.
- if (behavior_.EmitsSpaceForNbsp())
- text_.Replace(kNoBreakSpaceCharacter, kSpaceCharacter);
-
DCHECK(!text_.IsEmpty());
DCHECK_LE(0, text_start_offset);
DCHECK_LT(text_start_offset, static_cast<int>(text_.length()));
« no previous file with comments | « third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698