Closed
Bug 790026
Opened 12 years ago
Closed 12 years ago
[gcli] screenshot command could use a 'chrome' option
Categories
(DevTools :: General, defect)
DevTools
General
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 18
People
(Reporter: Optimizer, Assigned: Optimizer)
References
Details
Attachments
(1 file, 4 obsolete files)
(deleted),
patch
|
Optimizer
:
review+
|
Details | Diff | Splinter Review |
It will be useful for Firefox developers to easily create screenshot of their patches.
Attachment #659819 -
Flags: review?(jwalker)
Assignee | ||
Comment 1•12 years ago
|
||
Changing back to content document in case of a selector option is passed, as anyways gcli does not match chrome selectors in the 'node' type and also, using chrome window to draw creates an offset which the Layout helpers do not take care of and thus wrongly positioned image is captured.
Attachment #659819 -
Attachment is obsolete: true
Attachment #659819 -
Flags: review?(jwalker)
Attachment #659843 -
Flags: review?(jwalker)
Assignee | ||
Comment 2•12 years ago
|
||
fixed tests.
Attachment #659843 -
Attachment is obsolete: true
Attachment #659843 -
Flags: review?(jwalker)
Attachment #660127 -
Flags: review?(jwalker)
Comment 3•12 years ago
|
||
Comment on attachment 660127 [details] [diff] [review]
Patch v1.2
Review of attachment 660127 [details] [diff] [review]:
-----------------------------------------------------------------
r+ with this problem solved.
::: browser/devtools/commandline/CmdScreenshot.jsm
@@ +72,5 @@
> ],
> exec: function Command_screenshot(args, context) {
> + var document = args.chrome && !args.selector
> + ? context.environment.chromeDocument
> + : context.environment.contentDocument;
Hmmm, so if you do:
>> screenshot --chome --selector X
Then we're going to suddenly ignore the chrome flag? That sounds surprising to me.
I'm not sure why we can't make selector work with a chrome document?
If we really can't get it to work then we should throw an exception, and add a note to bug 659268, so say that this is a place where we could use the features of that bug.
Attachment #660127 -
Flags: review?(jwalker) → review+
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Joe Walker [:jwalker] from comment #3)
> Hmmm, so if you do:
>
> >> screenshot --chome --selector X
>
> Then we're going to suddenly ignore the chrome flag? That sounds surprising
> to me.
1. The chrome selector was not recognizing the selector #webConsole and many other that I tried.
2. While having the chrome suffix, the selector was still checking for content nodes and while capturing a content node, a offset of the height of the window above the content (mainly the toolbars and title bar) comes into picture and many times the node itself is totally missed.
> I'm not sure why we can't make selector work with a chrome document?
This is a GCLI feature for a 'node' type. I don;t know how to tell the 'node; type to look for a chrome node, or even if it is possible right now.
> If we really can't get it to work then we should throw an exception, and add
> a note to bug 659268, so say that this is a place where we could use the
> features of that bug.
Not really clear what you mean here.
Assignee | ||
Comment 5•12 years ago
|
||
Please confirm that I am doing it correctly.
Otherwise ready for a try push.
Attachment #660127 -
Attachment is obsolete: true
Attachment #660470 -
Flags: review?(jwalker)
Comment 6•12 years ago
|
||
Comment on attachment 660470 [details] [diff] [review]
Throwing when chrome and selector both are used
Review of attachment 660470 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/devtools/commandline/CmdScreenshot.jsm
@@ +74,5 @@
> + if (args.chrome && args.selector) {
> + // Node screenshot with chrome option does not work as inteded
> + // Refer https://bugzilla.mozilla.org/show_bug.cgi?id=659268#c7
> + // throwing for now.
> + throw gcli.lookup("screenshotSelectorChromeConflict");
The code above will work (I think), but I was expecting:
throw new Error(gcli.lookup("screenshotSelectorChromeConflict"));
I've got to edit the patch to add r=jwalker to the end, so I'm happy to do this.
Attachment #660470 -
Flags: review?(jwalker) → review+
Assignee | ||
Comment 7•12 years ago
|
||
(In reply to Joe Walker [:jwalker] from comment #6)
> Comment on attachment 660470 [details] [diff] [review]
> Throwing when chrome and selector both are used
>
> Review of attachment 660470 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: browser/devtools/commandline/CmdScreenshot.jsm
> @@ +74,5 @@
> > + if (args.chrome && args.selector) {
> > + // Node screenshot with chrome option does not work as inteded
> > + // Refer https://bugzilla.mozilla.org/show_bug.cgi?id=659268#c7
> > + // throwing for now.
> > + throw gcli.lookup("screenshotSelectorChromeConflict");
>
> The code above will work (I think), but I was expecting:
>
> throw new Error(gcli.lookup("screenshotSelectorChromeConflict"));
>
> I've got to edit the patch to add r=jwalker to the end, so I'm happy to do
> this.
My, bad :(
Does every reviewer has to edit the patch to add r=<reviewer> ?
Assignee | ||
Comment 8•12 years ago
|
||
Added the Error("") line myself this time :)
Attachment #660470 -
Attachment is obsolete: true
Attachment #660985 -
Flags: review+
Assignee | ||
Comment 9•12 years ago
|
||
Whiteboard: [land-in-fx-team]
Comment 10•12 years ago
|
||
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
Comment 11•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 18
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•