Changeset 140573 in webkit


Ignore:
Timestamp:
Jan 23, 2013 12:36:01 PM (11 years ago)
Author:
eric@webkit.org
Message:

HTMLCompactToken needs to include the forceQuirks bool from HTMLToken
https://bugs.webkit.org/show_bug.cgi?id=107713

Reviewed by Tony Gentilcore.

Before we were only getting "quirks mode" when the system/public identifiers
were known quirks identifiers. Now we'll correctly get quirks mode for any
parse error during DOCTYPE parsing.
This passes a bunch more tests.

  • html/parser/CompactHTMLToken.cpp:

(WebCore::CompactHTMLToken::CompactHTMLToken):

  • html/parser/CompactHTMLToken.h:

(WebCore::CompactHTMLToken::doctypeForcesQuirks):
(CompactHTMLToken):

  • html/parser/HTMLToken.h:

(WebCore::AtomicHTMLToken::AtomicHTMLToken):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r140572 r140573  
     12013-01-23  Eric Seidel  <eric@webkit.org>
     2
     3        HTMLCompactToken needs to include the forceQuirks bool from HTMLToken
     4        https://bugs.webkit.org/show_bug.cgi?id=107713
     5
     6        Reviewed by Tony Gentilcore.
     7
     8        Before we were only getting "quirks mode" when the system/public identifiers
     9        were known quirks identifiers.  Now we'll correctly get quirks mode for any
     10        parse error during DOCTYPE parsing.
     11        This passes a bunch more tests.
     12
     13        * html/parser/CompactHTMLToken.cpp:
     14        (WebCore::CompactHTMLToken::CompactHTMLToken):
     15        * html/parser/CompactHTMLToken.h:
     16        (WebCore::CompactHTMLToken::doctypeForcesQuirks):
     17        (CompactHTMLToken):
     18        * html/parser/HTMLToken.h:
     19        (WebCore::AtomicHTMLToken::AtomicHTMLToken):
     20
    1212013-01-23  Brady Eidson  <beidson@apple.com>
    222
  • trunk/Source/WebCore/html/parser/CompactHTMLToken.cpp

    r140485 r140573  
    4646    : m_type(token.type())
    4747    , m_isAll8BitData(false)
     48    , m_doctypeForcesQuirks(false)
    4849    , m_textPosition(textPosition)
    4950{
     
    5960        String systemIdentifier(token.systemIdentifier().data(), token.systemIdentifier().size());
    6061        m_attributes.append(CompactAttribute(publicIdentifier, systemIdentifier));
     62        m_doctypeForcesQuirks = token.forceQuirks();
    6163        break;
    6264    }
  • trunk/Source/WebCore/html/parser/CompactHTMLToken.h

    r140485 r140573  
    7373    const String& publicIdentifier() const { return m_attributes[0].name(); }
    7474    const String& systemIdentifier() const { return m_attributes[0].value(); }
     75    bool doctypeForcesQuirks() const { return m_doctypeForcesQuirks; }
    7576
    7677private:
     
    7879    unsigned m_selfClosing : 1;
    7980    unsigned m_isAll8BitData : 1;
     81    unsigned m_doctypeForcesQuirks: 1;
    8082
    8183    String m_data; // "name", "characters", or "data" depending on m_type
  • trunk/Source/WebCore/html/parser/HTMLToken.h

    r140569 r140573  
    311311            m_doctypeData->m_hasSystemIdentifier = true;
    312312            m_doctypeData->m_systemIdentifier.append(token.systemIdentifier().characters(), token.systemIdentifier().length());
     313            m_doctypeData->m_forceQuirks = token.doctypeForcesQuirks();
    313314            break;
    314315        case HTMLTokenTypes::EndOfFile:
Note: See TracChangeset for help on using the changeset viewer.