Closed
Bug 1290230
Opened 8 years ago
Closed 8 years ago
replace uses of nsIClipboardHelper
Categories
(DevTools :: Framework, enhancement, P1)
DevTools
Framework
Tracking
(firefox51 fixed)
Tracking | Status | |
---|---|---|
firefox51 | --- | fixed |
People
(Reporter: tromey, Assigned: tromey)
References
Details
(Whiteboard: [reserve-html])
Attachments
(1 file, 1 obsolete file)
Various spots in the inspector use nsIClipboardHelper. These uses must be replaced for de-chrome-ification.
Assignee | ||
Comment 1•8 years ago
|
||
The web way to do this seems to be document.execCommand("copy"), coupled with a "copy" event listener that modifies the event to set the desired text. See https://w3c.github.io/clipboard-apis/
Assignee | ||
Comment 2•8 years ago
|
||
There's also uses of sdk/clipboard
Updated•8 years ago
|
Whiteboard: [devtools-html] → [devtools-html] [triage]
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → ttromey
Status: NEW → ASSIGNED
Updated•8 years ago
|
Iteration: --- → 50.4 - Aug 1
Flags: qe-verify-
Priority: -- → P1
Whiteboard: [devtools-html] [triage] → [reserve-html]
Assignee | ||
Comment 3•8 years ago
|
||
Dropping this for the time being in favor of a more important task.
Assignee: ttromey → nobody
Status: ASSIGNED → NEW
Updated•8 years ago
|
Iteration: 50.4 - Aug 1 → ---
Priority: P1 → P3
Updated•8 years ago
|
Priority: P3 → P2
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → ttromey
Status: NEW → ASSIGNED
Updated•8 years ago
|
Iteration: --- → 51.1 - Aug 15
Priority: P2 → P1
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Updated•8 years ago
|
Iteration: 51.1 - Aug 15 → 51.2 - Aug 29
Comment 6•8 years ago
|
||
mozreview-review |
Comment on attachment 8781702 [details] Bug 1290230 - remove unneeded uses of nsIClipboardHelper from devtools; https://reviewboard.mozilla.org/r/72052/#review69966 ::: devtools/client/debugger/debugger-controller.js (Diff revision 1) > "resource://devtools/shared/Parser.jsm"); > > XPCOMUtils.defineLazyModuleGetter(this, "ShortcutUtils", > "resource://gre/modules/ShortcutUtils.jsm"); > > -XPCOMUtils.defineLazyServiceGetter(this, "clipboardHelper", It looks like the clipboardHelper is used as a global, and is being used in devtools/client/netmonitor/netmonitor-view.js https://dxr.mozilla.org/mozilla-central/search?q=clipboardHelper+path%3Aclient%2Fdebugger&redirect=false I think this change will break things. ::: devtools/client/netmonitor/netmonitor-controller.js (Diff revision 1) > "resource://devtools/client/shared/Curl.jsm"); > > XPCOMUtils.defineLazyModuleGetter(this, "PluralForm", > "resource://gre/modules/PluralForm.jsm"); > > -XPCOMUtils.defineLazyServiceGetter(this, "clipboardHelper", Same here: https://dxr.mozilla.org/mozilla-central/search?q=path%3Adevtools%2Fclient%2Fnetmonitor+clipboardHelper&redirect=false
Comment 7•8 years ago
|
||
mozreview-review |
Comment on attachment 8781703 [details] Bug 1290230 - move clipboard helper to new devtools platform module; https://reviewboard.mozilla.org/r/72054/#review69964 See my comment on the test, but everything else looks great. ::: devtools/shared/platform/content/test/test_clipboard.html:16 (Diff revision 1) > + href="chrome://mochikit/content/tests/SimpleTest/test.css"> > + <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script> > + > +<script type="application/javascript;version=1.8"> > +"use strict"; > +var exports = {} This structure feels weird to me and hard to understand. Would it be possible to load in the clipboard interface through a loader using require? It seems like it would be good to test the clipboard in the same way you would use it in an actual tool.
Assignee | ||
Comment 8•8 years ago
|
||
(In reply to Greg Tatum [:gregtatum] [@gregtatum] from comment #6) > It looks like the clipboardHelper is used as a global, and is being used in > devtools/client/netmonitor/netmonitor-view.js Ugh, I hadn't considered that possibility. If this breaks the tests I will just drop this patch. > This structure feels weird to me and hard to understand. Would it be > possible to load in the clipboard interface through a loader using require? > It seems like it would be good to test the clipboard in the same way you > would use it in an actual tool. I don't think we have a version of require() that works in content. I wrote the test as a plain mochitest to ensure that the environment would be most content-like. And, when we are running this in the real content environment, require() will be some special webpack thing anyway, so I think testing it via our loaders won't help that eventual goal. Instead when it all works we'll need an integration test that is exercising the true code paths. I hope this makes sense!
Assignee | ||
Comment 9•8 years ago
|
||
(In reply to Tom Tromey :tromey from comment #8) > If this breaks the tests I will just drop this patch. Definitely dropping that one. It isn't really needed for our project anyway, and it did cause failures.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8781702 -
Attachment is obsolete: true
Attachment #8781702 -
Flags: review?(gtatum)
Comment 11•8 years ago
|
||
mozreview-review |
Comment on attachment 8781703 [details] Bug 1290230 - move clipboard helper to new devtools platform module; https://reviewboard.mozilla.org/r/72054/#review70390 Okie doke, that sounds good to me.
Attachment #8781703 -
Flags: review?(gtatum) → review+
Assignee | ||
Comment 12•8 years ago
|
||
I'm going to push this one after I can rebase it on top of bug 1290233, so I can remove that last require("chrome") and avoid breaking eslint as well.
Depends on: 1290233
Comment hidden (mozreview-request) |
Comment 14•8 years ago
|
||
Pushed by ttromey@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/58af0782df06 move clipboard helper to new devtools platform module; r=gregtatum
Comment 15•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/58af0782df06
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 51
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•