Changeset 123577 in webkit


Ignore:
Timestamp:
Jul 24, 2012 10:47:29 PM (12 years ago)
Author:
kseo@webkit.org
Message:

Read tag names and attributes from the saved tokens where possible.
https://bugs.webkit.org/show_bug.cgi?id=92079

Reviewed by Adam Barth.

Read tag names and attributes from the saved tokens, not from the DOM.
Also added convenient methods such as hasLocalName, hasTagName, localName,
isElementNode and isDocumentFragmentNode to HTMLStackItem class.

No new tests, covered by existing tests.

  • html/parser/HTMLConstructionSite.cpp:

(WebCore::HTMLNames::hasImpliedEndTag):
(WebCore::HTMLNames::causesFosterParenting):
(WebCore::HTMLConstructionSite::generateImpliedEndTagsWithExclusion):
(WebCore::HTMLConstructionSite::generateImpliedEndTags):
(WebCore::HTMLConstructionSite::shouldFosterParent):

  • html/parser/HTMLConstructionSite.h:

(WebCore::HTMLConstructionSite::currentStackItem):

  • html/parser/HTMLElementStack.cpp:

(WebCore::HTMLNames::isNumberedHeaderElement):
(WebCore::HTMLNames::isRootNode):
(WebCore::HTMLNames::isScopeMarker):
(WebCore::HTMLNames::isListItemScopeMarker):
(WebCore::HTMLNames::isTableScopeMarker):
(WebCore::HTMLNames::isTableBodyScopeMarker):
(WebCore::HTMLNames::isTableRowScopeMarker):
(WebCore::HTMLNames::isForeignContentScopeMarker):
(WebCore::HTMLNames::isButtonScopeMarker):
(WebCore::HTMLNames::isSelectScopeMarker):
(WebCore::HTMLElementStack::ElementRecord::replaceElement):
(WebCore::HTMLElementStack::popUntilNumberedHeaderElementPopped):
(WebCore::HTMLElementStack::popUntilTableScopeMarker):
(WebCore::HTMLElementStack::popUntilTableBodyScopeMarker):
(WebCore::HTMLElementStack::popUntilTableRowScopeMarker):
(WebCore::HTMLElementStack::isMathMLTextIntegrationPoint):
(WebCore::HTMLElementStack::isHTMLIntegrationPoint):
(WebCore::HTMLElementStack::popUntilForeignContentScopeMarker):
(WebCore::HTMLElementStack::pushRootNode):
(WebCore::HTMLElementStack::oneBelowTop):
(WebCore::HTMLElementStack::topmost):
(WebCore):
(WebCore::inScopeCommon):
(WebCore::HTMLElementStack::hasNumberedHeaderElementInScope):
(WebCore::HTMLElementStack::inScope):

  • html/parser/HTMLElementStack.h:

(WebCore::HTMLElementStack::topStackItem):
(HTMLElementStack):
(WebCore::isInHTMLNamespace):

  • html/parser/HTMLStackItem.h:

(WebCore::HTMLStackItem::isDocumentFragmentNode):
(WebCore::HTMLStackItem::isElementNode):
(HTMLStackItem):
(WebCore::HTMLStackItem::hasLocalName):
(WebCore::HTMLStackItem::hasTagName):
(WebCore::HTMLStackItem::HTMLStackItem):

  • html/parser/HTMLTreeBuilder.cpp:

(WebCore):
(WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
(WebCore::HTMLTreeBuilder::processFakeEndTag):
(WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
(WebCore::HTMLTreeBuilder::processStartTagForInBody):
(WebCore::HTMLTreeBuilder::processStartTag):
(WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
(WebCore::HTMLTreeBuilder::furthestBlockForFormattingElement):
(WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
(WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
(WebCore::HTMLTreeBuilder::processEndTagForInCell):
(WebCore::HTMLTreeBuilder::processEndTagForInBody):
(WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption):
(WebCore::HTMLTreeBuilder::processTrEndTagForInRow):
(WebCore::HTMLTreeBuilder::processEndTag):
(WebCore::HTMLTreeBuilder::processCharacterBuffer):
(WebCore::HTMLTreeBuilder::processEndOfFile):
(WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
(WebCore::HTMLTreeBuilder::processTokenInForeignContent):

  • html/parser/HTMLTreeBuilder.h:
Location:
trunk/Source/WebCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r123572 r123577  
     12012-07-24  Kwang Yul Seo  <skyul@company100.net>
     2
     3        Read tag names and attributes from the saved tokens where possible.
     4        https://bugs.webkit.org/show_bug.cgi?id=92079
     5
     6        Reviewed by Adam Barth.
     7
     8        Read tag names and attributes from the saved tokens, not from the DOM.
     9        Also added convenient methods such as hasLocalName, hasTagName, localName,
     10        isElementNode and isDocumentFragmentNode to HTMLStackItem class.
     11
     12        No new tests, covered by existing tests.
     13
     14        * html/parser/HTMLConstructionSite.cpp:
     15        (WebCore::HTMLNames::hasImpliedEndTag):
     16        (WebCore::HTMLNames::causesFosterParenting):
     17        (WebCore::HTMLConstructionSite::generateImpliedEndTagsWithExclusion):
     18        (WebCore::HTMLConstructionSite::generateImpliedEndTags):
     19        (WebCore::HTMLConstructionSite::shouldFosterParent):
     20        * html/parser/HTMLConstructionSite.h:
     21        (WebCore::HTMLConstructionSite::currentStackItem):
     22        * html/parser/HTMLElementStack.cpp:
     23        (WebCore::HTMLNames::isNumberedHeaderElement):
     24        (WebCore::HTMLNames::isRootNode):
     25        (WebCore::HTMLNames::isScopeMarker):
     26        (WebCore::HTMLNames::isListItemScopeMarker):
     27        (WebCore::HTMLNames::isTableScopeMarker):
     28        (WebCore::HTMLNames::isTableBodyScopeMarker):
     29        (WebCore::HTMLNames::isTableRowScopeMarker):
     30        (WebCore::HTMLNames::isForeignContentScopeMarker):
     31        (WebCore::HTMLNames::isButtonScopeMarker):
     32        (WebCore::HTMLNames::isSelectScopeMarker):
     33        (WebCore::HTMLElementStack::ElementRecord::replaceElement):
     34        (WebCore::HTMLElementStack::popUntilNumberedHeaderElementPopped):
     35        (WebCore::HTMLElementStack::popUntilTableScopeMarker):
     36        (WebCore::HTMLElementStack::popUntilTableBodyScopeMarker):
     37        (WebCore::HTMLElementStack::popUntilTableRowScopeMarker):
     38        (WebCore::HTMLElementStack::isMathMLTextIntegrationPoint):
     39        (WebCore::HTMLElementStack::isHTMLIntegrationPoint):
     40        (WebCore::HTMLElementStack::popUntilForeignContentScopeMarker):
     41        (WebCore::HTMLElementStack::pushRootNode):
     42        (WebCore::HTMLElementStack::oneBelowTop):
     43        (WebCore::HTMLElementStack::topmost):
     44        (WebCore):
     45        (WebCore::inScopeCommon):
     46        (WebCore::HTMLElementStack::hasNumberedHeaderElementInScope):
     47        (WebCore::HTMLElementStack::inScope):
     48        * html/parser/HTMLElementStack.h:
     49        (WebCore::HTMLElementStack::topStackItem):
     50        (HTMLElementStack):
     51        (WebCore::isInHTMLNamespace):
     52        * html/parser/HTMLStackItem.h:
     53        (WebCore::HTMLStackItem::isDocumentFragmentNode):
     54        (WebCore::HTMLStackItem::isElementNode):
     55        (HTMLStackItem):
     56        (WebCore::HTMLStackItem::hasLocalName):
     57        (WebCore::HTMLStackItem::hasTagName):
     58        (WebCore::HTMLStackItem::HTMLStackItem):
     59        * html/parser/HTMLTreeBuilder.cpp:
     60        (WebCore):
     61        (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
     62        (WebCore::HTMLTreeBuilder::processFakeEndTag):
     63        (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
     64        (WebCore::HTMLTreeBuilder::processStartTagForInBody):
     65        (WebCore::HTMLTreeBuilder::processStartTag):
     66        (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
     67        (WebCore::HTMLTreeBuilder::furthestBlockForFormattingElement):
     68        (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
     69        (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
     70        (WebCore::HTMLTreeBuilder::processEndTagForInCell):
     71        (WebCore::HTMLTreeBuilder::processEndTagForInBody):
     72        (WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption):
     73        (WebCore::HTMLTreeBuilder::processTrEndTagForInRow):
     74        (WebCore::HTMLTreeBuilder::processEndTag):
     75        (WebCore::HTMLTreeBuilder::processCharacterBuffer):
     76        (WebCore::HTMLTreeBuilder::processEndOfFile):
     77        (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
     78        (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
     79        * html/parser/HTMLTreeBuilder.h:
     80
    1812012-07-24  Hironori Bono  <hbono@chromium.org>
    282
  • trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp

    r123399 r123577  
    6161namespace {
    6262
    63 bool hasImpliedEndTag(ContainerNode* node)
    64 {
    65     return node->hasTagName(ddTag)
    66         || node->hasTagName(dtTag)
    67         || node->hasTagName(liTag)
    68         || node->hasTagName(optionTag)
    69         || node->hasTagName(optgroupTag)
    70         || node->hasTagName(pTag)
    71         || node->hasTagName(rpTag)
    72         || node->hasTagName(rtTag);
    73 }
    74 
    75 bool causesFosterParenting(const QualifiedName& tagName)
    76 {
    77     return tagName == tableTag
    78         || tagName == tbodyTag
    79         || tagName == tfootTag
    80         || tagName == theadTag
    81         || tagName == trTag;
     63bool hasImpliedEndTag(const HTMLStackItem* item)
     64{
     65    return item->hasTagName(ddTag)
     66        || item->hasTagName(dtTag)
     67        || item->hasTagName(liTag)
     68        || item->hasTagName(optionTag)
     69        || item->hasTagName(optgroupTag)
     70        || item->hasTagName(pTag)
     71        || item->hasTagName(rpTag)
     72        || item->hasTagName(rtTag);
     73}
     74
     75bool causesFosterParenting(const HTMLStackItem* item)
     76{
     77    return item->hasTagName(tableTag)
     78        || item->hasTagName(tbodyTag)
     79        || item->hasTagName(tfootTag)
     80        || item->hasTagName(theadTag)
     81        || item->hasTagName(trTag);
    8282}
    8383
     
    466466void HTMLConstructionSite::generateImpliedEndTagsWithExclusion(const AtomicString& tagName)
    467467{
    468     while (hasImpliedEndTag(currentNode()) && !currentNode()->hasLocalName(tagName))
     468    while (hasImpliedEndTag(currentStackItem()) && !currentStackItem()->hasLocalName(tagName))
    469469        m_openElements.pop();
    470470}
     
    472472void HTMLConstructionSite::generateImpliedEndTags()
    473473{
    474     while (hasImpliedEndTag(currentNode()))
     474    while (hasImpliedEndTag(currentStackItem()))
    475475        m_openElements.pop();
    476476}
     
    496496{
    497497    return m_redirectAttachToFosterParent
    498         && currentNode()->isElementNode()
    499         && causesFosterParenting(currentElement()->tagQName());
     498        && currentStackItem()->isElementNode()
     499        && causesFosterParenting(currentStackItem());
    500500}
    501501
  • trunk/Source/WebCore/html/parser/HTMLConstructionSite.h

    r123399 r123577  
    122122    Element* currentElement() const { return m_openElements.top(); }
    123123    ContainerNode* currentNode() const { return m_openElements.topNode(); }
     124    HTMLStackItem* currentStackItem() const { return m_openElements.topStackItem(); }
    124125    Element* oneBelowTop() const { return m_openElements.oneBelowTop(); }
    125126
  • trunk/Source/WebCore/html/parser/HTMLElementStack.cpp

    r123399 r123577  
    4141namespace {
    4242
    43 inline bool isNumberedHeaderElement(ContainerNode* node)
    44 {
    45     return node->hasTagName(h1Tag)
    46         || node->hasTagName(h2Tag)
    47         || node->hasTagName(h3Tag)
    48         || node->hasTagName(h4Tag)
    49         || node->hasTagName(h5Tag)
    50         || node->hasTagName(h6Tag);
     43inline bool isNumberedHeaderElement(HTMLStackItem* item)
     44{
     45    return item->hasTagName(h1Tag)
     46        || item->hasTagName(h2Tag)
     47        || item->hasTagName(h3Tag)
     48        || item->hasTagName(h4Tag)
     49        || item->hasTagName(h5Tag)
     50        || item->hasTagName(h6Tag);
    5151}
    5252   
    53 inline bool isRootNode(ContainerNode* node)
    54 {
    55     return node->nodeType() == Node::DOCUMENT_FRAGMENT_NODE
    56         || node->hasTagName(htmlTag);
    57 }
    58 
    59 inline bool isScopeMarker(ContainerNode* node)
    60 {
    61     return node->hasTagName(appletTag)
    62         || node->hasTagName(captionTag)
    63         || node->hasTagName(marqueeTag)
    64         || node->hasTagName(objectTag)
    65         || node->hasTagName(tableTag)
    66         || node->hasTagName(tdTag)
    67         || node->hasTagName(thTag)
    68         || node->hasTagName(MathMLNames::miTag)
    69         || node->hasTagName(MathMLNames::moTag)
    70         || node->hasTagName(MathMLNames::mnTag)
    71         || node->hasTagName(MathMLNames::msTag)
    72         || node->hasTagName(MathMLNames::mtextTag)
    73         || node->hasTagName(MathMLNames::annotation_xmlTag)
    74         || node->hasTagName(SVGNames::foreignObjectTag)
    75         || node->hasTagName(SVGNames::descTag)
    76         || node->hasTagName(SVGNames::titleTag)
    77         || isRootNode(node);
    78 }
    79 
    80 inline bool isListItemScopeMarker(ContainerNode* node)
    81 {
    82     return isScopeMarker(node)
    83         || node->hasTagName(olTag)
    84         || node->hasTagName(ulTag);
    85 }
    86 
    87 inline bool isTableScopeMarker(ContainerNode* node)
    88 {
    89     return node->hasTagName(tableTag)
    90         || isRootNode(node);
    91 }
    92 
    93 inline bool isTableBodyScopeMarker(ContainerNode* node)
    94 {
    95     return node->hasTagName(tbodyTag)
    96         || node->hasTagName(tfootTag)
    97         || node->hasTagName(theadTag)
    98         || isRootNode(node);
    99 }
    100 
    101 inline bool isTableRowScopeMarker(ContainerNode* node)
    102 {
    103     return node->hasTagName(trTag)
    104         || isRootNode(node);
    105 }
    106 
    107 inline bool isForeignContentScopeMarker(ContainerNode* node)
    108 {
    109     return HTMLElementStack::isMathMLTextIntegrationPoint(node)
    110         || HTMLElementStack::isHTMLIntegrationPoint(node)
    111         || isInHTMLNamespace(node);
    112 }
    113 
    114 inline bool isButtonScopeMarker(ContainerNode* node)
    115 {
    116     return isScopeMarker(node)
    117         || node->hasTagName(buttonTag);
    118 }
    119 
    120 inline bool isSelectScopeMarker(ContainerNode* node)
    121 {
    122     return !node->hasTagName(optgroupTag)
    123         && !node->hasTagName(optionTag);
     53inline bool isRootNode(HTMLStackItem* item)
     54{
     55    return item->isDocumentFragmentNode()
     56        || item->hasTagName(htmlTag);
     57}
     58
     59inline bool isScopeMarker(HTMLStackItem* item)
     60{
     61    return item->hasTagName(appletTag)
     62        || item->hasTagName(captionTag)
     63        || item->hasTagName(marqueeTag)
     64        || item->hasTagName(objectTag)
     65        || item->hasTagName(tableTag)
     66        || item->hasTagName(tdTag)
     67        || item->hasTagName(thTag)
     68        || item->hasTagName(MathMLNames::miTag)
     69        || item->hasTagName(MathMLNames::moTag)
     70        || item->hasTagName(MathMLNames::mnTag)
     71        || item->hasTagName(MathMLNames::msTag)
     72        || item->hasTagName(MathMLNames::mtextTag)
     73        || item->hasTagName(MathMLNames::annotation_xmlTag)
     74        || item->hasTagName(SVGNames::foreignObjectTag)
     75        || item->hasTagName(SVGNames::descTag)
     76        || item->hasTagName(SVGNames::titleTag)
     77        || isRootNode(item);
     78}
     79
     80inline bool isListItemScopeMarker(HTMLStackItem* item)
     81{
     82    return isScopeMarker(item)
     83        || item->hasTagName(olTag)
     84        || item->hasTagName(ulTag);
     85}
     86
     87inline bool isTableScopeMarker(HTMLStackItem* item)
     88{
     89    return item->hasTagName(tableTag)
     90        || isRootNode(item);
     91}
     92
     93inline bool isTableBodyScopeMarker(HTMLStackItem* item)
     94{
     95    return item->hasTagName(tbodyTag)
     96        || item->hasTagName(tfootTag)
     97        || item->hasTagName(theadTag)
     98        || isRootNode(item);
     99}
     100
     101inline bool isTableRowScopeMarker(HTMLStackItem* item)
     102{
     103    return item->hasTagName(trTag)
     104        || isRootNode(item);
     105}
     106
     107inline bool isForeignContentScopeMarker(HTMLStackItem* item)
     108{
     109    return HTMLElementStack::isMathMLTextIntegrationPoint(item)
     110        || HTMLElementStack::isHTMLIntegrationPoint(item)
     111        || isInHTMLNamespace(item);
     112}
     113
     114inline bool isButtonScopeMarker(HTMLStackItem* item)
     115{
     116    return isScopeMarker(item)
     117        || item->hasTagName(buttonTag);
     118}
     119
     120inline bool isSelectScopeMarker(HTMLStackItem* item)
     121{
     122    return !item->hasTagName(optgroupTag)
     123        && !item->hasTagName(optionTag);
    124124}
    125125
     
    140140{
    141141    ASSERT(item);
    142     ASSERT(!m_item || m_item->node()->isElementNode());
     142    ASSERT(!m_item || m_item->isElementNode());
    143143    // FIXME: Should this call finishParsingChildren?
    144144    m_item = item;
     
    232232void HTMLElementStack::popUntilNumberedHeaderElementPopped()
    233233{
    234     while (!isNumberedHeaderElement(topNode()))
     234    while (!isNumberedHeaderElement(topStackItem()))
    235235        pop();
    236236    pop();
     
    252252{
    253253    // http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#clear-the-stack-back-to-a-table-context
    254     while (!isTableScopeMarker(topNode()))
     254    while (!isTableScopeMarker(topStackItem()))
    255255        pop();
    256256}
     
    259259{
    260260    // http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#clear-the-stack-back-to-a-table-body-context
    261     while (!isTableBodyScopeMarker(topNode()))
     261    while (!isTableBodyScopeMarker(topStackItem()))
    262262        pop();
    263263}
     
    266266{
    267267    // http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#clear-the-stack-back-to-a-table-row-context
    268     while (!isTableRowScopeMarker(topNode()))
     268    while (!isTableRowScopeMarker(topStackItem()))
    269269        pop();
    270270}
    271271
    272272// http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#mathml-text-integration-point
    273 bool HTMLElementStack::isMathMLTextIntegrationPoint(ContainerNode* node)
    274 {
    275     if (!node->isElementNode())
     273bool HTMLElementStack::isMathMLTextIntegrationPoint(HTMLStackItem* item)
     274{
     275    if (!item->isElementNode())
    276276        return false;
    277     Element* element = static_cast<Element*>(node);
    278     return element->hasTagName(MathMLNames::miTag)
    279         || element->hasTagName(MathMLNames::moTag)
    280         || element->hasTagName(MathMLNames::mnTag)
    281         || element->hasTagName(MathMLNames::msTag)
    282         || element->hasTagName(MathMLNames::mtextTag);
     277    return item->hasTagName(MathMLNames::miTag)
     278        || item->hasTagName(MathMLNames::moTag)
     279        || item->hasTagName(MathMLNames::mnTag)
     280        || item->hasTagName(MathMLNames::msTag)
     281        || item->hasTagName(MathMLNames::mtextTag);
    283282}
    284283
    285284// http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#html-integration-point
    286 bool HTMLElementStack::isHTMLIntegrationPoint(ContainerNode* node)
    287 {
    288     if (!node->isElementNode())
     285bool HTMLElementStack::isHTMLIntegrationPoint(HTMLStackItem* item)
     286{
     287    if (!item->isElementNode())
    289288        return false;
    290     Element* element = static_cast<Element*>(node);
    291     if (element->hasTagName(MathMLNames::annotation_xmlTag)) {
    292         // FIXME: Technically we shouldn't read back from the DOM here.
    293         // Instead, we're supposed to track this information in the element
    294         // stack, which lets the parser run on its own thread.
    295         String encoding = element->fastGetAttribute(MathMLNames::encodingAttr);
    296         return equalIgnoringCase(encoding, "text/html")
    297             || equalIgnoringCase(encoding, "application/xhtml+xml");
    298     }
    299     return element->hasTagName(SVGNames::foreignObjectTag)
    300         || element->hasTagName(SVGNames::descTag)
    301         || element->hasTagName(SVGNames::titleTag);
     289    if (item->hasTagName(MathMLNames::annotation_xmlTag)) {
     290        Attribute* encodingAttr = item->token()->getAttributeItem(MathMLNames::encodingAttr);
     291        if (encodingAttr) {
     292            const String& encoding = encodingAttr->value();
     293            return equalIgnoringCase(encoding, "text/html")
     294                || equalIgnoringCase(encoding, "application/xhtml+xml");
     295        }
     296        return false;
     297    }
     298    return item->hasTagName(SVGNames::foreignObjectTag)
     299        || item->hasTagName(SVGNames::descTag)
     300        || item->hasTagName(SVGNames::titleTag);
    302301}
    303302
    304303void HTMLElementStack::popUntilForeignContentScopeMarker()
    305304{
    306     while (!isForeignContentScopeMarker(topNode()))
     305    while (!isForeignContentScopeMarker(topStackItem()))
    307306        pop();
    308307}
     
    310309void HTMLElementStack::pushRootNode(PassRefPtr<HTMLStackItem> rootItem)
    311310{
    312     ASSERT(rootItem->node()->nodeType() == Node::DOCUMENT_FRAGMENT_NODE);
     311    ASSERT(rootItem->isDocumentFragmentNode());
    313312    pushRootNodeCommon(rootItem);
    314313}
     
    390389    ASSERT(m_top);
    391390    ASSERT(m_top->next());
    392     if (m_top->next()->node()->isElementNode())
     391    if (m_top->next()->stackItem()->isElementNode())
    393392        return m_top->next()->element();
    394393    return 0;
     
    433432{
    434433    for (ElementRecord* pos = m_top.get(); pos; pos = pos->next()) {
    435         if (pos->node()->hasLocalName(tagName))
     434        if (pos->stackItem()->hasLocalName(tagName))
    436435            return pos;
    437436    }
     
    449448}
    450449
    451 template <bool isMarker(ContainerNode*)>
     450template <bool isMarker(HTMLStackItem*)>
    452451bool inScopeCommon(HTMLElementStack::ElementRecord* top, const AtomicString& targetTag)
    453452{
    454453    for (HTMLElementStack::ElementRecord* pos = top; pos; pos = pos->next()) {
    455         ContainerNode* node = pos->node();
    456         if (node->hasLocalName(targetTag))
     454        HTMLStackItem* item = pos->stackItem().get();
     455        if (item->hasLocalName(targetTag))
    457456            return true;
    458         if (isMarker(node))
     457        if (isMarker(item))
    459458            return false;
    460459    }
     
    466465{
    467466    for (ElementRecord* record = m_top.get(); record; record = record->next()) {
    468         ContainerNode* node = record->node();
    469         if (isNumberedHeaderElement(node))
     467        HTMLStackItem* item = record->stackItem().get();
     468        if (isNumberedHeaderElement(item))
    470469            return true;
    471         if (isScopeMarker(node))
     470        if (isScopeMarker(item))
    472471            return false;
    473472    }
     
    479478{
    480479    for (ElementRecord* pos = m_top.get(); pos; pos = pos->next()) {
    481         ContainerNode* node = pos->node();
    482         if (node == targetElement)
     480        HTMLStackItem* item = pos->stackItem().get();
     481        if (item->node() == targetElement)
    483482            return true;
    484         if (isScopeMarker(node))
     483        if (isScopeMarker(item))
    485484            return false;
    486485    }
  • trunk/Source/WebCore/html/parser/HTMLElementStack.h

    r123399 r123577  
    9393    }
    9494
     95    HTMLStackItem* topStackItem() const
     96    {
     97        ASSERT(m_top->stackItem());
     98        return m_top->stackItem().get();
     99    }
     100
    95101    Element* oneBelowTop() const;
    96102    ElementRecord* topRecord() const;
     
    121127    void popAll();
    122128
    123     static bool isMathMLTextIntegrationPoint(ContainerNode*);
    124     static bool isHTMLIntegrationPoint(ContainerNode*);
     129    static bool isMathMLTextIntegrationPoint(HTMLStackItem*);
     130    static bool isHTMLIntegrationPoint(HTMLStackItem*);
    125131
    126132    void remove(Element*);
     
    176182};
    177183   
    178 inline bool isInHTMLNamespace(Node* node)
     184inline bool isInHTMLNamespace(const HTMLStackItem* item)
    179185{
    180186    // A DocumentFragment takes the place of the document element when parsing
    181187    // fragments and should be considered in the HTML namespace.
    182     return node->namespaceURI() == HTMLNames::xhtmlNamespaceURI
    183         || node->nodeType() == Node::DOCUMENT_FRAGMENT_NODE; // FIXME: Does this also apply to ShadowRoot?
     188    return item->namespaceURI() == HTMLNames::xhtmlNamespaceURI
     189        || item->isDocumentFragmentNode(); // FIXME: Does this also apply to ShadowRoot?
    184190}
    185191
  • trunk/Source/WebCore/html/parser/HTMLStackItem.h

    r123537 r123577  
    5656    ContainerNode* node() const { return m_node.get(); }
    5757
     58    bool isDocumentFragmentNode() const { return m_isDocumentFragmentNode; }
     59    bool isElementNode() const { return !m_isDocumentFragmentNode; }
     60
    5861    AtomicHTMLToken* token() { return m_token.get(); }
    5962    const AtomicString& namespaceURI() const { return m_namespaceURI; }
    6063    const AtomicString& localName() const { return m_token->name(); }
     64
     65    bool hasLocalName(const AtomicString& name) const { return m_token->name() == name; }
     66    bool hasTagName(const QualifiedName& name) const { return m_token->name() == name.localName() && m_namespaceURI == name.namespaceURI(); }
    6167
    6268private:
     
    6571        , m_isDocumentFragmentNode(true)
    6672    {
     73        // Create a fake token for a document fragment node. This looks ugly but required for performance
     74        // because we want to use m_token->name() in localName(), hasLocalName() and hasTagName() without
     75        // checking m_isDocumentFragmentNode flag.
     76        m_token = AtomicHTMLToken::create(HTMLTokenTypes::StartTag, nullAtom);
    6777    }
    6878
  • trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp

    r123536 r123577  
    110110
    111111// http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#special
    112 bool isSpecialNode(Node* node)
    113 {
    114     if (node->hasTagName(MathMLNames::miTag)
    115         || node->hasTagName(MathMLNames::moTag)
    116         || node->hasTagName(MathMLNames::mnTag)
    117         || node->hasTagName(MathMLNames::msTag)
    118         || node->hasTagName(MathMLNames::mtextTag)
    119         || node->hasTagName(MathMLNames::annotation_xmlTag)
    120         || node->hasTagName(SVGNames::foreignObjectTag)
    121         || node->hasTagName(SVGNames::descTag)
    122         || node->hasTagName(SVGNames::titleTag))
     112bool isSpecialNode(const HTMLStackItem* item)
     113{
     114    if (item->hasTagName(MathMLNames::miTag)
     115        || item->hasTagName(MathMLNames::moTag)
     116        || item->hasTagName(MathMLNames::mnTag)
     117        || item->hasTagName(MathMLNames::msTag)
     118        || item->hasTagName(MathMLNames::mtextTag)
     119        || item->hasTagName(MathMLNames::annotation_xmlTag)
     120        || item->hasTagName(SVGNames::foreignObjectTag)
     121        || item->hasTagName(SVGNames::descTag)
     122        || item->hasTagName(SVGNames::titleTag))
    123123        return true;
    124     if (node->nodeType() == Node::DOCUMENT_FRAGMENT_NODE)
     124    if (item->isDocumentFragmentNode())
    125125        return true;
    126     if (!isInHTMLNamespace(node))
     126    if (!isInHTMLNamespace(item))
    127127        return false;
    128     const AtomicString& tagName = node->localName();
     128    const AtomicString& tagName = item->localName();
    129129    return tagName == addressTag
    130130        || tagName == appletTag
     
    472472
    473473    bool inForeignContent = !m_tree.isEmpty()
    474         && !isInHTMLNamespace(m_tree.currentNode())
    475         && !HTMLElementStack::isHTMLIntegrationPoint(m_tree.currentNode())
    476         && !HTMLElementStack::isMathMLTextIntegrationPoint(m_tree.currentNode());
     474        && !isInHTMLNamespace(m_tree.currentStackItem())
     475        && !HTMLElementStack::isHTMLIntegrationPoint(m_tree.currentStackItem())
     476        && !HTMLElementStack::isMathMLTextIntegrationPoint(m_tree.currentStackItem());
    477477
    478478    m_parser->tokenizer()->setForceNullCharacterReplacement(m_insertionMode == TextMode || inForeignContent);
     
    538538}
    539539
     540void HTMLTreeBuilder::processFakeEndTag(const AtomicString& tagName)
     541{
     542    RefPtr<AtomicHTMLToken> fakeToken = AtomicHTMLToken::create(HTMLTokenTypes::EndTag, tagName);
     543    processEndTag(fakeToken.get());
     544}
     545
    540546void HTMLTreeBuilder::processFakeEndTag(const QualifiedName& tagName)
    541547{
    542548    // FIXME: We'll need a fancier conversion than just "localName" for SVG/MathML tags.
    543     RefPtr<AtomicHTMLToken> fakeToken = AtomicHTMLToken::create(HTMLTokenTypes::EndTag, tagName.localName());
    544     processEndTag(fakeToken.get());
     549    processFakeEndTag(tagName.localName());
    545550}
    546551
     
    601606namespace {
    602607
    603 bool isLi(const ContainerNode* element)
    604 {
    605     return element->hasTagName(liTag);
    606 }
    607 
    608 bool isDdOrDt(const ContainerNode* element)
    609 {
    610     return element->hasTagName(ddTag)
    611         || element->hasTagName(dtTag);
    612 }
    613 
    614 }
    615 
    616 template <bool shouldClose(const ContainerNode*)>
     608bool isLi(const HTMLStackItem* item)
     609{
     610    return item->hasTagName(liTag);
     611}
     612
     613bool isDdOrDt(const HTMLStackItem* item)
     614{
     615    return item->hasTagName(ddTag)
     616        || item->hasTagName(dtTag);
     617}
     618
     619}
     620
     621template <bool shouldClose(const HTMLStackItem*)>
    617622void HTMLTreeBuilder::processCloseWhenNestedTag(AtomicHTMLToken* token)
    618623{
     
    620625    HTMLElementStack::ElementRecord* nodeRecord = m_tree.openElements()->topRecord();
    621626    while (1) {
    622         RefPtr<ContainerNode> node = nodeRecord->node();
    623         if (shouldClose(node.get())) {
    624             ASSERT(node->isElementNode());
    625             processFakeEndTag(toElement(node.get())->tagQName());
     627        RefPtr<HTMLStackItem> item = nodeRecord->stackItem();
     628        if (shouldClose(item.get())) {
     629            ASSERT(item->isElementNode());
     630            processFakeEndTag(item->localName());
    626631            break;
    627632        }
    628         if (isSpecialNode(node.get()) && !node->hasTagName(addressTag) && !node->hasTagName(divTag) && !node->hasTagName(pTag))
     633        if (isSpecialNode(item.get()) && !item->hasTagName(addressTag) && !item->hasTagName(divTag) && !item->hasTagName(pTag))
    629634            break;
    630635        nodeRecord = nodeRecord->next();
     
    808813    if (isNumberedHeaderTag(token->name())) {
    809814        processFakePEndTagIfPInButtonScope();
    810         if (isNumberedHeaderTag(m_tree.currentNode()->localName())) {
     815        if (isNumberedHeaderTag(m_tree.currentStackItem()->localName())) {
    811816            parseError(token);
    812817            m_tree.openElements()->pop();
     
    988993    }
    989994    if (token->name() == optgroupTag || token->name() == optionTag) {
    990         if (m_tree.currentNode()->hasTagName(optionTag)) {
     995        if (m_tree.currentStackItem()->hasTagName(optionTag)) {
    991996            RefPtr<AtomicHTMLToken> endOption = AtomicHTMLToken::create(HTMLTokenTypes::EndTag, optionTag.localName());
    992997            processEndTag(endOption.get());
     
    9991004        if (m_tree.openElements()->inScope(rubyTag.localName())) {
    10001005            m_tree.generateImpliedEndTags();
    1001             if (!m_tree.currentNode()->hasTagName(rubyTag))
     1006            if (!m_tree.currentStackItem()->hasTagName(rubyTag))
    10021007                parseError(token);
    10031008        }
     
    12661271            }
    12671272            m_tree.openElements()->popUntilTableBodyScopeMarker();
    1268             ASSERT(isTableBodyContextTag(m_tree.currentElement()->localName()));
    1269             processFakeEndTag(m_tree.currentElement()->tagQName());
     1273            ASSERT(isTableBodyContextTag(m_tree.currentStackItem()->localName()));
     1274            processFakeEndTag(m_tree.currentStackItem()->localName());
    12701275            processStartTag(token);
    12711276            return;
     
    14001405        }
    14011406        if (token->name() == optionTag) {
    1402             if (m_tree.currentNode()->hasTagName(optionTag)) {
     1407            if (m_tree.currentStackItem()->hasTagName(optionTag)) {
    14031408                RefPtr<AtomicHTMLToken> endOption = AtomicHTMLToken::create(HTMLTokenTypes::EndTag, optionTag.localName());
    14041409                processEndTag(endOption.get());
     
    14081413        }
    14091414        if (token->name() == optgroupTag) {
    1410             if (m_tree.currentNode()->hasTagName(optionTag)) {
     1415            if (m_tree.currentStackItem()->hasTagName(optionTag)) {
    14111416                RefPtr<AtomicHTMLToken> endOption = AtomicHTMLToken::create(HTMLTokenTypes::EndTag, optionTag.localName());
    14121417                processEndTag(endOption.get());
    14131418            }
    1414             if (m_tree.currentNode()->hasTagName(optgroupTag)) {
     1419            if (m_tree.currentStackItem()->hasTagName(optgroupTag)) {
    14151420                RefPtr<AtomicHTMLToken> endOptgroup = AtomicHTMLToken::create(HTMLTokenTypes::EndTag, optgroupTag.localName());
    14161421                processEndTag(endOptgroup.get());
     
    14781483    HTMLElementStack::ElementRecord* record = m_tree.openElements()->topRecord();
    14791484    while (1) {
    1480         RefPtr<ContainerNode> node = record->node();
    1481         if (node->hasLocalName(token->name())) {
     1485        RefPtr<HTMLStackItem> item = record->stackItem();
     1486        if (item->hasLocalName(token->name())) {
    14821487            m_tree.generateImpliedEndTagsWithExclusion(token->name());
    1483             if (!m_tree.currentNode()->hasLocalName(token->name()))
     1488            if (!m_tree.currentStackItem()->hasLocalName(token->name()))
    14841489                parseError(token);
    1485             m_tree.openElements()->popUntilPopped(toElement(node.get()));
    1486             return;
    1487         }
    1488         if (isSpecialNode(node.get())) {
     1490            m_tree.openElements()->popUntilPopped(item->element());
     1491            return;
     1492        }
     1493        if (isSpecialNode(item.get())) {
    14891494            parseError(token);
    14901495            return;
     
    15021507        if (record->element() == formattingElement)
    15031508            return furthestBlock;
    1504         if (isSpecialNode(record->element()))
     1509        if (isSpecialNode(record->stackItem().get()))
    15051510            furthestBlock = record;
    15061511    }
     
    15981603        else {
    15991604            commonAncestor->parserAddChild(lastNode->element());
    1600             ASSERT(lastNode->node()->isElementNode());
     1605            ASSERT(lastNode->stackItem()->isElementNode());
    16011606            ASSERT(lastNode->element()->parentNode());
    16021607            if (lastNode->element()->parentNode()->attached() && !lastNode->element()->attached())
     
    16991704        }
    17001705        m_tree.openElements()->popUntilTableBodyScopeMarker();
    1701         ASSERT(isTableBodyContextTag(m_tree.currentElement()->localName()));
    1702         processFakeEndTag(m_tree.currentElement()->tagQName());
     1706        ASSERT(isTableBodyContextTag(m_tree.currentStackItem()->localName()));
     1707        processFakeEndTag(m_tree.currentStackItem()->localName());
    17031708        processEndTag(token);
    17041709        return;
     
    17601765        }
    17611766        m_tree.generateImpliedEndTags();
    1762         if (!m_tree.currentNode()->hasLocalName(token->name()))
     1767        if (!m_tree.currentStackItem()->hasLocalName(token->name()))
    17631768            parseError(token);
    17641769        m_tree.openElements()->popUntilPopped(token->name());
     
    18301835        }
    18311836        m_tree.generateImpliedEndTags();
    1832         if (!m_tree.currentNode()->hasLocalName(token->name()))
     1837        if (!m_tree.currentStackItem()->hasLocalName(token->name()))
    18331838            parseError(token);
    18341839        m_tree.openElements()->popUntilPopped(token->name());
     
    18551860        }
    18561861        m_tree.generateImpliedEndTagsWithExclusion(token->name());
    1857         if (!m_tree.currentNode()->hasLocalName(token->name()))
     1862        if (!m_tree.currentStackItem()->hasLocalName(token->name()))
    18581863            parseError(token);
    18591864        m_tree.openElements()->popUntilPopped(token->name());
     
    18661871        }
    18671872        m_tree.generateImpliedEndTagsWithExclusion(token->name());
    1868         if (!m_tree.currentNode()->hasLocalName(token->name()))
     1873        if (!m_tree.currentStackItem()->hasLocalName(token->name()))
    18691874            parseError(token);
    18701875        m_tree.openElements()->popUntilPopped(token->name());
     
    18781883        }
    18791884        m_tree.generateImpliedEndTagsWithExclusion(token->name());
    1880         if (!m_tree.currentNode()->hasLocalName(token->name()))
     1885        if (!m_tree.currentStackItem()->hasLocalName(token->name()))
    18811886            parseError(token);
    18821887        m_tree.openElements()->popUntilPopped(token->name());
     
    18891894        }
    18901895        m_tree.generateImpliedEndTags();
    1891         if (!m_tree.currentNode()->hasLocalName(token->name()))
     1896        if (!m_tree.currentStackItem()->hasLocalName(token->name()))
    18921897            parseError(token);
    18931898        m_tree.openElements()->popUntilNumberedHeaderElementPopped();
     
    19061911        }
    19071912        m_tree.generateImpliedEndTags();
    1908         if (!m_tree.currentNode()->hasLocalName(token->name()))
     1913        if (!m_tree.currentStackItem()->hasLocalName(token->name()))
    19091914            parseError(token);
    19101915        m_tree.openElements()->popUntilPopped(token->name());
     
    19281933    }
    19291934    m_tree.generateImpliedEndTags();
    1930     // FIXME: parse error if (!m_tree.currentElement()->hasTagName(captionTag))
     1935    // FIXME: parse error if (!m_tree.currentStackItem()->hasTagName(captionTag))
    19311936    m_tree.openElements()->popUntilPopped(captionTag.localName());
    19321937    m_tree.activeFormattingElements()->clearToLastMarker();
     
    19431948    }
    19441949    m_tree.openElements()->popUntilTableRowScopeMarker();
    1945     ASSERT(m_tree.currentElement()->hasTagName(trTag));
     1950    ASSERT(m_tree.currentStackItem()->hasTagName(trTag));
    19461951    m_tree.openElements()->pop();
    19471952    setInsertionMode(InTableBodyMode);
     
    21112116        ASSERT(insertionMode() == InHeadNoscriptMode);
    21122117        if (token->name() == noscriptTag) {
    2113             ASSERT(m_tree.currentElement()->hasTagName(noscriptTag));
     2118            ASSERT(m_tree.currentStackItem()->hasTagName(noscriptTag));
    21142119            m_tree.openElements()->pop();
    2115             ASSERT(m_tree.currentElement()->hasTagName(headTag));
     2120            ASSERT(m_tree.currentStackItem()->hasTagName(headTag));
    21162121            setInsertionMode(InHeadMode);
    21172122            return;
     
    21272132        if (token->name() == scriptTag) {
    21282133            // Pause ourselves so that parsing stops until the script can be processed by the caller.
    2129             ASSERT(m_tree.currentElement()->hasTagName(scriptTag));
     2134            ASSERT(m_tree.currentStackItem()->hasTagName(scriptTag));
    21302135            m_scriptToProcess = m_tree.currentElement();
    21312136            m_tree.openElements()->pop();
     
    21532158            }
    21542159            m_tree.openElements()->pop();
    2155             if (!isParsingFragment() && !m_tree.currentElement()->hasTagName(framesetTag))
     2160            if (!isParsingFragment() && !m_tree.currentStackItem()->hasTagName(framesetTag))
    21562161                setInsertionMode(AfterFramesetMode);
    21572162            return;
     
    21882193        ASSERT(insertionMode() == InSelectMode || insertionMode() == InSelectInTableMode);
    21892194        if (token->name() == optgroupTag) {
    2190             if (m_tree.currentNode()->hasTagName(optionTag) && m_tree.oneBelowTop() && m_tree.oneBelowTop()->hasTagName(optgroupTag))
     2195            if (m_tree.currentStackItem()->hasTagName(optionTag) && m_tree.oneBelowTop() && m_tree.oneBelowTop()->hasTagName(optgroupTag))
    21912196                processFakeEndTag(optionTag);
    2192             if (m_tree.currentNode()->hasTagName(optgroupTag)) {
     2197            if (m_tree.currentStackItem()->hasTagName(optgroupTag)) {
    21932198                m_tree.openElements()->pop();
    21942199                return;
     
    21982203        }
    21992204        if (token->name() == optionTag) {
    2200             if (m_tree.currentNode()->hasTagName(optionTag)) {
     2205            if (m_tree.currentStackItem()->hasTagName(optionTag)) {
    22012206                m_tree.openElements()->pop();
    22022207                return;
     
    23302335        ASSERT(insertionMode() == InTableMode || insertionMode() == InTableBodyMode || insertionMode() == InRowMode);
    23312336        ASSERT(m_pendingTableCharacters.isEmpty());
    2332         if (m_tree.currentNode()->isElementNode()
    2333             && (m_tree.currentElement()->hasTagName(HTMLNames::tableTag)
    2334                 || m_tree.currentElement()->hasTagName(HTMLNames::tbodyTag)
    2335                 || m_tree.currentElement()->hasTagName(HTMLNames::tfootTag)
    2336                 || m_tree.currentElement()->hasTagName(HTMLNames::theadTag)
    2337                 || m_tree.currentElement()->hasTagName(HTMLNames::trTag))) {
     2337        if (m_tree.currentStackItem()->isElementNode()
     2338            && (m_tree.currentStackItem()->hasTagName(HTMLNames::tableTag)
     2339                || m_tree.currentStackItem()->hasTagName(HTMLNames::tbodyTag)
     2340                || m_tree.currentStackItem()->hasTagName(HTMLNames::tfootTag)
     2341                || m_tree.currentStackItem()->hasTagName(HTMLNames::theadTag)
     2342                || m_tree.currentStackItem()->hasTagName(HTMLNames::trTag))) {
    23382343            m_originalInsertionMode = m_insertionMode;
    23392344            setInsertionMode(InTableTextMode);
     
    24982503    case TextMode:
    24992504        parseError(token);
    2500         if (m_tree.currentNode()->hasTagName(scriptTag))
     2505        if (m_tree.currentStackItem()->hasTagName(scriptTag))
    25012506            notImplemented(); // mark the script element as "already started".
    25022507        m_tree.openElements()->pop();
     
    26522657    if (m_tree.isEmpty())
    26532658        return false;
    2654     ContainerNode* node = m_tree.currentNode();
    2655     if (isInHTMLNamespace(node))
     2659    HTMLStackItem* item = m_tree.currentStackItem();
     2660    if (isInHTMLNamespace(item))
    26562661        return false;
    2657     if (HTMLElementStack::isMathMLTextIntegrationPoint(node)) {
     2662    if (HTMLElementStack::isMathMLTextIntegrationPoint(item)) {
    26582663        if (token->type() == HTMLTokenTypes::StartTag
    26592664            && token->name() != MathMLNames::mglyphTag
     
    26632668            return false;
    26642669    }
    2665     if (node->hasTagName(MathMLNames::annotation_xmlTag)
     2670    if (item->hasTagName(MathMLNames::annotation_xmlTag)
    26662671        && token->type() == HTMLTokenTypes::StartTag
    26672672        && token->name() == SVGNames::svgTag)
    26682673        return false;
    2669     if (HTMLElementStack::isHTMLIntegrationPoint(node)) {
     2674    if (HTMLElementStack::isHTMLIntegrationPoint(item)) {
    26702675        if (token->type() == HTMLTokenTypes::StartTag)
    26712676            return false;
     
    27332738            return;
    27342739        }
    2735         const AtomicString& currentNamespace = m_tree.currentElement()->namespaceURI();
     2740        const AtomicString& currentNamespace = m_tree.currentStackItem()->namespaceURI();
    27362741        if (currentNamespace == MathMLNames::mathmlNamespaceURI)
    27372742            adjustMathMLAttributes(token);
     
    27452750    }
    27462751    case HTMLTokenTypes::EndTag: {
    2747         if (m_tree.currentNode()->namespaceURI() == SVGNames::svgNamespaceURI)
     2752        if (m_tree.currentStackItem()->namespaceURI() == SVGNames::svgNamespaceURI)
    27482753            adjustSVGTagNameCase(token);
    27492754
    2750         if (token->name() == SVGNames::scriptTag && m_tree.currentNode()->hasTagName(SVGNames::scriptTag)) {
     2755        if (token->name() == SVGNames::scriptTag && m_tree.currentStackItem()->hasTagName(SVGNames::scriptTag)) {
    27512756            m_scriptToProcess = m_tree.currentElement();
    27522757            m_tree.openElements()->pop();
    27532758            return;
    27542759        }
    2755         if (!isInHTMLNamespace(m_tree.currentNode())) {
     2760        if (!isInHTMLNamespace(m_tree.currentStackItem())) {
    27562761            // FIXME: This code just wants an Element* iterator, instead of an ElementRecord*
    27572762            HTMLElementStack::ElementRecord* nodeRecord = m_tree.openElements()->topRecord();
    2758             if (!nodeRecord->node()->hasLocalName(token->name()))
     2763            if (!nodeRecord->stackItem()->hasLocalName(token->name()))
    27592764                parseError(token);
    27602765            while (1) {
    2761                 if (nodeRecord->node()->hasLocalName(token->name())) {
     2766                if (nodeRecord->stackItem()->hasLocalName(token->name())) {
    27622767                    m_tree.openElements()->popUntilPopped(nodeRecord->element());
    27632768                    return;
     
    27652770                nodeRecord = nodeRecord->next();
    27662771
    2767                 if (isInHTMLNamespace(nodeRecord->node()))
     2772                if (isInHTMLNamespace(nodeRecord->stackItem().get()))
    27682773                    break;
    27692774            }
  • trunk/Source/WebCore/html/parser/HTMLTreeBuilder.h

    r123389 r123577  
    153153    void processFakeStartTag(const QualifiedName&, const Vector<Attribute>& attributes = Vector<Attribute>());
    154154    void processFakeEndTag(const QualifiedName&);
     155    void processFakeEndTag(const AtomicString&);
    155156    void processFakeCharacters(const String&);
    156157    void processFakePEndTagIfPInButtonScope();
     
    179180    void closeTheCell();
    180181
    181     template <bool shouldClose(const ContainerNode*)>
     182    template <bool shouldClose(const HTMLStackItem*)>
    182183    void processCloseWhenNestedTag(AtomicHTMLToken*);
    183184
Note: See TracChangeset for help on using the changeset viewer.