DescriptionMake queryCommandSupported(copy|cut|paste) always return true
This patch makes |document.queryCommandSupported(name)| always return true for
"Copy", "Cut", and "Paste" commands to follow the editing API specification.
Before this patch, |queryCommandSupported()| returns value based on clipboard
accessibility, e.g. "clipboardRead" and "clipboardWrite" permission in Chrome
extensions. This behavior ins't compatible with the editing specification and
its intention. |queryCommandSupported()| should returns true for command
which can be passed to |execCommand()|, and other |queryCommandXXX()|.
Here is a table of return value of |execute()| and |isEnabled()| with
clipboard access permission and Editor.canCopy/Cut/Paste
Can R/W Editor.can isEnabled execute
Clipboard Copy/Paste
true true true true
true false false true
false true false false
false false false false
BUG=476508, 475868
TEST=LayoutTests/editing/pasteboard/copy-cut-paste-supported.html
Committed: https://crrev.com/bf9013658c0eb493db5dd0941532160dc9fdd0c7
Cr-Commit-Position: refs/heads/master@{#354240}
Patch Set 1 #Patch Set 2 : 2015-10-14T14:29:03 #Patch Set 3 : 2015-10-14T16:00:41 #Patch Set 4 : 2015-10-14T18:09:51 #Patch Set 5 : 2015-10-14T18:29:33 #
Total comments: 6
Patch Set 6 : 2015-10-15T17:15:20 #
Messages
Total messages: 11 (3 generated)
|