New issue
Advanced search Search tips

Issue 731353 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Sibling algorithm of DOM TreeWalker doesn't match to the DOM standard

Project Member Reported by tkent@chromium.org, Jun 9 2017

Issue description

Chrome Version: 61 canary
OS: All but iOS

What steps will reproduce the problem?
(1) Open http://w3c-test.org/dom/traversal/TreeWalker.html

What is the expected result?
No tests with Fail

What happens instead?
There are five failing tests.

Please use labels and text to provide additional information.

Spec: https://dom.spec.whatwg.org/#concept-traverse-siblings

It seems handling a return value other than FILTER_ACCEPT/FILETER_REJECT/FILETER_SKIP is incorrect.


Firefox and Safari pass all tests.

 

Comment 1 by tkent@chromium.org, Jun 9 2017

Owner: tkent@chromium.org
Status: Started (was: Available)
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/17f4b143b3214dac41bd1dbee3946495a0837281

commit 17f4b143b3214dac41bd1dbee3946495a0837281
Author: Kent Tamura <tkent@chromium.org>
Date: Fri Jun 09 07:29:51 2017

TreeWalker: Templatize previousSibling() and nextSibling().

Introduce a template function TraverseSiblings() to unify duplicated code.
NodeTraversalStrategy.h is a helper for the template.

This CL has no behavior changes, and is a preparation to fix  crbug.com/731353 .

Bug:  731353 
Change-Id: Idf4cc5f2a5ed48f4a426fa697fc24c2ace3fcb21
Reviewed-on: https://chromium-review.googlesource.com/527760
Commit-Queue: Kent Tamura <tkent@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478224}
[modify] https://crrev.com/17f4b143b3214dac41bd1dbee3946495a0837281/third_party/WebKit/Source/core/dom/BUILD.gn
[add] https://crrev.com/17f4b143b3214dac41bd1dbee3946495a0837281/third_party/WebKit/Source/core/dom/NodeTraversalStrategy.h
[modify] https://crrev.com/17f4b143b3214dac41bd1dbee3946495a0837281/third_party/WebKit/Source/core/dom/TreeWalker.cpp
[modify] https://crrev.com/17f4b143b3214dac41bd1dbee3946495a0837281/third_party/WebKit/Source/core/dom/TreeWalker.h

Project Member

Comment 3 by bugdroid1@chromium.org, Jun 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2acce89a14e82614e3eb2bf3d92b71a9b195b854

commit 2acce89a14e82614e3eb2bf3d92b71a9b195b854
Author: Kent Tamura <tkent@chromium.org>
Date: Fri Jun 09 07:35:54 2017

TreeWalker: Fix incorrect handling of non-standard values returned by a NodeFilter.

Bug:  731353 
Change-Id: I0a377cfc254994e62e7f29d9bd9c65f22a3ee023
Reviewed-on: https://chromium-review.googlesource.com/527761
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478229}
[delete] https://crrev.com/f06caa00b89bc8fc4c7edb8acf3a378a91ddff01/third_party/WebKit/LayoutTests/external/wpt/dom/traversal/TreeWalker-expected.txt
[modify] https://crrev.com/2acce89a14e82614e3eb2bf3d92b71a9b195b854/third_party/WebKit/Source/core/dom/TreeWalker.cpp

Project Member

Comment 4 by bugdroid1@chromium.org, Jun 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bf2bd9149f20b8ffe73e74c0c6a939cb2220c5e5

commit bf2bd9149f20b8ffe73e74c0c6a939cb2220c5e5
Author: Kent Tamura <tkent@chromium.org>
Date: Fri Jun 09 08:14:48 2017

TreeWakler: Update TreeWalker::TraverseSiblings() so that it looks to follow the DOM standard.

Restructure the code, and add step comments.
This CL has no behavior changes.

Bug:  731353 
Change-Id: I3b353fa654e1bc7046d42ad213b1b99ddd51e4bd
Reviewed-on: https://chromium-review.googlesource.com/527542
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478234}
[modify] https://crrev.com/bf2bd9149f20b8ffe73e74c0c6a939cb2220c5e5/third_party/WebKit/Source/core/dom/TreeWalker.cpp

Comment 5 by tkent@chromium.org, Jun 9 2017

Labels: M-61
Status: Fixed (was: Started)

Sign in to add a comment