Changeset 62438 in webkit


Ignore:
Timestamp:
Jul 2, 2010 11:47:33 PM (14 years ago)
Author:
abarth@webkit.org
Message:

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

Reviewed by Eric Seidel.

Handle <frameset> InBody
https://bugs.webkit.org/show_bug.cgi?id=41558

Yay test progression.

  • html5lib/runner-expected-html5.txt:

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

Reviewed by Eric Seidel.

Handle <frameset> InBody
https://bugs.webkit.org/show_bug.cgi?id=41558

Handling the <frameset> tag in the InBody mode is somewhat delicate.

  • html/HTMLElementStack.cpp: (WebCore::HTMLElementStack::popHTMLBodyElement): (WebCore::HTMLElementStack::popUntil): (WebCore::HTMLElementStack::popCommon):
  • html/HTMLElementStack.h:
  • html/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processStartTag):
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r62436 r62438  
     12010-07-02  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Handle <frameset> InBody
     6        https://bugs.webkit.org/show_bug.cgi?id=41558
     7
     8        Yay test progression.
     9
     10        * html5lib/runner-expected-html5.txt:
     11
    1122010-07-02  Adam Barth  <abarth@webkit.org>
    213
  • trunk/LayoutTests/html5lib/runner-expected-html5.txt

    r62436 r62438  
    2118211846
    2119211947
    2120 48
    2121 49
    2122 51
    21232120
    21242121Test 1 of 51 in resources/tests6.dat failed. Input:
     
    25432540|   <head>
    25442541|   <body>
    2545 
    2546 Test 48 of 51 in resources/tests6.dat failed. Input:
    2547 <param><frameset></frameset>
    2548 Got:
    2549 | <html>
    2550 |   <head>
    2551 |   <body>
    2552 |     <param>
    2553 Expected:
    2554 | <html>
    2555 |   <head>
    2556 |   <frameset>
    2557 
    2558 Test 49 of 51 in resources/tests6.dat failed. Input:
    2559 <source><frameset></frameset>
    2560 Got:
    2561 | <html>
    2562 |   <head>
    2563 |   <body>
    2564 |     <source>
    2565 Expected:
    2566 | <html>
    2567 |   <head>
    2568 |   <frameset>
    2569 
    2570 Test 51 of 51 in resources/tests6.dat failed. Input:
    2571 </body><frameset></frameset>
    2572 Got:
    2573 | <html>
    2574 |   <head>
    2575 |   <body>
    2576 Expected:
    2577 | <html>
    2578 |   <head>
    2579 |   <frameset>
    25802542resources/tests7.dat:
    258125432
     
    54335395| <html>
    54345396|   <head>
    5435 |   <body>
    5436 |     <noframes>
    5437 |       "</frameset><noframes>"
     5397|   <frameset>
    54385398Expected:
    54395399| <html>
  • trunk/WebCore/ChangeLog

    r62436 r62438  
     12010-07-02  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Handle <frameset> InBody
     6        https://bugs.webkit.org/show_bug.cgi?id=41558
     7
     8        Handling the <frameset> tag in the InBody mode is somewhat delicate.
     9
     10        * html/HTMLElementStack.cpp:
     11        (WebCore::HTMLElementStack::popHTMLBodyElement):
     12        (WebCore::HTMLElementStack::popUntil):
     13        (WebCore::HTMLElementStack::popCommon):
     14        * html/HTMLElementStack.h:
     15        * html/HTMLTreeBuilder.cpp:
     16        (WebCore::HTMLTreeBuilder::processStartTag):
     17
    1182010-07-02  Adam Barth  <abarth@webkit.org>
    219
  • trunk/WebCore/html/HTMLElementStack.cpp

    r62222 r62438  
    7575}
    7676
     77void HTMLElementStack::popHTMLBodyElement()
     78{
     79    ASSERT(top() == m_bodyElement);
     80    m_bodyElement = 0;
     81    popCommon();
     82}
     83
    7784void HTMLElementStack::pop()
    7885{
     
    8895        pop();
    8996    }
     97}
     98
     99void HTMLElementStack::popUntil(Element* element)
     100{
     101    while (top() != element)
     102        pop();
    90103}
    91104
     
    261274{
    262275    ASSERT(!top()->hasTagName(HTMLNames::htmlTag));
    263     ASSERT(!top()->hasTagName(HTMLNames::bodyTag));
     276    ASSERT(!top()->hasTagName(HTMLNames::headTag) || !m_headElement);
     277    ASSERT(!top()->hasTagName(HTMLNames::bodyTag) || !m_bodyElement);
    264278    top()->finishParsingChildren();
    265279    m_top = m_top->releaseNext();
  • trunk/WebCore/html/HTMLElementStack.h

    r62207 r62438  
    5050    void pop();
    5151    void popUntil(const AtomicString& tagName);
     52    void popUntil(Element*);
    5253    void popHTMLHeadElement();
     54    void popHTMLBodyElement();
    5355
    5456    void remove(Element*);
     
    7678
    7779    // We remember <html>, <head> and <body> as they are pushed.  Their
    78     // ElementRecords keep them alive.  <html> and <body> are never popped.
     80    // ElementRecords keep them alive.  <html> is never popped.
    7981    // FIXME: We don't currently require type-specific information about
    8082    // these elements so we haven't yet bothered to plumb the types all the
  • trunk/WebCore/html/HTMLTreeBuilder.cpp

    r62436 r62438  
    401401        }
    402402        if (token.name() == framesetTag) {
    403             notImplemented();
     403            parseError(token);
     404            notImplemented(); // fragment case
     405            if (!m_framesetOk)
     406                return;
     407            ExceptionCode ec = 0;
     408            m_openElements.bodyElement()->remove(ec);
     409            ASSERT(!ec);
     410            m_openElements.popUntil(m_openElements.bodyElement());
     411            m_openElements.popHTMLBodyElement();
     412            ASSERT(m_openElements.top() == m_openElements.htmlElement());
     413            insertElement(token);
     414            m_insertionMode = InFramesetMode;
    404415            return;
    405416        }
Note: See TracChangeset for help on using the changeset viewer.