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

Side by Side Diff: Source/core/inspector/InspectorDOMAgent.cpp

Issue 124943003: Remove 'String::append' from some of the blink source. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removing the CustomFilterValidatedProgram.cpp from the patch(File is deleted in r164847) Created 6 years, 11 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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1450 int id = bind(node, nodesMap); 1450 int id = bind(node, nodesMap);
1451 String nodeName; 1451 String nodeName;
1452 String localName; 1452 String localName;
1453 String nodeValue; 1453 String nodeValue;
1454 1454
1455 switch (node->nodeType()) { 1455 switch (node->nodeType()) {
1456 case Node::TEXT_NODE: 1456 case Node::TEXT_NODE:
1457 case Node::COMMENT_NODE: 1457 case Node::COMMENT_NODE:
1458 case Node::CDATA_SECTION_NODE: 1458 case Node::CDATA_SECTION_NODE:
1459 nodeValue = node->nodeValue(); 1459 nodeValue = node->nodeValue();
1460 if (nodeValue.length() > maxTextSize) { 1460 if (nodeValue.length() > maxTextSize)
1461 nodeValue = nodeValue.left(maxTextSize); 1461 nodeValue = nodeValue.left(maxTextSize) + ellipsisUChar;
1462 nodeValue.append(ellipsisUChar);
1463 }
1464 break; 1462 break;
1465 case Node::ATTRIBUTE_NODE: 1463 case Node::ATTRIBUTE_NODE:
1466 localName = node->localName(); 1464 localName = node->localName();
1467 break; 1465 break;
1468 case Node::DOCUMENT_FRAGMENT_NODE: 1466 case Node::DOCUMENT_FRAGMENT_NODE:
1469 case Node::DOCUMENT_NODE: 1467 case Node::DOCUMENT_NODE:
1470 case Node::ELEMENT_NODE: 1468 case Node::ELEMENT_NODE:
1471 default: 1469 default:
1472 nodeName = node->nodeName(); 1470 nodeName = node->nodeName();
1473 localName = node->localName(); 1471 localName = node->localName();
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
2030 if (!m_documentNodeToIdMap.contains(m_document)) { 2028 if (!m_documentNodeToIdMap.contains(m_document)) {
2031 RefPtr<TypeBuilder::DOM::Node> root; 2029 RefPtr<TypeBuilder::DOM::Node> root;
2032 getDocument(errorString, root); 2030 getDocument(errorString, root);
2033 return errorString->isEmpty(); 2031 return errorString->isEmpty();
2034 } 2032 }
2035 return true; 2033 return true;
2036 } 2034 }
2037 2035
2038 } // namespace WebCore 2036 } // namespace WebCore
2039 2037
OLDNEW
« no previous file with comments | « Source/core/fetch/XSLStyleSheetResource.cpp ('k') | Source/core/inspector/NetworkResourcesData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698