Changeset 143673 in webkit
- Timestamp:
- Feb 21, 2013 5:27:56 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r143670 r143673 1 2013-02-21 Eric Seidel <eric@webkit.org> 2 3 tables/mozilla/bugs/bug8950.html fails with threaded parser due to attribute duplication 4 https://bugs.webkit.org/show_bug.cgi?id=110532 5 6 Reviewed by Adam Barth. 7 8 This is a very basic failure which we should have caught earlier with the html5lib parser 9 tests, except those use document.write and thus avoid the threaded parser. 10 11 AtomicHTMLToken expects its attributes to be unique. We were not doing that for the 12 CompactHTMLToken path, and this ancient mozilla table test caught that. 13 14 Fixes tables/mozilla/bugs/bug8950.html. 15 16 * html/parser/AtomicHTMLToken.h: 17 (WebCore::AtomicHTMLToken::AtomicHTMLToken): 18 (WebCore::AtomicHTMLToken::initializeAttributes): 19 1 20 2013-02-21 Adam Barth <abarth@webkit.org> 2 21 -
trunk/Source/WebCore/html/parser/AtomicHTMLToken.h
r143415 r143673 202 202 case HTMLToken::StartTag: 203 203 m_attributes.reserveInitialCapacity(token.attributes().size()); 204 for (Vector<CompactHTMLToken::Attribute>::const_iterator it = token.attributes().begin(); it != token.attributes().end(); ++it) 205 m_attributes.append(Attribute(QualifiedName(nullAtom, it->name, nullAtom), it->value)); 204 for (Vector<CompactHTMLToken::Attribute>::const_iterator it = token.attributes().begin(); it != token.attributes().end(); ++it) { 205 QualifiedName name(nullAtom, it->name, nullAtom); 206 // FIXME: This is N^2 for the number of attributes. 207 if (!findAttributeInVector(m_attributes, name)) 208 m_attributes.append(Attribute(name, it->value)); 209 } 206 210 // Fall through! 207 211 case HTMLToken::EndTag: … … 301 305 AtomicString value(attribute.value); 302 306 const QualifiedName& name = nameForAttribute(attribute); 307 // FIXME: This is N^2 for the number of attributes. 303 308 if (!findAttributeInVector(m_attributes, name)) 304 309 m_attributes.append(Attribute(name, value));
Note: See TracChangeset
for help on using the changeset viewer.