Fix assert when foster parenting self-closing elements
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jan 2012 07:03:47 +0000 (07:03 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jan 2012 07:03:47 +0000 (07:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=75527

Unreviewed.

Source/WebCore:

* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::fosterParent):
    - We can't execute this task immediately because the code for
      self-closing elements wants to set the self-closing flag.
      Instead, we queue the task.

LayoutTests:

Add a test case that used to case an assert.

* html5lib/resources/webkit02.dat:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@104014 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/html5lib/resources/webkit02.dat
Source/WebCore/ChangeLog
Source/WebCore/html/parser/HTMLConstructionSite.cpp

index 61cffe5..18fd194 100644 (file)
@@ -1,3 +1,14 @@
+2012-01-03  Adam Barth  <abarth@webkit.org>
+
+        Fix assert when foster parenting self-closing elements
+        https://bugs.webkit.org/show_bug.cgi?id=75527
+
+        Unreviewed.
+
+        Add a test case that used to case an assert.
+
+        * html5lib/resources/webkit02.dat:
+
 2012-01-03  Jochen Eisinger  <jochen@chromium.org>
 
         Replace clearLocalStorage.js with localStorage.clear() now that it's implemented
index b6dc12f..ba0c5a6 100644 (file)
 |       "test"
 
 #data
+<table><input>
+#errors
+#document
+| <html>
+|   <head>
+|   <body>
+|     <input>
+|     <table>
+
+#data
 <b><em><dcell><postfield><postfield><postfield><postfield><missing_glyph><missing_glyph><missing_glyph><missing_glyph><hkern><aside></b></em>
 #errors
 #document-fragment
index 697cdcb..dcd4d69 100644 (file)
@@ -1,3 +1,16 @@
+2012-01-03  Adam Barth  <abarth@webkit.org>
+
+        Fix assert when foster parenting self-closing elements
+        https://bugs.webkit.org/show_bug.cgi?id=75527
+
+        Unreviewed.
+
+        * html/parser/HTMLConstructionSite.cpp:
+        (WebCore::HTMLConstructionSite::fosterParent):
+            - We can't execute this task immediately because the code for
+              self-closing elements wants to set the self-closing flag.
+              Instead, we queue the task.
+
 2012-01-03  Charles Wei  <charles.wei@torchmobile.com.cn>
 
         [BlackBerry] Need to support credentials in the URL
index 1d31e13..8aee348 100644 (file)
@@ -526,7 +526,7 @@ void HTMLConstructionSite::fosterParent(PassRefPtr<Node> node)
     task.nextChild = 0;
     findFosterSite(task);
     task.child = node;
-    executeTask(task);
+    m_attachmentQueue.append(task);
 }
 
 }