Bug 119943

Summary: Clean up the Document class a bit
Product: WebKit Reporter: Darin Adler <darin>
Component: DOMAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, esprehn+autocc, japhet, kangil.han
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch koivisto: review+, koivisto: commit-queue-

Description Darin Adler 2013-08-17 06:42:54 PDT
Clean up the Document class a bit
Comment 1 Darin Adler 2013-08-17 06:52:36 PDT
Created attachment 208992 [details]
Patch
Comment 2 Antti Koivisto 2013-08-17 07:21:14 PDT
Comment on attachment 208992 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=208992&action=review

> Source/WebCore/dom/Document.cpp:1561
> +        for (Element* element = headElement->firstElementChild(); element; element = element->nextElementSibling()) {

The modern way to do this is to use ElementTraversal instead of DOM APIs.
Comment 3 Darin Adler 2013-08-17 07:25:08 PDT
(In reply to comment #2)
> The modern way to do this is to use ElementTraversal instead of DOM APIs.

Funny: I thought of that, but I thought it was only when you wanted to walk in document order, didn’t realize you could use it just to walk children. Will fix.
Comment 4 Darin Adler 2013-08-17 07:47:21 PDT
Committed r154228: <http://trac.webkit.org/changeset/154228>
Comment 5 Lucas Forschler 2019-02-06 09:02:33 PST
Mass moving XML DOM bugs to the "DOM" Component.