Changeset 62618 in webkit
- Timestamp:
- Jul 6, 2010 9:23:03 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r62613 r62618 1 2010-07-06 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 Fix </optgroup> in "in select" mode 6 https://bugs.webkit.org/show_bug.cgi?id=41733 7 8 * html5lib/runner-expected-html5.txt: 9 1 10 2010-07-06 Eric Seidel <eric@webkit.org> 2 11 -
trunk/LayoutTests/html5lib/runner-expected-html5.txt
r62617 r62618 332 332 11 333 333 13 334 36335 334 47 336 335 48 … … 374 373 | <tbody> 375 374 | <tr> 376 377 Test 36 of 59 in resources/tests2.dat failed. Input:378 <!DOCTYPE html><select><optgroup><option></optgroup><option><select><option>379 Got:380 | <!DOCTYPE html>381 | <html>382 | <head>383 | <body>384 | <select>385 | <optgroup>386 | <option>387 | <option>388 | <option>389 Expected:390 | <!DOCTYPE html>391 | <html>392 | <head>393 | <body>394 | <select>395 | <optgroup>396 | <option>397 | <option>398 | <option>399 375 400 376 Test 47 of 59 in resources/tests2.dat failed. Input: -
trunk/WebCore/ChangeLog
r62617 r62618 1 2010-07-06 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 Fix </optgroup> in "in select" mode 6 https://bugs.webkit.org/show_bug.cgi?id=41733 7 8 I had to add a oneBelowTop() accessor. 9 I added some ASSERTs after looking at the fragment case 10 documentation. I'm now convinced that top() and oneBeforeTop() 11 should never be NULL, so we just ASSERT they aren't. 12 13 This is a very obscure corner of the HTML spec, but at least 14 we have a test for it. This makes one more html5lib test pass. 15 16 * html/HTMLConstructionSite.h: 17 (WebCore::HTMLConstructionSite::oneBelowTop): 18 * html/HTMLElementStack.cpp: 19 (WebCore::HTMLElementStack::topRecord): 20 (WebCore::HTMLElementStack::top): 21 (WebCore::HTMLElementStack::oneBelowTop): 22 * html/HTMLElementStack.h: 23 * html/HTMLTreeBuilder.cpp: 24 (WebCore::HTMLTreeBuilder::processEndTag): 25 1 26 2010-07-06 Eric Seidel <eric@webkit.org> 2 27 -
trunk/WebCore/html/HTMLConstructionSite.h
r62611 r62618 73 73 74 74 Element* currentElement() const { return m_openElements.top(); } 75 Element* oneBelowTop() const { return m_openElements.oneBelowTop(); } 76 75 77 HTMLElementStack* openElements() const { return &m_openElements; } 76 78 HTMLFormattingElementList* activeFormattingElements() const { return &m_activeFormattingElements; } -
trunk/WebCore/html/HTMLElementStack.cpp
r62573 r62618 241 241 HTMLElementStack::ElementRecord* HTMLElementStack::topRecord() const 242 242 { 243 ASSERT(m_top); 243 244 return m_top.get(); 244 245 } … … 246 247 Element* HTMLElementStack::top() const 247 248 { 249 ASSERT(m_top->element()); 248 250 return m_top->element(); 251 } 252 253 Element* HTMLElementStack::oneBelowTop() const 254 { 255 // We should never be calling this if it could be 0. 256 ASSERT(m_top); 257 ASSERT(m_top->next()); 258 return m_top->next()->element(); 249 259 } 250 260 -
trunk/WebCore/html/HTMLElementStack.h
r62563 r62618 69 69 70 70 Element* top() const; 71 Element* oneBelowTop() const; 71 72 ElementRecord* topRecord() const; 72 73 Element* bottom() const; -
trunk/WebCore/html/HTMLTreeBuilder.cpp
r62617 r62618 1874 1874 ASSERT(insertionMode() == InSelectMode || insertionMode() == InSelectInTableMode); 1875 1875 if (token.name() == optgroupTag) { 1876 if (m_tree.currentElement()->hasTagName(optionTag) )1877 notImplemented();1876 if (m_tree.currentElement()->hasTagName(optionTag) && m_tree.oneBelowTop()->hasTagName(optgroupTag)) 1877 processFakeEndTag(optionTag); 1878 1878 if (m_tree.currentElement()->hasTagName(optgroupTag)) { 1879 1879 m_tree.openElements()->pop();
Note: See TracChangeset
for help on using the changeset viewer.