Add helpers for partial descendant traversal to element iterators
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Nov 2013 11:13:53 +0000 (11:13 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Nov 2013 11:13:53 +0000 (11:13 +0000)
commit0cdac912436d703410272e8daf212b65e1db7185
treeeb175b369812b1c81d674830d5d7533c2d29b402
parent095810079c1be7951263643c495e1a9f5e3929b5
Add helpers for partial descendant traversal to element iterators
https://bugs.webkit.org/show_bug.cgi?id=123703

Reviewed by Andreas Kling.

* dom/ElementAncestorIterator.h:
(WebCore::lineageOfType):

    lineageOfType definition didn't match the declaration.

* dom/ElementDescendantIterator.h:
(WebCore::::find):
(WebCore::::from):

    Add find and from for getting begin iterator for partial traversals.

* editing/FrameSelection.cpp:
(WebCore::scanForForm):
(WebCore::FrameSelection::currentForm):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::formElementIndex):
(WebCore::HTMLFormElement::findClosestFormAncestor):

    Use them in a few places.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/ElementAncestorIterator.h
Source/WebCore/dom/ElementDescendantIterator.h
Source/WebCore/editing/FrameSelection.cpp
Source/WebCore/html/HTMLFormElement.cpp