New issue
Advanced search Search tips

Issue 732217 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Range.insertNode() conformance test failure

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

Issue description

Chrome Version: 61 canary
OS: All but iOS

What steps will reproduce the problem?
(1) Open the following URL:
    http://w3c-test.org/dom/ranges/Range-insertNode.html?subtest=21,1
(2) Observe the rendered page

What is the expected result?
There should be two PASS tests

What happens instead?
The second test fails.


Please use labels and text to provide additional information.
Resultant endOffset is incorrect.
It seems we need to adjust endOffset even if |start_ != end_| before mutation.

Specification: https://dom.spec.whatwg.org/#concept-range-insert
Edge: Same error as Chrome
Firefox: Pass
Safari: Pass


 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 12 2017

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

commit daabe8fd6944d0809179b76a7bd02d9f89044b54
Author: Kent Tamura <tkent@chromium.org>
Date: Mon Jun 12 10:13:29 2017

Make ContainerNode::EnsurePreInsertionValidity() public, and non-inline.

This is a preparation to fix  crbug.com/732217 . Range.insertNode() will use
EnsurePreInsertionValidity().

Bug:  732217 
Change-Id: I3a348c8b9ea60d1b39b5a1d3b708a092abccbaab
Reviewed-on: https://chromium-review.googlesource.com/530868
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478574}
[modify] https://crrev.com/daabe8fd6944d0809179b76a7bd02d9f89044b54/third_party/WebKit/Source/core/dom/ContainerNode.h

Project Member

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

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

commit 7f4d857166a63d68e02e9ef769985d7f1cc8f2c2
Author: Kent Tamura <tkent@chromium.org>
Date: Wed Jun 14 01:39:24 2017

Re-implement precondition check in Range::insertNode().

Reimplement it to follow the specification [1].
This CL doesn't change behavior except exception types/messages.

This CL is a preparation to fix  crbug.com/732217 .

[1] https://dom.spec.whatwg.org/#concept-range-insert

Bug:  732217 
Change-Id: I0e25f2152d205f5af05b6cae76340e9dad3401c2
Reviewed-on: https://chromium-review.googlesource.com/532733
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479246}
[modify] https://crrev.com/7f4d857166a63d68e02e9ef769985d7f1cc8f2c2/third_party/WebKit/LayoutTests/fast/dom/Range/range-exceptions-expected.txt
[modify] https://crrev.com/7f4d857166a63d68e02e9ef769985d7f1cc8f2c2/third_party/WebKit/LayoutTests/fast/dom/Range/range-exceptions.html
[modify] https://crrev.com/7f4d857166a63d68e02e9ef769985d7f1cc8f2c2/third_party/WebKit/Source/core/dom/Range.cpp

Project Member

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

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

commit 26975712a1e5c20fd099bddd6a45c4cf90a65963
Author: Kent Tamura <tkent@chromium.org>
Date: Wed Jun 14 03:22:27 2017

Update Range.prototype.insertNode() implementation to match to the DOM standard.

This CL fixes one test failure in wpt/dom/ranges/Range-insertNode.html.

Bug:  732217 
Change-Id: Id3c7d6ee1d7cff51b15089f9dff407df4c83b6f9
Reviewed-on: https://chromium-review.googlesource.com/535134
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479271}
[delete] https://crrev.com/15092e9195954cbc331cd58e344d0895fe03d0cd/third_party/WebKit/LayoutTests/external/wpt/dom/ranges/Range-insertNode-expected.txt
[modify] https://crrev.com/26975712a1e5c20fd099bddd6a45c4cf90a65963/third_party/WebKit/Source/core/dom/Range.cpp

Comment 4 by tkent@chromium.org, Jun 14 2017

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

Sign in to add a comment