VERIFIED FIXED 17421
Lack of end tag for SELECT element causes the rest of page to not be rendered
https://bugs.webkit.org/show_bug.cgi?id=17421
Summary Lack of end tag for SELECT element causes the rest of page to not be rendered
Robert Blaut
Reported 2008-02-18 00:13:57 PST
The problem was found on the above page. Lack of </selection> tag causes blank a rest of the page rendered. The problem is only visible in Webkit. Other tested browsers: Minefield and Opera has no problem with it. <input> element in these browsers automatically closes <select> element in DOM. Webkit ignores the <input> element. Check DOM tree in all three browsers: http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!doctype%20html%3E%3Chtml%3E%3Cbody%3E%3Cp%3EThere%20should%20be%20GREEN%20bar%20below%3C%2Fp%3E%3Cselect%3E%3Cinput%3E%3Cp%20style%3D%22background-color%3Alime%3B%22%3EPASS%3C%2Fp%3E%3C%2Fbody%3E%3C%2Fhtml%3E
Attachments
minimal test case (154 bytes, text/html)
2008-02-18 00:14 PST, Robert Blaut
no flags
Fix for the bug reflecting the latest HTML5 spec changes (5.27 KB, patch)
2008-06-02 01:47 PDT, Robert Blaut
no flags
Improved patch for unclosed SELECT element (3.47 KB, patch)
2008-06-09 02:19 PDT, Robert Blaut
darin: review+
Robert Blaut
Comment 1 2008-02-18 00:14:21 PST
Created attachment 19184 [details] minimal test case
Robert Blaut
Comment 2 2008-02-25 05:03:16 PST
Robert Blaut
Comment 3 2008-03-04 04:41:09 PST
I removed URL since the </select> error on a reported page was corrected. I wonder if we should fix the bug since HTML5lib renders the test case identically as Webkit today? I don't know if HTML5 parsing compatibility has absolute priority despite other browsers current behavior.
Alexey Proskuryakov
Comment 4 2008-03-04 13:23:36 PST
I do not know whether this is a bug in the spec, or intentional change. Asking on whatwg@whatwg.org is probably the way to go, unless Dave or Ian choose to comment here.
Ian 'Hixie' Hickson
Comment 5 2008-03-04 14:26:52 PST
It's the <input> that's the issue. It should cause a </select> to be implied. I'll fix it in the spec. Ping me if it's not fixed by next week.
Robert Blaut
Comment 6 2008-03-04 14:39:47 PST
(In reply to comment #5) > It's the <input> that's the issue. It should cause a </select> to be implied. > I'll fix it in the spec. Ping me if it's not fixed by next week. > Ian as far as I tested <textarea> also closes <select> element in Gecko, Presto and IE 6. Test case: http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cp%3EThere%20should%20be%20GREEN%20bar%20below%3C%2Fp%3E%3Cselect%3E%3Ctextarea%3E%3C%2Ftextarea%3E%3Cp%20style%3D%22background-color%3Alime%3B%22%3EPASS%3C%2Fp%3E
Ian 'Hixie' Hickson
Comment 7 2008-05-24 02:45:21 PDT
I fixed the spec.
Robert Blaut
Comment 8 2008-06-02 01:47:03 PDT
Created attachment 21456 [details] Fix for the bug reflecting the latest HTML5 spec changes Thank you Ian for fixing the specification. Here is my fix proposition with test case attached.
Darin Adler
Comment 9 2008-06-08 17:59:08 PDT
Comment on attachment 21456 [details] Fix for the bug reflecting the latest HTML5 spec changes This patch is good. What would make it better would be to add a call to reportError here so the web inspector would explain the error in the page. I think the call would be: reportError(MisplacedContentRetryError, &localName, &currentTagName) I also think that it would be better to have a test with a text result rather than a Mac-specific render tree result. r=me, as-is
Robert Blaut
Comment 10 2008-06-08 23:24:10 PDT
Comment on attachment 21456 [details] Fix for the bug reflecting the latest HTML5 spec changes Thank you Darin for usefull review. I'll improve the patch soon. So for now I clear the review flag.
Robert Blaut
Comment 11 2008-06-09 02:19:14 PDT
Created attachment 21591 [details] Improved patch for unclosed SELECT element I've made changes based on Darin suggestions.
Darin Adler
Comment 12 2008-06-09 06:49:12 PDT
Comment on attachment 21591 [details] Improved patch for unclosed SELECT element r=me
Mark Rowe (bdash)
Comment 13 2008-06-22 18:16:37 PDT
Landed in r34734.
Note You need to log in before you can comment on or make changes to this bug.