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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2017303002: Revert of Remove StringBuilder::appendLiteral. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2087 matching lines...) Expand 10 before | Expand all | Expand 10 after
2098 void Element::formatForDebugger(char* buffer, unsigned length) const 2098 void Element::formatForDebugger(char* buffer, unsigned length) const
2099 { 2099 {
2100 StringBuilder result; 2100 StringBuilder result;
2101 String s; 2101 String s;
2102 2102
2103 result.append(nodeName()); 2103 result.append(nodeName());
2104 2104
2105 s = getIdAttribute(); 2105 s = getIdAttribute();
2106 if (s.length() > 0) { 2106 if (s.length() > 0) {
2107 if (result.length() > 0) 2107 if (result.length() > 0)
2108 result.append("; "); 2108 result.appendLiteral("; ");
2109 result.append("id="); 2109 result.appendLiteral("id=");
2110 result.append(s); 2110 result.append(s);
2111 } 2111 }
2112 2112
2113 s = getAttribute(classAttr); 2113 s = getAttribute(classAttr);
2114 if (s.length() > 0) { 2114 if (s.length() > 0) {
2115 if (result.length() > 0) 2115 if (result.length() > 0)
2116 result.append("; "); 2116 result.appendLiteral("; ");
2117 result.append("class="); 2117 result.appendLiteral("class=");
2118 result.append(s); 2118 result.append(s);
2119 } 2119 }
2120 2120
2121 strncpy(buffer, result.toString().utf8().data(), length - 1); 2121 strncpy(buffer, result.toString().utf8().data(), length - 1);
2122 } 2122 }
2123 #endif 2123 #endif
2124 2124
2125 AttrNodeList* Element::attrNodeList() 2125 AttrNodeList* Element::attrNodeList()
2126 { 2126 {
2127 return hasRareData() ? elementRareData()->attrNodeList() : nullptr; 2127 return hasRareData() ? elementRareData()->attrNodeList() : nullptr;
(...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after
3704 3704
3705 DEFINE_TRACE_WRAPPERS(Element) 3705 DEFINE_TRACE_WRAPPERS(Element)
3706 { 3706 {
3707 if (hasRareData()) { 3707 if (hasRareData()) {
3708 visitor->traceWrappers(elementRareData()); 3708 visitor->traceWrappers(elementRareData());
3709 } 3709 }
3710 ContainerNode::traceWrappers(visitor); 3710 ContainerNode::traceWrappers(visitor);
3711 } 3711 }
3712 3712
3713 } // namespace blink 3713 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698