Allow <link> to be opened, even as the direct child of a <table>. bug 436722, r+sr=sicking
authorBlake Kaplan <mrbkap@gmail.com>
Mon, 14 Jul 2008 15:00:43 +0200
changeset 15927 a1bc3ae5d5a8d26da2f2f4336a441d378be0619e
parent 15926 2d0d421facb0003d3d02bfb7ea6107bdf66ffe0e
child 15928 85db8810984d6d6c5778d4c25f07bdec811f42bb
push id609
push usermrbkap@mozilla.com
push dateMon, 14 Jul 2008 13:02:21 +0000
treeherdermozilla-central@a1bc3ae5d5a8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs436722
milestone1.9.1a1pre
Allow <link> to be opened, even as the direct child of a <table>. bug 436722, r+sr=sicking
parser/htmlparser/src/nsElementTable.cpp
parser/htmlparser/tests/mochitest/regressions.txt
--- a/parser/htmlparser/src/nsElementTable.cpp
+++ b/parser/htmlparser/src/nsElementTable.cpp
@@ -803,17 +803,17 @@ const nsHTMLElement gHTMLElements[] = {
     /*contain-func*/                    &CanBeContainedLI
   },
   {
     /*tag*/                             eHTMLTag_link,
     /*req-parent excl-parent*/          eHTMLTag_unknown,eHTMLTag_unknown,
     /*rootnodes,endrootnodes*/          &gInHead,&gInHead,
     /*autoclose starttags and endtags*/ 0,0,0,0,
     /*parent,incl,exclgroups*/          kAllTags - kHeadContent, kNone, kNone,
-    /*special props, prop-range*/       kNonContainer|kPreferHead,kDefaultPropRange,
+    /*special props, prop-range*/       kNonContainer|kPreferHead|kLegalOpen,kDefaultPropRange,
     /*special parents,kids,skip*/       &gInHead,0,eHTMLTag_unknown,
     /*contain-func*/                    0
   },
   {
     /*tag*/                             eHTMLTag_listing,
     /*req-parent excl-parent*/          eHTMLTag_unknown,eHTMLTag_unknown,
     /*rootnodes,endrootnodes*/          &gRootTags,&gRootTags,
     /*autoclose starttags and endtags*/ 0,0,0,0,
@@ -1113,17 +1113,17 @@ const nsHTMLElement gHTMLElements[] = {
   },
   {
     
     /*tag*/                             eHTMLTag_style,
     /*req-parent excl-parent*/          eHTMLTag_unknown,eHTMLTag_unknown,
     /*rootnodes,endrootnodes*/          &gRootTags,&gRootTags,
     /*autoclose starttags and endtags*/ 0,0,0,0,
     /*parent,incl,exclgroups*/          kAllTags - kHeadContent, kCDATA, kNone,
-    /*special props, prop-range*/       kNoStyleLeaksIn|kPreferHead, kNoPropRange,
+    /*special props, prop-range*/       kNoStyleLeaksIn|kPreferHead|kLegalOpen, kNoPropRange,
     /*special parents,kids,skip*/       0,0,eHTMLTag_unknown,
     /*contain-func*/                    0
   },
   {
     /*tag*/                             eHTMLTag_sub,
     /*req-parent excl-parent*/          eHTMLTag_unknown,eHTMLTag_unknown,
     /*rootnodes,endrootnodes*/          &gRootTags,&gRootTags,
     /*autoclose starttags and endtags*/ 0,0,0,0,
--- a/parser/htmlparser/tests/mochitest/regressions.txt
+++ b/parser/htmlparser/tests/mochitest/regressions.txt
@@ -377,16 +377,46 @@ x { content:"</style" } "
 | <!DOCTYPE HTML>
 | <html>
 |   <head>
 |   <frameset>
 |     rows="*"
 |     <frame>
 
 #data
+<!DOCTYPE html><html><body><table><link><tr><td>Hi!</td></tr></table></html>
+#errors
+#document
+| <!DOCTYPE HTML>
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <link>
+|       <tbody>
+|         <tr>
+|           <td>
+|             "Hi!"
+
+#data
+<!DOCTYPE html><html><body><table><style>td { color: green }</style><tr><td>Hi!</tr></td></table>
+#errors
+#document
+| <!DOCTYPE HTML>
+| <html>
+|   <head>
+|   <body>
+|     <table>
+|       <style>
+|         "td { color: green }"
+|       <tbody>
+|         <tr>
+|           <td>
+|             "Hi!"
+#data
 <!DOCTYPE html><html><head></head><form><input type=" hidden"></form><frameset rows="*"><frame></frameset></html>
 #errors
 #document
 | <!DOCTYPE HTML>
 | <html>
 |   <head>
 |   <body>
 |     <form>