Title: [140537] trunk
Revision
140537
Author
[email protected]
Date
2013-01-23 07:22:15 -0800 (Wed, 23 Jan 2013)

Log Message

REGRESSION(r140101): caused debug asserts in fast/forms/associated-element-crash.html and html5lib/run-template.html
https://bugs.webkit.org/show_bug.cgi?id=107237

Patch by Rafael Weinstein <[email protected]> on 2013-01-23
Reviewed by Adam Barth.

Source/WebCore:

No new tests needed.

When the parser foster-parent's a node out of a table context and the foster parent is a template element, set the Task.parent
to be the template element's content, rather than the element itself. This ensures the foster-parented node isn't errorenously
reparented.

* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::findFosterSite):

LayoutTests:

* platform/chromium/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (140536 => 140537)


--- trunk/LayoutTests/ChangeLog	2013-01-23 15:13:24 UTC (rev 140536)
+++ trunk/LayoutTests/ChangeLog	2013-01-23 15:22:15 UTC (rev 140537)
@@ -1,3 +1,12 @@
+2013-01-23  Rafael Weinstein  <[email protected]>
+
+        REGRESSION(r140101): caused debug asserts in fast/forms/associated-element-crash.html and html5lib/run-template.html
+        https://bugs.webkit.org/show_bug.cgi?id=107237
+
+        Reviewed by Adam Barth.
+
+        * platform/chromium/TestExpectations:
+
 2013-01-23  Erik Arvidsson  <[email protected]>
 
         [chromium] Layout test rebaselines

Modified: trunk/LayoutTests/platform/chromium/TestExpectations (140536 => 140537)


--- trunk/LayoutTests/platform/chromium/TestExpectations	2013-01-23 15:13:24 UTC (rev 140536)
+++ trunk/LayoutTests/platform/chromium/TestExpectations	2013-01-23 15:22:15 UTC (rev 140537)
@@ -4330,8 +4330,6 @@
 webkit.org/b/107316 [ Mac Debug ] fast/inline/fixed-pos-moves-with-abspos-inline-parent.html [ Failure ]
 webkit.org/b/107316 [ Win Debug ] fast/inline/fixed-pos-moves-with-abspos-inline-parent.html [ Pass Failure ]
 
-webkit.org/b/107237 [ Debug ] html5lib/run-template.html [ Crash ]
-
 webkit.org/b/107328 http/tests/cache/cancel-multiple-post-xhrs.html [ Missing ]
 webkit.org/b/107341 [ Debug ] inspector/profiler/memory-instrumentation-cached-images.html [ Failure ]
 

Modified: trunk/Source/WebCore/ChangeLog (140536 => 140537)


--- trunk/Source/WebCore/ChangeLog	2013-01-23 15:13:24 UTC (rev 140536)
+++ trunk/Source/WebCore/ChangeLog	2013-01-23 15:22:15 UTC (rev 140537)
@@ -1,3 +1,19 @@
+2013-01-23  Rafael Weinstein  <[email protected]>
+
+        REGRESSION(r140101): caused debug asserts in fast/forms/associated-element-crash.html and html5lib/run-template.html
+        https://bugs.webkit.org/show_bug.cgi?id=107237
+
+        Reviewed by Adam Barth.
+
+        No new tests needed.
+
+        When the parser foster-parent's a node out of a table context and the foster parent is a template element, set the Task.parent
+        to be the template element's content, rather than the element itself. This ensures the foster-parented node isn't errorenously
+        reparented.
+
+        * html/parser/HTMLConstructionSite.cpp:
+        (WebCore::HTMLConstructionSite::findFosterSite):
+
 2013-01-23  Yury Semikhatsky  <[email protected]>
 
         Web Inspector: heap profiler shows nodes with distance 0

Modified: trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp (140536 => 140537)


--- trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp	2013-01-23 15:13:24 UTC (rev 140536)
+++ trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp	2013-01-23 15:22:15 UTC (rev 140537)
@@ -607,9 +607,10 @@
     // When a node is to be foster parented, the last template element with no table element is below it in the stack of open elements is the foster parent element (NOT the template's parent!)
     HTMLElementStack::ElementRecord* lastTemplateElement = m_openElements.topmost(templateTag.localName());
     if (lastTemplateElement && !m_openElements.inTableScope(tableTag)) {
-        task.parent = lastTemplateElement->element();
+        task.parent = toHTMLTemplateElement(lastTemplateElement->element())->content();
         return;
     }
+
 #endif
 
     HTMLElementStack::ElementRecord* lastTableElementRecord = m_openElements.topmost(tableTag.localName());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to