Index: third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.h |
diff --git a/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.h b/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.h |
index 3c9a5025520e17a060a2ecbe1ef838eef7d8c2a6..7ad675ad6e3ca8e91c82b79996d67d38c7b2e155 100644 |
--- a/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.h |
+++ b/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.h |
@@ -28,6 +28,7 @@ |
#include "core/CoreExport.h" |
#include "core/dom/Range.h" |
+#include "core/editing/iterators/TextBuffer.h" |
#include "core/layout/LayoutText.h" |
#include "wtf/text/WTFString.h" |
@@ -62,25 +63,7 @@ public: |
m_textLength = 0; |
} |
- template<typename BufferType> |
- void appendTextTo(BufferType& output, unsigned position, unsigned lengthToAppend) const |
- { |
- ASSERT_WITH_SECURITY_IMPLICATION(position + lengthToAppend <= static_cast<unsigned>(length())); |
- // Make sure there's no integer overflow. |
- ASSERT_WITH_SECURITY_IMPLICATION(position + lengthToAppend >= position); |
- if (!lengthToAppend) |
- return; |
- if (m_singleCharacterBuffer) { |
- ASSERT(!position); |
- ASSERT(length() == 1); |
- output.append(&m_singleCharacterBuffer, 1); |
- } else if (positionNode()) { |
- flushPositionOffsets(); |
- string().appendTo(output, positionStartOffset() + position, lengthToAppend); |
- } else { |
- ASSERT_NOT_REACHED(); // "We shouldn't be attempting to append text that doesn't exist."; |
- } |
- } |
+ void appendTextTo(ForwardsTextBuffer& output, unsigned position, unsigned lengthToAppend) const; |
private: |
int m_textLength; |