Changeset 202881 in webkit
- Timestamp:
- Jul 6, 2016 3:13:18 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r202873 r202881 1 2016-07-06 Chris Dumez <cdumez@apple.com> 2 3 Document.body should return the first child of the html element that is either a body / frameset element 4 https://bugs.webkit.org/show_bug.cgi?id=159488 5 6 Reviewed by Ryosuke Niwa. 7 8 Import corresponding W3C test. 9 10 * web-platform-tests/html/dom/documents/dom-tree-accessors/Document.body-expected.txt: Added. 11 * web-platform-tests/html/dom/documents/dom-tree-accessors/Document.body.html: Added. 12 1 13 2016-07-06 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r202880 r202881 1 2016-07-06 Chris Dumez <cdumez@apple.com> 2 3 Document.body should return the first child of the html element that is either a body / frameset element 4 https://bugs.webkit.org/show_bug.cgi?id=159488 5 6 Reviewed by Ryosuke Niwa. 7 8 Document.body should return the first child of the html element that is 9 either a body / frameset element: 10 - https://html.spec.whatwg.org/multipage/dom.html#dom-document-body 11 - https://html.spec.whatwg.org/multipage/dom.html#the-body-element-2 12 13 We used the first child of the *document* element that is either a 14 body / frameset element, even if the document element is not an html 15 element. 16 17 Firefox and Chrome match the specification. 18 19 Test: imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/Document.body.html 20 21 * dom/Document.cpp: 22 (WebCore::Document::bodyOrFrameset): 23 1 24 2016-07-06 Dean Jackson <dino@apple.com> 2 25 -
trunk/Source/WebCore/dom/Document.cpp
r202769 r202881 2614 2614 // Return the first body or frameset child of the html element. 2615 2615 auto* element = documentElement(); 2616 if (! element)2616 if (!is<HTMLHtmlElement>(element)) 2617 2617 return nullptr; 2618 2618 for (auto& child : childrenOfType<HTMLElement>(*element)) {
Note: See TracChangeset
for help on using the changeset viewer.