Bug 159488

Summary: Document.body should return the first child of the html element that is either a body / frameset element
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, darin, esprehn+autocc, kangil.han, rniwa
Priority: P2 Keywords: WebExposed
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=159490
Bug Depends on:    
Bug Blocks: 119115    
Attachments:
Description Flags
Patch none

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.