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

Issue 639139 link

Starred by 2 users

Issue metadata

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

Blocking:
issue 585875



Sign in to add a comment

Support |dataTransfer| in 'beforeinput'

Project Member Reported by chongz@chromium.org, Aug 18 2016

Issue description

|dataTransfer| field is used to carry rich data in 'beforeinput'. (where |data| field is used for plain text).

An overview of |dataTransfer| and |data|:
https://w3c.github.io/input-events/#h-overview
(Basically only InputType 'cut'/'paste'/'drag'/'drop'/'insertNonText' has |dataTransfer|.)

Discussion outcome from July F2F:
https://docs.google.com/document/d/1XxIEF0So-kMF5mcJ03Yj0zsYMFRHEgXw1fV1K5FOwuQ/edit#heading=h.ofol1qgk582l
 

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

Blocking: -609142 585875
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 26 2016

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

commit 952c4101425ed85bf53ded777e5a882895646980
Author: chongz <chongz@chromium.org>
Date: Fri Aug 26 06:33:31 2016

[InputEvent] Support |deleteByCut|&|insertFromPaste| with |dataTransfer| field

* Event order: (see July F2F[1] and GitHub discussion[2])
  1. Clipboard API cut
  2. (Clipboard update)
  3. 'beforeinput' InputType=|deleteByCut|
  4. (DOM update)
  5. 'input' InputType=|deleteByCut|

* Canceling 'beforeinput' will only prevent DOM update.

* |dataTransfer| field: (see Editing spec discussion[3])
  1. NULL for |deleteByCut| (JS could always get from selection)
  2. Readonly |dataTransfer| for |insertFromPaste|

[1] Editing TF July F2F:
https://docs.google.com/document/d/1XxIEF0So-kMF5mcJ03Yj0zsYMFRHEgXw1fV1K5FOwuQ/edit#heading=h.l9vlzb1oc68r

[2] GitHub discussion for event order:
https://github.com/w3c/editing/issues/144#issuecomment-240892363

[3] Editing spec discussion:
https://github.com/w3c/editing/issues/144#issuecomment-240259209

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

BUG= 639139 

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

[add] https://crrev.com/952c4101425ed85bf53ded777e5a882895646980/third_party/WebKit/LayoutTests/fast/events/inputevents/beforeinput-remove-iframe-crash.html
[add] https://crrev.com/952c4101425ed85bf53ded777e5a882895646980/third_party/WebKit/LayoutTests/fast/events/inputevents/inputevent-cut-paste.html
[modify] https://crrev.com/952c4101425ed85bf53ded777e5a882895646980/third_party/WebKit/LayoutTests/fast/events/inputevents/inputevent-execcommand.html
[modify] https://crrev.com/952c4101425ed85bf53ded777e5a882895646980/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/952c4101425ed85bf53ded777e5a882895646980/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/952c4101425ed85bf53ded777e5a882895646980/third_party/WebKit/Source/core/editing/EditingUtilities.h
[modify] https://crrev.com/952c4101425ed85bf53ded777e5a882895646980/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/952c4101425ed85bf53ded777e5a882895646980/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/952c4101425ed85bf53ded777e5a882895646980/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
[modify] https://crrev.com/952c4101425ed85bf53ded777e5a882895646980/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
[modify] https://crrev.com/952c4101425ed85bf53ded777e5a882895646980/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
[modify] https://crrev.com/952c4101425ed85bf53ded777e5a882895646980/third_party/WebKit/Source/core/events/InputEvent.cpp
[modify] https://crrev.com/952c4101425ed85bf53ded777e5a882895646980/third_party/WebKit/Source/core/events/InputEvent.h
[modify] https://crrev.com/952c4101425ed85bf53ded777e5a882895646980/third_party/WebKit/Source/core/events/InputEvent.idl
[modify] https://crrev.com/952c4101425ed85bf53ded777e5a882895646980/third_party/WebKit/Source/core/events/InputEventInit.idl

Status: Fixed (was: Started)

Sign in to add a comment