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

Unified Diff: Source/web/WebPageSerializerImpl.cpp

Issue 180723006: Have ElementData::attributeItem() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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/web/WebElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebPageSerializerImpl.cpp
diff --git a/Source/web/WebPageSerializerImpl.cpp b/Source/web/WebPageSerializerImpl.cpp
index bf1895acbcfe6200863938448f984d07d4bb96a3..2aca2663b86be962acfd8f1789379ac98ddee295 100644
--- a/Source/web/WebPageSerializerImpl.cpp
+++ b/Source/web/WebPageSerializerImpl.cpp
@@ -309,15 +309,15 @@ void WebPageSerializerImpl::openTagToString(Element* element,
for (unsigned i = 0; i < numAttrs; i++) {
result.append(' ');
// Add attribute pair
- const Attribute *attribute = element->attributeItem(i);
- result.append(attribute->name().toString());
+ const Attribute& attribute = element->attributeItem(i);
+ result.append(attribute.name().toString());
result.appendLiteral("=\"");
- if (!attribute->value().isEmpty()) {
- const String& attrValue = attribute->value();
+ if (!attribute.value().isEmpty()) {
+ const String& attrValue = attribute.value();
// Check whether we need to replace some resource links
// with local resource paths.
- const QualifiedName& attrName = attribute->name();
+ const QualifiedName& attrName = attribute.name();
if (elementHasLegalLinkAttribute(element, attrName)) {
// For links start with "javascript:", we do not change it.
if (attrValue.startsWith("javascript:", false))
« no previous file with comments | « Source/web/WebElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698