Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(587)

Issue 2840163002: DOM: NodeIterator.filter and TreeWalker.filter should return values which were specified to createN… (Closed)

Created:
3 years, 8 months ago by tkent
Modified:
3 years, 7 months ago
Reviewers:
haraken, peria, bashi, Yuki
CC:
blink-reviews, blink-reviews-bindings_chromium.org, blink-reviews-dom_chromium.org, blink-reviews-w3ctests_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

DOM: NodeIterator.filter and TreeWalker.filter should return values which were specified to createNodeIterator/createTreeWalker. We used to return values wrapped by NodeIterator interface. The DOM specification doesn't define such behavior, and Edge, Firefox, and Safari do not. The core part of this CL is CPP_VALUE_TO_V8_VALUE in v8_types.py. We return a v8 value stored in V8NodeFilterCondition. Because we don't need to wrap values by NodeFilter, this CL has simplification like: - Cleanup of indirection ownership; Old: NodeIteratorBase -> NodeFilter -> V8NodeFilterCondition as NodeFilterCondition New: NodeIteratorBase -> V8NodeFilterCondition - Removal of a V8PrivateProperty It can be replaced with TraceWrapper. This CL fixes 1,106 failures in external/wpt/dom/. BUG=591919, 715418 Review-Url: https://codereview.chromium.org/2840163002 Cr-Commit-Position: refs/heads/master@{#467599} Committed: https://chromium.googlesource.com/chromium/src/+/772fbff236bdf680788846586a34e9f4d074b2c5

Patch Set 1 #

Total comments: 20

Patch Set 2 : ToV8(V8NodeFilterCondition*, ...) #

Total comments: 2

Patch Set 3 : Move ToV8() to ToV8ForCore.h, etc. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+649 lines, -1518 lines) Patch
D third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Document-createTreeWalker-expected.txt View 1 chunk +0 lines, -8 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/dom/traversal/NodeIterator-expected.txt View 1 chunk +0 lines, -749 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/dom/traversal/TreeWalker-expected.txt View 1 chunk +557 lines, -556 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/constants.html View 2 chunks +1 line, -29 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/constants-expected.txt View 2 chunks +1 line, -17 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/global-constructors.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/node-filter-use-counters.html View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ToV8ForCore.h View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8BindingForCore.cpp View 3 chunks +0 lines, -22 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.h View 1 2 2 chunks +18 lines, -29 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp View 1 2 2 chunks +12 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_types.py View 1 2 6 chunks +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp View 1 2 5 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/dom/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 2 3 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/NodeFilter.h View 1 2 chunks +9 lines, -15 lines 0 comments Download
D third_party/WebKit/Source/core/dom/NodeFilter.cpp View 1 chunk +0 lines, -39 lines 0 comments Download
M third_party/WebKit/Source/core/dom/NodeFilterCondition.h View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/NodeIterator.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/NodeIterator.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/NodeIteratorBase.h View 2 chunks +7 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/dom/NodeIteratorBase.cpp View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/TreeWalker.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/TreeWalker.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/heap/WrapperVisitor.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 39 (27 generated)
tkent
bashi@, peria@, would you review this please? This is the first step to support 'NodeFilter ...
3 years, 8 months ago (2017-04-26 06:35:35 UTC) #7
peria
Cool! LGTM from my side, but please wait bashi@'s look.
3 years, 8 months ago (2017-04-26 06:50:11 UTC) #8
Yuki
LGTM. https://codereview.chromium.org/2840163002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp File third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp (right): https://codereview.chromium.org/2840163002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp#newcode58 third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp:58: visitor->TraceWrappers(filter_.Cast<v8::Value>()); nit: No need of casting. visitor->TraceWrappers(filter_); should ...
3 years, 8 months ago (2017-04-26 08:36:49 UTC) #12
haraken
LGTM https://codereview.chromium.org/2840163002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp File third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp (right): https://codereview.chromium.org/2840163002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp#newcode52 third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp:52: filter_.Clear(); Nit: I'd prefer doing: if (!filter.IsEmpty() && ...
3 years, 8 months ago (2017-04-26 09:03:35 UTC) #14
bashi
lgtm on my side.
3 years, 7 months ago (2017-04-26 23:18:20 UTC) #15
tkent
Thank you for many LGTMs and feedbacks :) https://codereview.chromium.org/2840163002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp File third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp (right): https://codereview.chromium.org/2840163002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp#newcode52 third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp:52: filter_.Clear(); ...
3 years, 7 months ago (2017-04-26 23:25:34 UTC) #18
tkent
> > BTW why do we need a special handling for NodeFilter (i.e., V8NodeFilterCondition) different ...
3 years, 7 months ago (2017-04-27 02:06:38 UTC) #25
haraken
On 2017/04/27 02:06:38, tkent wrote: > > > BTW why do we need a special ...
3 years, 7 months ago (2017-04-27 02:07:36 UTC) #26
Yuki
LGTM. https://codereview.chromium.org/2840163002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp File third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp (right): https://codereview.chromium.org/2840163002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp#newcode58 third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp:58: visitor->TraceWrappers(filter_.Cast<v8::Value>()); On 2017/04/26 23:25:34, tkent wrote: > On ...
3 years, 7 months ago (2017-04-27 02:58:45 UTC) #27
tkent
https://codereview.chromium.org/2840163002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp File third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp (right): https://codereview.chromium.org/2840163002/diff/1/third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp#newcode58 third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp:58: visitor->TraceWrappers(filter_.Cast<v8::Value>()); On 2017/04/27 at 02:58:45, Yuki wrote: > On ...
3 years, 7 months ago (2017-04-27 05:59:00 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2840163002/60001
3 years, 7 months ago (2017-04-27 05:59:23 UTC) #36
commit-bot: I haz the power
3 years, 7 months ago (2017-04-27 06:04:55 UTC) #39
Message was sent while issue was closed.
Committed patchset #3 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/772fbff236bdf680788846586a34...

Powered by Google App Engine
This is Rietveld 408576698