Summary: | Lack of end tag for SELECT element causes the rest of page to not be rendered | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Robert Blaut <webkit> | ||||||||
Component: | DOM | Assignee: | Robert Blaut <webkit> | ||||||||
Status: | VERIFIED FIXED | ||||||||||
Severity: | Normal | CC: | ap, hyatt, ian | ||||||||
Priority: | P2 | Keywords: | HasReduction, InRadar | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
Description
Robert Blaut
2008-02-18 00:13:57 PST
Created attachment 19184 [details]
minimal test case
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. |