New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 609142 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 585875



Sign in to add a comment

Support 'StaticRange' in 'beforeinput'

Project Member Reported by chongz@chromium.org, May 4 2016

Issue description

'StaticRange' is a lightweight version of 'Range' which doesn't need to be updated when there are DOM mutations, and it could be up-converted to a full-featured 'Range' when needed. (The name 'Static' could be changed.)

Multiple browser vendors (Apple, Google, Microsoft) have discussed the issue and came up with a proposal: https://lists.w3.org/Archives/Public/public-editing-tf/2016Jan/0026.html

Also see recent mailing list discussion: https://lists.w3.org/Archives/Public/public-editing-tf/2016Apr/0012.html

Explainer for the proposal: https://github.com/garykac/staticrange/blob/master/staticrange.md

WICG Discourse: https://discourse.wicg.io/t/proposal-staticrange-to-be-used-instead-of-range-for-new-apis/1472
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 1 2016

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

commit 5d7c0b13d1cd8e480c7a1b4d9bdd53f9383f2aef
Author: chongz <chongz@chromium.org>
Date: Wed Jun 01 14:00:33 2016

[InputEvent] Support |sequence<Range> getRanges()| in 'beforeinput'

This is the first step to support |getRanges()| in 'beforeinput', the
next step will be introducing |StaticRange| and change the method to
|sequence<StaticRange> getRanges()|.

This CL adds supports to all delete related actions, such as
delete-character/word/line/paragraph (forward and backward).

Will add support to other inputTypes when the spec is ready.

SPEC=http://w3c.github.io/editing/input-events.html
BUG= 609142 

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

[add] https://crrev.com/5d7c0b13d1cd8e480c7a1b4d9bdd53f9383f2aef/third_party/WebKit/LayoutTests/fast/events/inputevents/before-input-ranges.html
[modify] https://crrev.com/5d7c0b13d1cd8e480c7a1b4d9bdd53f9383f2aef/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/5d7c0b13d1cd8e480c7a1b4d9bdd53f9383f2aef/third_party/WebKit/Source/core/dom/Range.h
[modify] https://crrev.com/5d7c0b13d1cd8e480c7a1b4d9bdd53f9383f2aef/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/5d7c0b13d1cd8e480c7a1b4d9bdd53f9383f2aef/third_party/WebKit/Source/core/editing/EditingUtilities.h
[modify] https://crrev.com/5d7c0b13d1cd8e480c7a1b4d9bdd53f9383f2aef/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/5d7c0b13d1cd8e480c7a1b4d9bdd53f9383f2aef/third_party/WebKit/Source/core/editing/InputMethodController.cpp
[modify] https://crrev.com/5d7c0b13d1cd8e480c7a1b4d9bdd53f9383f2aef/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
[modify] https://crrev.com/5d7c0b13d1cd8e480c7a1b4d9bdd53f9383f2aef/third_party/WebKit/Source/core/events/InputEvent.cpp
[modify] https://crrev.com/5d7c0b13d1cd8e480c7a1b4d9bdd53f9383f2aef/third_party/WebKit/Source/core/events/InputEvent.h
[modify] https://crrev.com/5d7c0b13d1cd8e480c7a1b4d9bdd53f9383f2aef/third_party/WebKit/Source/core/events/InputEvent.idl
[modify] https://crrev.com/5d7c0b13d1cd8e480c7a1b4d9bdd53f9383f2aef/third_party/WebKit/Source/core/events/InputEventInit.idl

Project Member

Comment 2 by bugdroid1@chromium.org, Jun 7 2016

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

commit f60c2289f4ac727397e04c1b774af9711897eef1
Author: chongz <chongz@chromium.org>
Date: Tue Jun 07 21:30:21 2016

[InputEvent] Introduce |StaticRange| and use in |InputEvent::getRanges()|

|StaticRange| is a lightweight version of |Range|, but it
does not mutate on DOM change, so using |StaticRange| won't
slow down DOM operations.

|StaticRange| should be used in new APIs, and it
provides method |toRange()| to up-convert to a fully
featured |Range| object when necessary.

Currently it's |RuntimeEnabled=InputEvent| since it's only
used by |InputEvent|.

Proposal=https://github.com/garykac/staticrange/blob/master/staticrange.md
WICG=https://discourse.wicg.io/t/proposal-staticrange-to-be-used-instead-of-range-for-new-apis/1472
BUG= 609142 

Intent to Implement:
https://groups.google.com/a/chromium.org/forum/#!searchin/blink-dev/InputEvent/blink-dev/RrnitB0OElc/rirueVekCwAJ

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

[add] https://crrev.com/f60c2289f4ac727397e04c1b774af9711897eef1/third_party/WebKit/LayoutTests/fast/dom/StaticRange/staticrange-constructor.html
[add] https://crrev.com/f60c2289f4ac727397e04c1b774af9711897eef1/third_party/WebKit/LayoutTests/fast/dom/StaticRange/staticrange-no-mutate.html
[modify] https://crrev.com/f60c2289f4ac727397e04c1b774af9711897eef1/third_party/WebKit/LayoutTests/fast/events/inputevents/before-input-ranges.html
[modify] https://crrev.com/f60c2289f4ac727397e04c1b774af9711897eef1/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/f60c2289f4ac727397e04c1b774af9711897eef1/third_party/WebKit/Source/core/core.gypi
[add] https://crrev.com/f60c2289f4ac727397e04c1b774af9711897eef1/third_party/WebKit/Source/core/dom/StaticRange.cpp
[add] https://crrev.com/f60c2289f4ac727397e04c1b774af9711897eef1/third_party/WebKit/Source/core/dom/StaticRange.h
[add] https://crrev.com/f60c2289f4ac727397e04c1b774af9711897eef1/third_party/WebKit/Source/core/dom/StaticRange.idl
[add] https://crrev.com/f60c2289f4ac727397e04c1b774af9711897eef1/third_party/WebKit/Source/core/dom/StaticRangeTest.cpp
[modify] https://crrev.com/f60c2289f4ac727397e04c1b774af9711897eef1/third_party/WebKit/Source/core/events/InputEvent.cpp
[modify] https://crrev.com/f60c2289f4ac727397e04c1b774af9711897eef1/third_party/WebKit/Source/core/events/InputEvent.h
[modify] https://crrev.com/f60c2289f4ac727397e04c1b774af9711897eef1/third_party/WebKit/Source/core/events/InputEvent.idl

Comment 3 by chongz@chromium.org, Aug 18 2016

Blockedon: 639139

Comment 4 by chongz@chromium.org, Aug 25 2016

Blockedon: -639139

Comment 5 by chongz@chromium.org, Aug 25 2016

Status: Fixed (was: Started)

Sign in to add a comment