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

Unified Diff: Source/core/inspector/InspectorDOMAgent.cpp

Issue 337753005: Make iterator for Element's attributes more lightweight (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Proper rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/inspector/DOMPatchSupport.cpp ('k') | Source/core/page/PageSerializer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorDOMAgent.cpp
diff --git a/Source/core/inspector/InspectorDOMAgent.cpp b/Source/core/inspector/InspectorDOMAgent.cpp
index 8cf962e87e9c346f6df13bdf2c6cafd77a6838ef..aec6ac9e0ce8ebc167334be3a5bc15890a84c399 100644
--- a/Source/core/inspector/InspectorDOMAgent.cpp
+++ b/Source/core/inspector/InspectorDOMAgent.cpp
@@ -724,9 +724,9 @@ void InspectorDOMAgent::setAttributesAsText(ErrorString* errorString, int elemen
}
bool foundOriginalAttribute = false;
- AttributeIteratorAccessor attributes = parsedElement->attributesIterator();
- AttributeConstIterator end = attributes.end();
- for (AttributeConstIterator it = attributes.begin(); it != end; ++it) {
+ AttributeCollection attributes = parsedElement->attributes();
+ AttributeCollection::const_iterator end = attributes.end();
+ for (AttributeCollection::const_iterator it = attributes.begin(); it != end; ++it) {
// Add attribute pair
String attributeName = it->name().toString();
if (shouldIgnoreCase)
@@ -984,9 +984,9 @@ void InspectorDOMAgent::performSearch(ErrorString*, const String& whitespaceTrim
if (!element->hasAttributes())
break;
- AttributeIteratorAccessor attributes = element->attributesIterator();
- AttributeConstIterator end = attributes.end();
- for (AttributeConstIterator it = attributes.begin(); it != end; ++it) {
+ AttributeCollection attributes = element->attributes();
+ AttributeCollection::const_iterator end = attributes.end();
+ for (AttributeCollection::const_iterator it = attributes.begin(); it != end; ++it) {
// Add attribute pair
if (it->localName().find(whitespaceTrimmedQuery, 0, false) != kNotFound) {
resultCollector.add(node);
@@ -1600,9 +1600,9 @@ PassRefPtr<TypeBuilder::Array<String> > InspectorDOMAgent::buildArrayForElementA
// Go through all attributes and serialize them.
if (!element->hasAttributes())
return attributesValue.release();
- AttributeIteratorAccessor attributes = element->attributesIterator();
- AttributeConstIterator end = attributes.end();
- for (AttributeConstIterator it = attributes.begin(); it != end; ++it) {
+ AttributeCollection attributes = element->attributes();
+ AttributeCollection::const_iterator end = attributes.end();
+ for (AttributeCollection::const_iterator it = attributes.begin(); it != end; ++it) {
// Add attribute pair
attributesValue->addItem(it->name().toString());
attributesValue->addItem(it->value());
« no previous file with comments | « Source/core/inspector/DOMPatchSupport.cpp ('k') | Source/core/page/PageSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698