summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/Text.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
commit284837daa07b29d6a63a748544a90b1f5842ac5c (patch)
treeecd258180bde91fe741e0cfd2638beb3c6da7e8e /Source/WebCore/dom/Text.cpp
parent2e2ba8ff45915f40ed3e014101269c175f2a89a0 (diff)
downloadqtwebkit-284837daa07b29d6a63a748544a90b1f5842ac5c.tar.gz
Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073)
New snapshot
Diffstat (limited to 'Source/WebCore/dom/Text.cpp')
-rw-r--r--Source/WebCore/dom/Text.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/Source/WebCore/dom/Text.cpp b/Source/WebCore/dom/Text.cpp
index 87e366362..66a16ffd7 100644
--- a/Source/WebCore/dom/Text.cpp
+++ b/Source/WebCore/dom/Text.cpp
@@ -185,7 +185,7 @@ Node::NodeType Text::nodeType() const
return TEXT_NODE;
}
-PassRefPtr<Node> Text::cloneNode(bool /*deep*/, ExceptionCode&)
+PassRefPtr<Node> Text::cloneNode(bool /*deep*/)
{
return create(document(), data());
}
@@ -301,23 +301,20 @@ void Text::willRecalcTextStyle(StyleChange)
#ifndef NDEBUG
void Text::formatForDebugger(char *buffer, unsigned length) const
{
- String result;
+ StringBuilder result;
String s;
-
- s = nodeName();
- if (s.length() > 0) {
- result += s;
- }
-
+
+ result.append(nodeName());
+
s = data();
if (s.length() > 0) {
- if (result.length() > 0)
- result += "; ";
- result += "value=";
- result += s;
+ if (result.length())
+ result.appendLiteral("; ");
+ result.appendLiteral("value=");
+ result.append(s);
}
-
- strncpy(buffer, result.utf8().data(), length - 1);
+
+ strncpy(buffer, result.toString().utf8().data(), length - 1);
}
#endif