Bug 120979

Summary: Separate forward and backward paths in ComposedShadowTreeWalker
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, kangil.han
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch kling: review+

Description Antti Koivisto 2013-09-07 17:06:17 PDT
make it clearer
Comment 1 Antti Koivisto 2013-09-07 17:09:33 PDT
Created attachment 210937 [details]
patch
Comment 2 Andreas Kling 2013-09-07 17:16:51 PDT
Comment on attachment 210937 [details]
patch

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

r=me. Almost there eh?

> Source/WebCore/dom/ComposedShadowTreeWalker.cpp:131
> +    ASSERT(node);
> +    ASSERT(node);

Maybe you should also assert that 'node' is non-null here.

> Source/WebCore/dom/ComposedShadowTreeWalker.cpp:150
>      ASSERT(node);
> -    if (Node* found = traverseSiblings(direction == TraversalDirectionForward ? node->nextSibling() : node->previousSibling(), direction))
> -        return found;
> -    return escapeFallbackContentElement(node, direction);
> +    ASSERT(node);

And here.
Comment 3 Antti Koivisto 2013-09-08 00:02:12 PDT
https://trac.webkit.org/r155287