Closed Bug 1064596 Opened 10 years ago Closed 10 years ago

Toolbox height is larger than the available space after increasing the toolbox height, closing tools, shrinking browser height, then reopening tools

Categories

(DevTools :: Console, defect)

defect
Not set
normal

Tracking

(firefox39 fixed)

RESOLVED FIXED
Firefox 39
Tracking Status
firefox39 --- fixed

People

(Reporter: cvan, Assigned: bgrins)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

1. Load http://example.com/
2. Open the Developer Tools > Console
3. Resize the Developer Tools to be very tall

    https://www.dropbox.com/s/bg4ep0q4oytxsaf/Screenshot%202014-09-08%2015.59.27.png?dl=1

4. Close the Developer Tools
5. Resize your browser so the height is much smaller

    https://www.dropbox.com/s/jw3jtz5ybwkxvlt/Screenshot%202014-09-08%2016.01.29.png?dl=1

6. Open the Developer Tools and notice the text box is no longer visible (also try typing something to see where the autocomplete box shows up)

    https://www.dropbox.com/s/v69kbf0tk9qki6z/Screenshot%202014-09-08%2016.02.23.png?dl=1

Expected results:
The height of the Developer Tools (and Console) pane is resized to fit. (FWIW, this is what Chrome does.)

Actual results:
When a user resizes the height of Developer Tools pane, the height is always preserved, even when there's not enough space. In order to fix this for narrower heights, you have to make the browser taller and then make the Developer Tools pane shorter.

(I see a similar bug, bug 1014622, was marked RESOLVED INVALID. I wonder if the bug was exhibiting this behaviour or if it's unrelated to this issue.)
There are a couple of issues this shows.

The main one that should be fixed for this bug is that we need to be smarter about the 'devtools.toolbox.footer.height' pref https://dxr.mozilla.org/mozilla-central/source/browser/devtools/framework/toolbox-hosts.js#41, clamping the actual height that is set for the toolbox to a min between that value and the available space.

There is also Bug 971129 which makes it not possible to resize the entire toolbox after step 6.
OS: Mac OS X → All
Hardware: x86 → All
Summary: Console missing text box upon maximising console height and minimising browser height → Toolbox height is larger than the available space after increasing the toolbox height, closing tools, shrinking browser height, then reopening tools
Attached patch toolbox-size.patch (deleted) — Splinter Review
I truly wish there was a way to do this with CSS only...  I have an idea about how we could do it by setting a min-height on browserContainer, but going to put this here since we will want to use the test case either way.
Comment on attachment 8583376 [details] [diff] [review]
toolbox-size.patch

I think this is a good improvement even if I find another way to tackle part of the problem using CSS (in Bug 971129).  My current thinking on that bug is that we may be able to set a min-height/width on .browserContainer, which would prevent the toolbox from being resized to fill the full screen.  Even so, we still would want to clamp the height setting on load, since flexing / resizing can act oddly when height is > max height.  Here is a try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=218431a54d8a
Attachment #8583376 - Flags: review?(jryans)
Comment on attachment 8583376 [details] [diff] [review]
toolbox-size.patch

Review of attachment 8583376 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good.  CSS would be neat, but this seems fine too.
Attachment #8583376 - Flags: review?(jryans) → review+
Try push looks good
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/31034d214829
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/31034d214829
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 39
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: