Index: third_party/WebKit/Source/wtf/text/StringBuilder.h |
diff --git a/third_party/WebKit/Source/wtf/text/StringBuilder.h b/third_party/WebKit/Source/wtf/text/StringBuilder.h |
index 73cc2655e83cf11ef4f42de10b749a4c8ea74ab4..527efaea5ffc88f308e2ac323090b805875e4d97 100644 |
--- a/third_party/WebKit/Source/wtf/text/StringBuilder.h |
+++ b/third_party/WebKit/Source/wtf/text/StringBuilder.h |
@@ -29,6 +29,7 @@ |
#include "wtf/WTFExport.h" |
#include "wtf/text/AtomicString.h" |
+#include "wtf/text/StringView.h" |
#include "wtf/text/WTFString.h" |
namespace WTF { |
@@ -50,26 +51,6 @@ public: |
ALWAYS_INLINE void append(const char* characters, unsigned length) { append(reinterpret_cast<const LChar*>(characters), length); } |
- void append(const String& string) |
- { |
- if (!string.length()) |
- return; |
- |
- // If we're appending to an empty string, and there is not a buffer (reserveCapacity has not been called) |
- // then just retain the string. |
- if (!m_length && !m_buffer) { |
- m_string = string; |
- m_length = string.length(); |
- m_is8Bit = m_string.is8Bit(); |
- return; |
- } |
- |
- if (string.is8Bit()) |
- append(string.characters8(), string.length()); |
- else |
- append(string.characters16(), string.length()); |
- } |
- |
void append(const StringBuilder& other) |
{ |
if (!other.m_length) |
@@ -89,7 +70,9 @@ public: |
append(other.characters16(), other.m_length); |
} |
- void append(const String& string, unsigned offset, unsigned length) |
+ // TODO(esprehn): This method is just duplicating what StringView itself |
+ // does. Remove it and replace callers with append(StringView(string, offset, length)). |
+ void append(const StringView& string, unsigned offset, unsigned length) |
{ |
if (!string.length()) |
return; |
@@ -115,12 +98,6 @@ public: |
append(string.characters16(), string.length()); |
} |
- void append(const char* characters) |
- { |
- if (characters) |
- append(characters, strlen(characters)); |
- } |
- |
void append(UChar c) |
{ |
if (m_buffer && m_length < m_buffer->length() && m_string.isNull()) { |