Bug 119943 - Clean up the Document class a bit
Summary: Clean up the Document class a bit
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-17 06:42 PDT by Darin Adler
Modified: 2019-02-06 09:02 PST (History)
5 users (show)

See Also:


Attachments
Patch (10.16 KB, patch)
2013-08-17 06:52 PDT, Darin Adler
koivisto: review+
koivisto: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.