Last Comment Bug 761481 - GCLI help output does not display the first time
: GCLI help output does not display the first time
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Developer Tools (show other bugs)
: 14 Branch
: x86 Mac OS X
: P1 normal (vote)
: Firefox 16
Assigned To: Joe Walker [:jwalker] (needinfo me or ping on irc)
:
Mentors:
Depends on:
Blocks: 745773 768150
  Show dependency treegraph
 
Reported: 2012-06-04 19:12 PDT by Kevin Dangoor
Modified: 2012-07-11 00:50 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Upload 1 (716 bytes, patch)
2012-06-25 12:03 PDT, Joe Walker [:jwalker] (needinfo me or ping on irc)
dcamp: review+
Details | Diff | Review
Upload 2 (2.65 KB, patch)
2012-06-28 03:13 PDT, Joe Walker [:jwalker] (needinfo me or ping on irc)
dcamp: review+
Details | Diff | Review

Description Kevin Dangoor 2012-06-04 19:12:11 PDT
STR:

1. With Developer Toolbar closed, press the keyboard shortcut to open the toolbar
2. type "help" and hit enter
3. note the lack of output
4. type "help" and hit enter again
5. ahh, there it is!

expected:

output at step 3

This is in the 2012-06-04 Nightly on Mac.
Comment 1 Panos Astithas [:past] 2012-06-04 23:10:54 PDT
Thank you, I meant to file this last weekend but it slipped my mind.
Comment 2 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-06-12 02:06:19 PDT
Hey Neil - I wonder if you could help with a panel problem.

2 things to add to Kevin's STR:
- the pref to enable the toolbar is: devtools.toolbar.enabled=true
- this happens on Mac/Linux but not Windows

If you open browser/devtools/shared/DeveloperToolbar.jsm, line 354, you can see the call to openPopup, it is called at the right time on all OSes.

Relevant to the discussion is the _resize() function just below show(), although from adding debug to that function, it looks like sane values are being used for the height/width (i.e. 265x275) and those numbers are the same whether the output is displayed or not.

Thanks.
Comment 3 Neil Deakin 2012-06-12 06:16:58 PDT
The panel is first resized to one size, then some left margin is being added to it, then the panel is resized to accomodate this margin.

<panel xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="gcli-tooltip" class="gcli-panel" noautofocus="true" noautohide="true"><iframe xmlns="http://www.w3.org/1999/xhtml" height="0" id="gcli-tooltip-frame" src="chrome://browser/content/devtools/gclitooltip.xhtml" flex="1" style="margin-left: 10px;"></iframe></panel>

Maybe you mean to add the margin on the panel itself, or in the iframe's content?

Is the margin or its size dependent on the size of the panel? If not, it should be applied before opening the panel.
Comment 4 Neil Deakin 2012-06-12 06:17:45 PDT
Er, that comment was meant for bug 760450
Comment 5 Neil Deakin 2012-06-12 07:12:43 PDT
Why is the panel being resized three times when being opened?
Comment 6 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-06-13 06:49:44 PDT
(In reply to Neil Deakin from comment #5)
> Why is the panel being resized three times when being opened?

Twice?

    this._panel.ownerDocument.defaultView.setTimeout(function() {
      this._resize();
    }.bind(this), 0);
  
    this._panel.openPopup(this._input, "before_start", 0, 0, false, false, null);
    this._resize();
  
    this._input.focus();

Displaying the panel causes it to re-flow, which can change the size it should be,
so we need to resize the iframe after the panel has displayed.
Comment 7 Neil Deakin 2012-06-13 06:57:05 PDT
The panel is also being resized at:

  else if (aEvent.type == "resize") {
    this.outputPanel._resize();
  }
Comment 8 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-06-13 07:22:18 PDT
(In reply to Neil Deakin from comment #7)
> The panel is also being resized at:
> 
>   else if (aEvent.type == "resize") {
>     this.outputPanel._resize();
>   }

Ah, right that's so that when the window is resized, we ensure the output panel is the same width as the input area.
Comment 9 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-06-22 02:32:35 PDT
Neil - I'd really like to get this fixed, can I get you any more info to help work out what's wrong?
Comment 10 Neil Deakin 2012-06-22 05:21:55 PDT
I think I tested commenting out the resize I mentioned in comment 7 and the size worked fine. You might want to see if there's a way to skip that in this case. Possibly by seeing if the window really did change size.
Comment 11 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-06-25 12:03:13 PDT
Created attachment 636424 [details] [diff] [review]
Upload 1
Comment 12 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-06-25 14:31:55 PDT
https://tbpl.mozilla.org/?tree=Try&rev=986cd926eb22
Comment 13 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-06-28 03:13:50 PDT
Created attachment 637439 [details] [diff] [review]
Upload 2

The previous version of this patch was done in somewhat of a hurry, this is a slightly better version of the same thing.
Comment 14 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-06-29 03:56:08 PDT
https://tbpl.mozilla.org/?tree=Try&rev=c11630ac6eb2
Comment 15 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-07-04 15:35:09 PDT
https://tbpl.mozilla.org/?tree=Try&rev=59729f63ee39
Comment 16 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-07-05 00:25:42 PDT
https://tbpl.mozilla.org/?tree=Fx-Team&rev=124c0182df1c
Comment 17 Tim Taubert [:ttaubert] 2012-07-05 06:29:46 PDT
https://hg.mozilla.org/mozilla-central/rev/ea890a6eed56
Comment 18 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-07-10 07:26:49 PDT
This issue has returned.
Comment 19 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-07-11 00:50:52 PDT
Actually it's not a problem with this bug.

Note You need to log in before you can comment on or make changes to this bug.