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
Created attachment 19184 [details] minimal test case
<rdar://problem/5762895>
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.
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.
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.
(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
I fixed the spec.
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.
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, ¤tTagName) 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
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.
Created attachment 21591 [details] Improved patch for unclosed SELECT element I've made changes based on Darin suggestions.
Comment on attachment 21591 [details] Improved patch for unclosed SELECT element r=me
Landed in r34734.