Use Vector<Attribute> directly instead of encapsulating it in AttributeVector
authorcaio.oliveira@openbossa.org <caio.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2012 19:59:02 +0000 (19:59 +0000)
committercaio.oliveira@openbossa.org <caio.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2012 19:59:02 +0000 (19:59 +0000)
commit4f53615fad88b5037d0648ce0b76a4606d761628
tree0787e308f93faaea602bf6822844d43ce4afca4e
parent0dc01d453a529de97cb205728ee81f3fe49f7b99
Use Vector<Attribute> directly instead of encapsulating it in AttributeVector
https://bugs.webkit.org/show_bug.cgi?id=84413

Reviewed by Andreas Kling.

As commented in https://bugs.webkit.org/show_bug.cgi?id=79963#c16 we do not
usually subclass basic types like Vector. This patch changes code to use
Vector<Attribute> directly and move around the functionality of the former
methods to more specific helper functions or inline code at the callers.

* dom/Element.cpp:
(WebCore::Element::parserSetAttributes):
(WebCore::Element::normalizeAttributes):
* dom/Element.h:
(Element):
* dom/ElementAttributeData.cpp:
* dom/ElementAttributeData.h:
(WebCore::getAttributeFromVector):
(WebCore::ElementAttributeData::getAttributeItem):
(ElementAttributeData):
(WebCore::ElementAttributeData::attributeVector):
(WebCore::ElementAttributeData::clonedAttributeVector):
(WebCore::ElementAttributeData::getAttributeItemIndex):
(WebCore):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
* html/parser/HTMLToken.h:
(WebCore::AtomicHTMLToken::AtomicHTMLToken):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processFakeStartTag):
(WebCore::HTMLTreeBuilder::attributesForIsindexInput):
* html/parser/HTMLTreeBuilder.h:
* html/parser/TextDocumentParser.cpp:
(WebCore::TextDocumentParser::insertFakePreElement):
* xml/XMLErrors.cpp:
(WebCore::createXHTMLParserErrorHeader):
(WebCore::XMLErrors::insertErrorMessageBlock):
* xml/parser/MarkupTokenBase.h:
(WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase):
(WebCore::AtomicMarkupTokenBase::getAttributeItem):
(WebCore::AtomicMarkupTokenBase::attributes):
(AtomicMarkupTokenBase):
(WebCore::::initializeAttributes):
* xml/parser/XMLToken.h:
(WebCore::AtomicXMLToken::AtomicXMLToken):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/ElementAttributeData.cpp
Source/WebCore/dom/ElementAttributeData.h
Source/WebCore/html/parser/HTMLConstructionSite.cpp
Source/WebCore/html/parser/HTMLToken.h
Source/WebCore/html/parser/HTMLTreeBuilder.cpp
Source/WebCore/html/parser/HTMLTreeBuilder.h
Source/WebCore/html/parser/TextDocumentParser.cpp
Source/WebCore/xml/XMLErrors.cpp
Source/WebCore/xml/parser/MarkupTokenBase.h
Source/WebCore/xml/parser/XMLToken.h