New issue
Advanced search Search tips

Issue 691422 link

Starred by 2 users

Issue metadata

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

Blocking:
issue 683066



Sign in to add a comment

Selection API: collapse(), extend(), setBaseAndExtend, and selectAllChildren() should throw InvalidNodeTypeError for DOCTYPE, and IndexSizeError for too large offsets

Project Member Reported by tkent@chromium.org, Feb 13 2017

Issue description

Chrome Version: ToT
OS: All but iOS

The summary explains almost everything.
This issue is a part of http://w3c-test.org/selection/ failures.

Firefox and Edge work as expected.

 

Comment 1 by tkent@chromium.org, Feb 13 2017

Blocking: 683066

Comment 2 by tkent@chromium.org, Feb 13 2017

Summary: Selection API: collapse(), extend(), setBaseAndExtend, and selectAllChildren() should throw InvalidNodeTypeError for DOCTYPE, and IndexSizeError for too large offsets (was: Selection API: collapse(), extend(), setBaseAndExtend, and selectAllChildren() should throw InvalidNodeTypeError for DOCTYPE)
Project Member

Comment 3 by bugdroid1@chromium.org, Feb 13 2017

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

commit 66f70447e561ce2d850be2e2ef4d1a1be4364ac7
Author: tkent <tkent@chromium.org>
Date: Mon Feb 13 18:05:47 2017

Selection API: Some functions should throw InvalidNodeTypeError and IndexSizeError.

* setBaseAndExtent() should throw InvalidNodeTypeError for DOCTYPEs.

* setBaseAndExtent() should throw IndexSizeError for too large offsets.

* extend() should InvalidNodeTyepError for DOCTYPEs.

* collapse() should call checkNodeWOffset() earlier than isValidForPosition()
  https://www.w3.org/TR/selection-api/#dom-selection-collapse
  checkNodeWOffset() is for step 2, isValidForPosition() is for step 3.

New behavior matches to Edge, Firefox, and Selection API standard.
This CL fixes 589 sub-tests in external/wpt/selection/.

* fast/forms/file/file-crash-by-runin-parent.html
This CL removes the test because the test is obsolete. We removed display:run-in
several years ago.

BUG= 691422 

Review-Url: https://codereview.chromium.org/2693813002
Cr-Commit-Position: refs/heads/master@{#450006}

[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/execCommand/apply-inline-style-to-element-with-no-renderer-crash.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/execCommand/outdent-selection.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/inserting/replace-at-visible-boundary.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/pasteboard/cleanup-on-move.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/pasteboard/drag-list-item.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/pasteboard/drag-selected-image-to-contenteditable.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/pasteboard/paste-visible-script.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/pasteboard/script-tests/dataTransfer-setData-getData.js
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/pasteboard/testcase-9507.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/selection/DOMSelection-DocumentType-expected.txt
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/selection/extend-expected.txt
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/selection/script-tests/DOMSelection-DocumentType.js
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr-2.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/selection/select-text-overflow-ellipsis-mixed-in-ltr.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl-2.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/selection/select-text-overflow-ellipsis-mixed-in-rtl.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/selection/selection-invalid-offset-expected.txt
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/selection/selection-invalid-offset.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/selection/skip-over-contenteditable.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/selection/skip-over-uneditable-in-contenteditable.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/editing/style/apply-style-crash2.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/external/wpt/selection/collapse-00-expected.txt
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/external/wpt/selection/collapse-30-expected.txt
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/external/wpt/selection/extend-00-expected.txt
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/external/wpt/selection/extend-20-expected.txt
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/external/wpt/selection/extend-40-expected.txt
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/external/wpt/selection/selectAllChildren-expected.txt
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/external/wpt/selection/setBaseAndExtent-expected.txt
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/fast/block/float/float-list-changed-before-layout-crash.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/fast/dynamic/checkbox-selection-crash.html
[delete] https://crrev.com/f212cc56820dda5e8b5d902a15e39bcb09c37df5/third_party/WebKit/LayoutTests/fast/forms/file/file-crash-by-runin-parent-expected.txt
[delete] https://crrev.com/f212cc56820dda5e8b5d902a15e39bcb09c37df5/third_party/WebKit/LayoutTests/fast/forms/file/file-crash-by-runin-parent.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/fast/text/selection-exceptions-expected.txt
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/fast/text/selection-exceptions.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/http/tests/security/resources/foreign-domain-iframe-for-selection-test.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/inspector/console/console-viewport-selection.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/paint/invalidation/selected-replaced.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/LayoutTests/paint/selection/selection-drag-image-in-iframe.html
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/Source/core/editing/DOMSelection.cpp
[modify] https://crrev.com/66f70447e561ce2d850be2e2ef4d1a1be4364ac7/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js

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

Labels: M-58
Status: Fixed (was: Started)
Chromestatus entries for this:
https://www.chromestatus.com/feature/5696359768260608
https://www.chromestatus.com/feature/5632500684554240

Sign in to add a comment