Closed
Bug 1161721
Opened 10 years ago
Closed 10 years ago
Return false from document.queryCommandSupported("paste") if calling execCommand("paste") will fail
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: ehsan.akhgari, Assigned: nika)
References
Details
(Keywords: dev-doc-complete)
Attachments
(1 file, 3 obsolete files)
We currently just return true if we can translate the command name to an internal command name, but for paste we need to check to make sure that paste can actually succeed (IOW that the caller has chrome privileges.)
Comment 1•10 years ago
|
||
(Changing summary slightly because I think that's what you meant..)
Summary: Return false from document.queryCommandSupported("paste") if calling execCommand("paste") fails → Return false from document.queryCommandSupported("paste") if calling execCommand("paste") will fail
Reporter | ||
Comment 2•10 years ago
|
||
Yep, thanks!
Assignee | ||
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 4•10 years ago
|
||
oops - queryCommandSupported != queryCommandEnabled
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Assignee | ||
Comment 5•10 years ago
|
||
Attachment #8604250 -
Flags: review?(ehsan)
Assignee | ||
Comment 6•10 years ago
|
||
Acknowledge now-failing browserscope tests
Attachment #8604250 -
Attachment is obsolete: true
Attachment #8604250 -
Flags: review?(ehsan)
Attachment #8604329 -
Flags: review?(ehsan)
Reporter | ||
Comment 7•10 years ago
|
||
Comment on attachment 8604329 [details] [diff] [review]
Return false from document.queryCommandSupported for restricted commands
Review of attachment 8604329 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good, but we need to have an explicit test for this too. Can you please add one? Ideally, the test would be in two parts, one would be a mochitest-plain, testing non-privileged callers of execCommand, and one would be a mochitest-chrome, testing the privileged callers of execCommand.
Attachment #8604329 -
Flags: review?(ehsan) → feedback+
Updated•10 years ago
|
Keywords: dev-doc-needed
Assignee | ||
Comment 8•10 years ago
|
||
Added an explicit test for the feature. Instead of using both mochitest-basic and mochitest-chrome, I decided to use SpecialPowers.wrap(document) to get a privileged call. Hopefully that's an acceptable test.
Attachment #8604329 -
Attachment is obsolete: true
Attachment #8605321 -
Flags: review?(ehsan)
Reporter | ||
Updated•10 years ago
|
Attachment #8605321 -
Flags: review?(ehsan) → review+
Comment hidden (typo) |
Assignee | ||
Comment 10•10 years ago
|
||
(In reply to Michael Layzell [:mystor] from comment #9)
> try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=ec92cce1ffcb
Ignore that - wrong bug
Assignee | ||
Comment 11•10 years ago
|
||
try (includes patches for other bugs): https://treeherder.mozilla.org/#/jobs?repo=try&revision=b3ba5f9e6cc5
Keywords: checkin-needed
Comment 12•10 years ago
|
||
this failed to apply:
renamed 1161721 -> 0001-Bug-1161721-Return-false-from-document.queryCommandS.patch
applying 0001-Bug-1161721-Return-false-from-document.queryCommandS.patch
patching file dom/tests/mochitest/general/mochitest.ini
Hunk #1 FAILED at 100
1 out of 1 hunks FAILED -- saving rejects to file dom/tests/mochitest/general/mochitest.ini.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working directory
errors during apply, please fix and refresh 0001-Bug-1161721-Return-false-from-document.queryCommandS.patch
can you take a look, thanks!
Flags: needinfo?(michael)
Keywords: checkin-needed
Assignee | ||
Comment 13•10 years ago
|
||
Sorry - I've rebased the patch onto mozilla-central.
Attachment #8605321 -
Attachment is obsolete: true
Flags: needinfo?(michael)
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 14•10 years ago
|
||
Keywords: checkin-needed
Status: REOPENED → RESOLVED
Closed: 10 years ago → 10 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Comment 16•9 years ago
|
||
Updated:
https://developer.mozilla.org/en-US/docs/Web/API/Document/queryCommandSupported
and
https://developer.mozilla.org/en-US/Firefox/Releases/41
Keywords: dev-doc-needed → dev-doc-complete
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•