Changeset 142480 in webkit


Ignore:
Timestamp:
Feb 11, 2013 8:52:27 AM (11 years ago)
Author:
eric@webkit.org
Message:

Remove AttributeBase now that NEW_XML is gone
https://bugs.webkit.org/show_bug.cgi?id=109408

Reviewed by Adam Barth.

Just deleting code. HTMLToken::Attribute is now just
the real class and not a typedef.

  • html/parser/CompactHTMLToken.cpp:

(WebCore::CompactHTMLToken::CompactHTMLToken):

  • html/parser/HTMLTokenizer.cpp:

(WebCore::AtomicHTMLToken::nameForAttribute):

  • xml/parser/MarkupTokenBase.h:

(WebCore):
(MarkupTokenBase):
(Attribute):
(Range):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r142475 r142480  
     12013-02-11  Eric Seidel  <eric@webkit.org>
     2
     3        Remove AttributeBase now that NEW_XML is gone
     4        https://bugs.webkit.org/show_bug.cgi?id=109408
     5
     6        Reviewed by Adam Barth.
     7
     8        Just deleting code.  HTMLToken::Attribute is now just
     9        the real class and not a typedef.
     10
     11        * html/parser/CompactHTMLToken.cpp:
     12        (WebCore::CompactHTMLToken::CompactHTMLToken):
     13        * html/parser/HTMLTokenizer.cpp:
     14        (WebCore::AtomicHTMLToken::nameForAttribute):
     15        * xml/parser/MarkupTokenBase.h:
     16        (WebCore):
     17        (MarkupTokenBase):
     18        (Attribute):
     19        (Range):
     20
    1212013-02-11  Eric Seidel  <eric@webkit.org>
    222
  • trunk/Source/WebCore/html/parser/CompactHTMLToken.cpp

    r142029 r142480  
    6969    case HTMLTokenTypes::StartTag:
    7070        m_attributes.reserveInitialCapacity(token->attributes().size());
    71         for (Vector<AttributeBase>::const_iterator it = token->attributes().begin(); it != token->attributes().end(); ++it)
     71        for (Vector<HTMLToken::Attribute>::const_iterator it = token->attributes().begin(); it != token->attributes().end(); ++it)
    7272            m_attributes.append(CompactAttribute(String(it->m_name.data(), it->m_name.size()), String(it->m_value.data(), it->m_value.size())));
    7373        // Fall through!
  • trunk/Source/WebCore/html/parser/HTMLTokenizer.cpp

    r140403 r142480  
    5050// This has to go in a .cpp file, as the linker doesn't like it being included more than once.
    5151// We don't have an HTMLToken.cpp though, so this is the next best place.
    52 QualifiedName AtomicHTMLToken::nameForAttribute(const AttributeBase& attribute) const
     52QualifiedName AtomicHTMLToken::nameForAttribute(const HTMLToken::Attribute& attribute) const
    5353{
    5454    return QualifiedName(nullAtom, AtomicString(attribute.m_name.data(), attribute.m_name.size()), nullAtom);
  • trunk/Source/WebCore/xml/parser/MarkupTokenBase.h

    r140569 r142480  
    4646}
    4747
    48 class AttributeBase {
    49 public:
    50     class Range {
    51     public:
    52         int m_start;
    53         int m_end;
    54     };
    55 
    56     Range m_nameRange;
    57     Range m_valueRange;
    58     WTF::Vector<UChar, 32> m_name;
    59     WTF::Vector<UChar, 32> m_value;
    60 };
    61 
    62 template<typename TypeSet, typename AttributeType = AttributeBase>
     48template<typename TypeSet>
    6349class MarkupTokenBase {
    6450    WTF_MAKE_NONCOPYABLE(MarkupTokenBase);
     
    6652public:
    6753    typedef TypeSet Type;
    68     typedef AttributeType Attribute;
     54
     55    class Attribute {
     56    public:
     57        class Range {
     58        public:
     59            int m_start;
     60            int m_end;
     61        };
     62
     63        Range m_nameRange;
     64        Range m_valueRange;
     65        WTF::Vector<UChar, 32> m_name;
     66        WTF::Vector<UChar, 32> m_value;
     67    };
    6968
    7069    typedef WTF::Vector<Attribute, 10> AttributeList;
Note: See TracChangeset for help on using the changeset viewer.