Index: Source/core/html/parser/CompactHTMLToken.cpp |
diff --git a/Source/core/html/parser/CompactHTMLToken.cpp b/Source/core/html/parser/CompactHTMLToken.cpp |
index ea04f824ab71e664be3dccd663ee5e67eb623026..317a366c93d67ae208dcee241bfdff0b8cf989f0 100644 |
--- a/Source/core/html/parser/CompactHTMLToken.cpp |
+++ b/Source/core/html/parser/CompactHTMLToken.cpp |
@@ -63,8 +63,8 @@ CompactHTMLToken::CompactHTMLToken(const HTMLToken* token, const TextPosition& t |
break; |
case HTMLToken::StartTag: |
m_attributes.reserveInitialCapacity(token->attributes().size()); |
- for (Vector<HTMLToken::Attribute>::const_iterator it = token->attributes().begin(); it != token->attributes().end(); ++it) |
- m_attributes.append(Attribute(attemptStaticStringCreation(it->name, Likely8Bit), StringImpl::create8BitIfPossible(it->value))); |
+ for (const auto& attribute : token->attributes()) |
+ m_attributes.append(Attribute(attemptStaticStringCreation(attribute.name, Likely8Bit), StringImpl::create8BitIfPossible(attribute.value))); |
// Fall through! |
case HTMLToken::EndTag: |
m_selfClosing = token->selfClosing(); |
@@ -92,10 +92,10 @@ const CompactHTMLToken::Attribute* CompactHTMLToken::getAttributeItem(const Qual |
bool CompactHTMLToken::isSafeToSendToAnotherThread() const |
{ |
- for (Vector<Attribute>::const_iterator it = m_attributes.begin(); it != m_attributes.end(); ++it) { |
- if (!it->name.isSafeToSendToAnotherThread()) |
+ for (const auto& attribute : m_attributes) { |
+ if (!attribute.name.isSafeToSendToAnotherThread()) |
return false; |
- if (!it->value.isSafeToSendToAnotherThread()) |
+ if (!attribute.value.isSafeToSendToAnotherThread()) |
return false; |
} |
return m_data.isSafeToSendToAnotherThread(); |