Created attachment 324894 [details] testcase The HTML5 spec is clear that "the body element" is the first body element. We use the last. See attached testcase, which tests document.body as well as propagation of the body's background to the viewport.
Created attachment 324896 [details] [diff] [review] fix I think GetHtmlContent could be useful in various places but I've refrained from refactoring all those here.
Comment on attachment 324894 [details] testcase per roc, changing content-type to application/xml
Attachment #324894 - Attachment mime type: text/html → application/xml
Comment on attachment 324894 [details] testcase trying again with application/xhtml+xml, so HTML DOM applies
Attachment #324894 - Attachment mime type: application/xml → application/xhtml+xml
WFM Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:184.108.40.206) Gecko/2008040413 Firefox/220.127.116.11 Busted Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008061216 Minefield/3.0 (RC3)
Keywords: regression, testcase
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Summary: document.body returns wrong element → document.body returns last <body> element when it should return the first
You need to log in before you can comment on or make changes to this bug.