Bug 148787 - Document.body should return the first body / frameset child of the html element
Summary: Document.body should return the first body / frameset child of the html element
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: https://html.spec.whatwg.org/multipag...
Keywords: InRadar, WebExposed
Depends on:
Reported: 2015-09-03 22:30 PDT by Chris Dumez
Modified: 2015-09-04 10:40 PDT (History)
6 users (show)

See Also:

Patch (4.31 KB, patch)
2015-09-03 22:35 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2015-09-03 22:30:00 PDT
Document.body should return the *first* body / frameset child of the html element as per the specification:

Chrome and Firefox both behave correctly. However, WebKit first looks for a frameset child and returns it if it find one. It then falls back to looking for a body child. document.body thus returns a wrong result in this case:

This is covered by the following newly imported W3C test:
Comment 1 Chris Dumez 2015-09-03 22:30:35 PDT
Comment 2 Chris Dumez 2015-09-03 22:35:34 PDT
Created attachment 260568 [details]
Comment 3 WebKit Commit Bot 2015-09-04 10:40:17 PDT
Comment on attachment 260568 [details]

Clearing flags on attachment: 260568

Committed r189354: <http://trac.webkit.org/changeset/189354>
Comment 4 WebKit Commit Bot 2015-09-04 10:40:21 PDT
All reviewed patches have been landed.  Closing bug.