Separate forward and backward paths in ComposedShadowTreeWalker
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 8 Sep 2013 07:02:42 +0000 (07:02 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 8 Sep 2013 07:02:42 +0000 (07:02 +0000)
commit61e255fadf758cecae2fa0a2ac400ed806408b2c
treeca518e8302dbea397fb58c8f94b44814e94e491c
parent65d1bf2586c3275bfd74791b04bc317a3c5c2da8
Separate forward and backward paths in ComposedShadowTreeWalker
https://bugs.webkit.org/show_bug.cgi?id=120979

Reviewed by Andreas Kling.

Have separate first/last and next/previous paths instead of using a direction enum.

Reduce the number of helper functions and give them more understandable names.

* dom/ComposedShadowTreeWalker.cpp:
(WebCore::findFirstSiblingEnteringInsertionPoints):
(WebCore::findFirstEnteringInsertionPoints):
(WebCore::findFirstFromDistributedNode):
(WebCore::findLastSiblingEnteringInsertionPoints):
(WebCore::findLastEnteringInsertionPoints):
(WebCore::findLastFromDistributedNode):
(WebCore::ComposedShadowTreeWalker::firstChild):
(WebCore::ComposedShadowTreeWalker::traverseFirstChild):
(WebCore::ComposedShadowTreeWalker::lastChild):
(WebCore::ComposedShadowTreeWalker::traverseLastChild):
(WebCore::ComposedShadowTreeWalker::nextSibling):
(WebCore::ComposedShadowTreeWalker::previousSibling):
(WebCore::ComposedShadowTreeWalker::traverseNextSibling):
(WebCore::ComposedShadowTreeWalker::traversePreviousSibling):
* dom/ComposedShadowTreeWalker.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/ComposedShadowTreeWalker.cpp
Source/WebCore/dom/ComposedShadowTreeWalker.h