Changeset 63812 in webkit


Ignore:
Timestamp:
Jul 21, 2010 5:05:33 AM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-07-21 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Fix fast/css/last-child-style-sharing.html
https://bugs.webkit.org/show_bug.cgi?id=42731

Prior to this patch, we weren't calling finishParsingChildren on the
body element. We need a more systematic way of catching these bugs.

  • html/HTMLElementStack.cpp: (WebCore::HTMLElementStack::popAll):
  • html/HTMLElementStack.h:
  • html/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processEndOfFile):
Location:
trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r63810 r63812  
     12010-07-21  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Fix fast/css/last-child-style-sharing.html
     6        https://bugs.webkit.org/show_bug.cgi?id=42731
     7
     8        Prior to this patch, we weren't calling finishParsingChildren on the
     9        body element.  We need a more systematic way of catching these bugs.
     10
     11        * html/HTMLElementStack.cpp:
     12        (WebCore::HTMLElementStack::popAll):
     13        * html/HTMLElementStack.h:
     14        * html/HTMLTreeBuilder.cpp:
     15        (WebCore::HTMLTreeBuilder::processEndOfFile):
     16
    1172010-07-21  Hans Wennborg  <hans@chromium.org>
    218
  • trunk/WebCore/html/HTMLElementStack.cpp

    r63264 r63812  
    138138}
    139139
     140void HTMLElementStack::popAll()
     141{
     142    m_htmlElement = 0;
     143    m_headElement = 0;
     144    m_bodyElement = 0;
     145    while (m_top) {
     146        top()->finishParsingChildren();
     147        m_top = m_top->releaseNext();
     148    }
     149}
     150
    140151void HTMLElementStack::pop()
    141152{
  • trunk/WebCore/html/HTMLElementStack.h

    r63264 r63812  
    9393    void popHTMLHeadElement();
    9494    void popHTMLBodyElement();
     95    void popAll();
    9596
    9697    void remove(Element*);
  • trunk/WebCore/html/HTMLTreeBuilder.cpp

    r63762 r63812  
    26162616        ASSERT(insertionMode() == InHeadNoscriptMode);
    26172617        defaultForInHeadNoscript();
    2618         processToken(token);
    2619         break;
     2618        processEndOfFile(token);
     2619        return;
    26202620    case AfterFramesetMode:
    26212621    case AfterAfterFramesetMode:
     
    26412641        }
    26422642        processEndOfFile(token);
    2643         break;
     2643        return;
    26442644    case InForeignContentMode:
    26452645        parseError(token);
     
    26492649        setInsertionMode(m_secondaryInsertionMode);
    26502650        processEndOfFile(token);
    2651         break;
     2651        return;
    26522652    case InTableTextMode:
    26532653        defaultForInTableText();
    26542654        processEndOfFile(token);
    2655         break;
     2655        return;
    26562656    case TextMode:
    26572657    case InCaptionMode:
     
    26602660        break;
    26612661    }
     2662    ASSERT(m_tree.openElements()->top());
     2663    m_tree.openElements()->popAll();
    26622664}
    26632665
Note: See TracChangeset for help on using the changeset viewer.