According to the HTML5 spec, if the last table element in the stack of open elements has no parent, or ITS PARENT NODE IS NOT AN ELEMENT, then the foster parent element is the element before the last table element in the stack of open elements. http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#foster-parenting Changed to check if the table element's parent node is an element.
Created attachment 156043 [details] Patch
Comment on attachment 156043 [details] Patch Attachment 156043 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13426160 New failing tests: fast/table/incomplete-table-in-fragment-hang.html
Created attachment 156052 [details] Archive of layout-test-results from gce-cr-linux-07 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: gce-cr-linux-07 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Created attachment 156064 [details] Patch
Comment on attachment 156064 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=156064&action=review > Source/WebCore/html/parser/HTMLConstructionSite.cpp:482 > + // When parsing HTML fragments, we skip step 4.2 ("Let root be a new html element with no attributes") for efficiency, > + // and instead use the DocumentFragment as a root node. So if we must treat the root node (DocumentFragment) as a html element here. > + if (parent && (parent->isElementNode() || (m_isParsingFragment && parent == m_openElements.rootNode()))) { To pass fast/table/incomplete-table-in-fragment-hang.html, a special condition check was added for the fragment parsing case.
Created attachment 156065 [details] Patch
(In reply to comment #6) > Created an attachment (id=156065) [details] > Patch Fixed typos in the comment.
Comment on attachment 156065 [details] Patch ok
Comment on attachment 156065 [details] Patch Clearing flags on attachment: 156065 Committed r124465: <http://trac.webkit.org/changeset/124465>
All reviewed patches have been landed. Closing bug.