Changeset 128204 in webkit
- Timestamp:
- Sep 11, 2012 10:40:36 AM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r128201 r128204 1 2012-09-11 Jinwoo Song <jinwoo7.song@samsung.com> 2 3 Deploy StringBuilder::appendNumber() and StringBuilder::appendLiteral() in more places 4 https://bugs.webkit.org/show_bug.cgi?id=96344 5 6 Reviewed by Benjamin Poulain. 7 8 Use StringBuilder::appendNumber() instead of String::number(). Also deploy 9 StringBuilder::appendLiteral() instead of String::append() in the surrounding code. 10 11 * css/CSSAspectRatioValue.cpp: 12 (WebCore::CSSAspectRatioValue::customCssText): 13 * platform/graphics/gpu/LoopBlinnPathProcessor.cpp: 14 (WebCore): 15 * svg/SVGPointList.cpp: 16 (WebCore::SVGPointList::valueAsString): 17 1 18 2012-09-11 Tony Chang <tony@chromium.org> 2 19 -
trunk/Source/WebCore/css/CSSAspectRatioValue.cpp
r127869 r128204 37 37 String CSSAspectRatioValue::customCssText() const 38 38 { 39 StringBuilder result; 40 result.append(String::number(m_numeratorValue)); 41 result.append("/"); 42 result.append(String::number(m_denominatorValue)); 43 return result.toString(); 39 return String::number(m_numeratorValue) + '/' + String::number(m_denominatorValue); 44 40 } 45 41 -
trunk/Source/WebCore/platform/graphics/gpu/LoopBlinnPathProcessor.cpp
r124135 r128204 70 70 { 71 71 StringBuilder builder; 72 builder.append ("[FloatRect x=");72 builder.appendLiteral("[FloatRect x="); 73 73 builder.append(String::number(arg.x())); 74 builder.append (" y=");74 builder.appendLiteral(" y="); 75 75 builder.append(String::number(arg.y())); 76 builder.append (" maxX=");76 builder.appendLiteral(" maxX="); 77 77 builder.append(String::number(arg.maxX())); 78 builder.append (" maxY=");78 builder.appendLiteral(" maxY="); 79 79 builder.append(String::number(arg.maxY())); 80 builder.append( "]");80 builder.append(']'); 81 81 return builder.toString(); 82 82 } -
trunk/Source/WebCore/svg/SVGPointList.cpp
r115555 r128204 37 37 for (unsigned i = 0; i < size; ++i) { 38 38 if (i > 0) 39 builder.append( " "); // FIXME: Shouldn't we use commas to seperate?39 builder.append(' '); // FIXME: Shouldn't we use commas to seperate? 40 40 41 41 const FloatPoint& point = at(i); -
trunk/Source/WebKit/blackberry/ChangeLog
r128200 r128204 1 2012-09-11 Jinwoo Song <jinwoo7.song@samsung.com> 2 3 Deploy StringBuilder::appendNumber() and StringBuilder::appendLiteral() in more places 4 https://bugs.webkit.org/show_bug.cgi?id=96344 5 6 Reviewed by Benjamin Poulain. 7 8 Use StringBuilder::appendNumber() instead of String::number(). Also deploy 9 StringBuilder::appendLiteral() instead of String::append() in the surrounding code. 10 11 * WebCoreSupport/DatePickerClient.cpp: 12 (WebCore::DatePickerClient::generateHTML): 13 * WebCoreSupport/SelectPopupClient.cpp: 14 (WebCore::SelectPopupClient::generateHTML): 15 1 16 2012-09-11 Jacky Jiang <zhajiang@rim.com> 2 17 -
trunk/Source/WebKit/blackberry/WebCoreSupport/DatePickerClient.cpp
r126338 r128204 51 51 { 52 52 StringBuilder source; 53 source.append ("<style>\n");53 source.appendLiteral("<style>\n"); 54 54 // Include CSS file. 55 55 source.append(popupControlBlackBerryCss, 56 56 sizeof(popupControlBlackBerryCss)); 57 source.append ("</style>\n<style>");57 source.appendLiteral("</style>\n<style>"); 58 58 source.append(timeControlBlackBerryCss, 59 59 sizeof(timeControlBlackBerryCss)); 60 source.append ("</style></head><body>\n");61 source.append("<script>\n");62 source.append("window.addEventListener('load', function () {");60 source.appendLiteral("</style></head><body>\n" 61 "<script>\n" 62 "window.addEventListener('load', function () {"); 63 63 switch (type) { 64 64 case BlackBerry::Platform::InputTypeDate: 65 source.append ("window.popupcontrol.show(\"Date\", ");65 source.appendLiteral("window.popupcontrol.show(\"Date\", "); 66 66 break; 67 67 case BlackBerry::Platform::InputTypeTime: 68 source.append ("window.popupcontrol.show(\"Time\", ");68 source.appendLiteral("window.popupcontrol.show(\"Time\", "); 69 69 break; 70 70 case BlackBerry::Platform::InputTypeDateTime: 71 source.append ("window.popupcontrol.show(\"DateTime\", ");71 source.appendLiteral("window.popupcontrol.show(\"DateTime\", "); 72 72 break; 73 73 case BlackBerry::Platform::InputTypeDateTimeLocal: 74 source.append ("window.popupcontrol.show(\"DateTimeLocal\", ");74 source.appendLiteral("window.popupcontrol.show(\"DateTimeLocal\", "); 75 75 break; 76 76 case BlackBerry::Platform::InputTypeMonth: … … 82 82 source.append("\"" + String(value.impl()) + "\", "); 83 83 else 84 source.append ("0, ");84 source.appendLiteral("0, "); 85 85 86 86 if (!min.isEmpty()) 87 87 source.append(String(min.impl()) + ", "); 88 88 else 89 source.append ("0, ");89 source.appendLiteral("0, "); 90 90 if (!max.isEmpty()) 91 91 source.append(String(max.impl()) + ", "); 92 92 else 93 source.append ("0, ");93 source.appendLiteral("0, "); 94 94 source.append(String::number(step)); 95 source.append ("); \n }); \n");95 source.appendLiteral("); \n }); \n"); 96 96 source.append(timeControlBlackBerryJs, sizeof(timeControlBlackBerryJs)); 97 source.append ("</script>\n");98 source.append("</body> </html>\n");97 source.appendLiteral("</script>\n" 98 "</body> </html>\n"); 99 99 m_source = source.toString(); 100 100 } -
trunk/Source/WebKit/blackberry/WebCoreSupport/SelectPopupClient.cpp
r126338 r128204 67 67 { 68 68 StringBuilder source; 69 source.append ("<style>\n");69 source.appendLiteral("<style>\n"); 70 70 // Include CSS file. 71 71 source.append(popupControlBlackBerryCss, 72 72 sizeof(popupControlBlackBerryCss)); 73 source.append ("</style>\n<style>");73 source.appendLiteral("</style>\n<style>"); 74 74 source.append(selectControlBlackBerryCss, 75 75 sizeof(selectControlBlackBerryCss)); 76 source.append ("</style></head><body>\n");77 source.append("<script>\n");78 source.append("window.addEventListener('load', function () {");76 source.appendLiteral("</style></head><body>\n" 77 "<script>\n" 78 "window.addEventListener('load', function () {"); 79 79 if (m_multiple) 80 source.append ("window.select.show(true, ");80 source.appendLiteral("window.select.show(true, "); 81 81 else 82 source.append ("window.select.show(false, ");82 source.appendLiteral("window.select.show(false, "); 83 83 // Add labels. 84 source.append( "[");84 source.append('['); 85 85 for (int i = 0; i < size; i++) { 86 86 source.append("'" + String(labels[i].impl()).replace('\\', "\\\\").replace('\'', "\\'") + "'"); 87 87 // Don't append ',' to last element. 88 88 if (i != size - 1) 89 source.append (", ");90 } 91 source.append ("], ");89 source.appendLiteral(", "); 90 } 91 source.appendLiteral("], "); 92 92 // Add enables. 93 source.append("["); 94 for (int i = 0; i < size; i++) { 95 source.append(enableds[i]? "true" : "false"); 96 // Don't append ',' to last element. 97 if (i != size - 1) 98 source.append(", "); 99 } 100 source.append("], "); 93 source.append('['); 94 for (int i = 0; i < size; i++) { 95 if (enableds[i]) 96 source.appendLiteral("true"); 97 else 98 source.appendLiteral("false"); 99 // Don't append ',' to last element. 100 if (i != size - 1) 101 source.appendLiteral(", "); 102 } 103 source.appendLiteral("], "); 101 104 // Add itemType. 102 source.append( "[");103 for (int i = 0; i < size; i++) { 104 source.append (String::number(itemType[i]));105 // Don't append ',' to last element. 106 if (i != size - 1) 107 source.append (", ");108 } 109 source.append ("], ");105 source.append('['); 106 for (int i = 0; i < size; i++) { 107 source.appendNumber(itemType[i]); 108 // Don't append ',' to last element. 109 if (i != size - 1) 110 source.appendLiteral(", "); 111 } 112 source.appendLiteral("], "); 110 113 // Add selecteds 111 source.append("["); 112 for (int i = 0; i < size; i++) { 113 source.append(selecteds[i]? "true" : "false"); 114 // Don't append ',' to last element. 115 if (i != size - 1) 116 source.append(", "); 117 } 118 source.append("] "); 119 source.append(", 'Cancel'"); 114 source.append('['); 115 for (int i = 0; i < size; i++) { 116 if (selecteds[i]) 117 source.appendLiteral("true"); 118 else 119 source.appendLiteral("false"); 120 // Don't append ',' to last element. 121 if (i != size - 1) 122 source.appendLiteral(", "); 123 } 124 source.appendLiteral("] " 125 ", 'Cancel'"); 120 126 // If multi-select, add OK button for confirm. 121 127 if (m_multiple) 122 source.append (", 'OK'");123 source.append ("); \n }); \n");128 source.appendLiteral(", 'OK'"); 129 source.appendLiteral("); \n }); \n"); 124 130 source.append(selectControlBlackBerryJs, sizeof(selectControlBlackBerryJs)); 125 source.append ("</script>\n");126 source.append("</body> </html>\n");131 source.appendLiteral("</script>\n" 132 "</body> </html>\n"); 127 133 m_source = source.toString(); 128 134 } -
trunk/Source/WebKit2/ChangeLog
r128202 r128204 1 2012-09-11 Jinwoo Song <jinwoo7.song@samsung.com> 2 3 Deploy StringBuilder::appendNumber() and StringBuilder::appendLiteral() in more places 4 https://bugs.webkit.org/show_bug.cgi?id=96344 5 6 Reviewed by Benjamin Poulain. 7 8 Use StringBuilder::appendNumber() instead of String::number(). Also deploy 9 StringBuilder::appendLiteral() instead of String::append() in the surrounding code. 10 11 * Shared/WebMemorySampler.cpp: 12 (WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile): 13 * UIProcess/InspectorServer/WebSocketServerConnection.cpp: 14 (WebKit::WebSocketServerConnection::sendHTTPResponseHeader): 15 * UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp: 16 (WebKit::WebInspectorServer::inspectorUrlForPageID): 17 (WebKit::WebInspectorServer::buildPageList): 18 1 19 2012-09-11 Anders Carlsson <andersca@apple.com> 2 20 -
trunk/Source/WebKit2/Shared/WebMemorySampler.cpp
r127828 r128204 178 178 for (size_t i = 0; i < memoryStats.values.size(); ++i) { 179 179 statString.append(separator); 180 statString.append (String::number(memoryStats.values[i]));180 statString.appendNumber(memoryStats.values[i]); 181 181 } 182 182 } -
trunk/Source/WebKit2/UIProcess/InspectorServer/WebSocketServerConnection.cpp
r126926 r128204 100 100 { 101 101 StringBuilder builder; 102 builder.append ("HTTP/1.1 ");103 builder.append (String::number(statusCode));104 builder.append( " ");102 builder.appendLiteral("HTTP/1.1 "); 103 builder.appendNumber(statusCode); 104 builder.append(' '); 105 105 builder.append(statusText); 106 builder.append ("\r\n");106 builder.appendLiteral("\r\n"); 107 107 HTTPHeaderMap::const_iterator end = headerFields.end(); 108 108 for (HTTPHeaderMap::const_iterator it = headerFields.begin(); it != end; ++it) { 109 109 builder.append(it->first); 110 builder.append(": "); 111 builder.append(it->second + "\r\n"); 112 } 113 builder.append("\r\n"); 110 builder.appendLiteral(": "); 111 builder.append(it->second); 112 builder.appendLiteral("\r\n"); 113 } 114 builder.appendLiteral("\r\n"); 114 115 115 116 CString header = builder.toString().latin1(); -
trunk/Source/WebKit2/UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp
r127098 r128204 69 69 return String(); 70 70 StringBuilder builder; 71 builder.append ("http://");71 builder.appendLiteral("http://"); 72 72 builder.append(bindAddress()); 73 builder.append( ":");74 builder.append (String::number(port()));73 builder.append(':'); 74 builder.appendNumber(port()); 75 75 builder.append(remoteInspectorPagePath()); 76 builder.append (String::number(pageId));76 builder.appendNumber(pageId); 77 77 return builder.toString(); 78 78 } … … 81 81 { 82 82 StringBuilder builder; 83 builder.append ("[ ");83 builder.appendLiteral("[ "); 84 84 ClientMap::iterator end = m_clientMap.end(); 85 85 for (ClientMap::iterator it = m_clientMap.begin(); it != end; ++it) { 86 86 WebPageProxy* webPage = it->second->page(); 87 87 if (it != m_clientMap.begin()) 88 builder.append(", "); 89 builder.append("{ \"id\": " + String::number(it->first)); 90 builder.append(", \"title\": \""); 88 builder.appendLiteral(", "); 89 builder.appendLiteral("{ \"id\": "); 90 builder.appendNumber(it->first); 91 builder.appendLiteral(", \"title\": \""); 91 92 builder.append(webPage->pageTitle()); 92 builder.append ("\", \"url\": \"");93 builder.appendLiteral("\", \"url\": \""); 93 94 builder.append(webPage->activeURL()); 94 builder.append("\", \"inspectorUrl\": \""); 95 builder.append(remoteInspectorPagePath() + String::number(it->first)); 96 builder.append("\" }"); 95 builder.appendLiteral("\", \"inspectorUrl\": \""); 96 builder.append(remoteInspectorPagePath()); 97 builder.appendNumber(it->first); 98 builder.appendLiteral("\" }"); 97 99 } 98 builder.append (" ]");100 builder.appendLiteral(" ]"); 99 101 CString cstr = builder.toString().utf8(); 100 102 data.append(cstr.data(), cstr.length());
Note: See TracChangeset
for help on using the changeset viewer.