Bug 159488 - Document.body should return the first child of the html element that is either a body / frameset element
Summary: Document.body should return the first child of the html element that is eithe...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: WebExposed
Depends on:
Blocks: 119115
  Show dependency treegraph
 
Reported: 2016-07-06 13:51 PDT by Chris Dumez
Modified: 2016-07-06 19:05 PDT (History)
6 users (show)

See Also:


Attachments
Patch (11.16 KB, patch)
2016-07-06 13:54 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 2016-07-06 13:51:29 PDT
Document.body should return the first child of the html element that is either a body / frameset element:
- https://html.spec.whatwg.org/multipage/dom.html#dom-document-body
- https://html.spec.whatwg.org/multipage/dom.html#the-body-element-2

We use the first child of the *document* element that is either a body / frameset element, even if the document element is not an html element.

Firefox and Chrome match the specification.
Comment 1 Chris Dumez 2016-07-06 13:54:29 PDT
Created attachment 282942 [details]
Patch
Comment 2 Chris Dumez 2016-07-06 15:13:54 PDT
Comment on attachment 282942 [details]
Patch

Clearing flags on attachment: 282942

Committed r202881: <http://trac.webkit.org/changeset/202881>
Comment 3 Chris Dumez 2016-07-06 15:13:59 PDT
All reviewed patches have been landed.  Closing bug.