open the console to a percentage of the browser window height

RESOLVED FIXED

Status

()

Firefox
Developer Tools
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: ddahl, Assigned: ddahl)

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
Currently, the console opens at a fixed height, which is not good for smaller screens.
(Assignee)

Updated

8 years ago
Blocks: 529086
(Assignee)

Comment 1

8 years ago
Created attachment 453222 [details] [diff] [review]
[checked-in] v 1 Tweak CSS and set dynamic height

Also removed a null length reference in historyperuse code of JSTerm
Assignee: nobody → ddahl
Attachment #453222 - Flags: review?(dietrich)
Attachment #453222 - Flags: review?(dietrich) → review+
(Assignee)

Updated

8 years ago
Summary: open th e console to a percentage of the browser window height → open the console to a percentage of the browser window height
(Assignee)

Comment 2

8 years ago
checkin-needed on mozilla central
Keywords: checkin-needed
Comment on attachment 453222 [details] [diff] [review]
[checked-in] v 1 Tweak CSS and set dynamic height

changeset:   44187:99d7167794ff
tag:         tip
parent:      44183:de4b3d642996
user:        David Dahl <ddahl@mozilla.com>
date:        Wed Jun 23 12:30:51 2010 -0300
summary:     Bug 573845 - open the console to a percentage of the browser window height, p=ddahl, r=dietrich
Attachment #453222 - Attachment description: v 1 Tweak CSS and set dynamic height → [checked-in] v 1 Tweak CSS and set dynamic height
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Keywords: checkin-needed
Resolution: --- → FIXED

Comment 4

8 years ago
Be nice use a clickable url:
http://hg.mozilla.org/mozilla-central/rev/99d7167794ff

> +    var height = Math.ceil((this.contentWindow.innerHeight * .33)) + "px";

Pity you can't use CSS3 -moz-calc() here

> +    var style = "height: " + height + ";";
> +    this.HUDBox.setAttribute("style", style);

Perhaps this.HUDBox.style.setProperty("height", height, null);
(Assignee)

Comment 5

8 years ago
(In reply to comment #4)
> Be nice use a clickable url:
> http://hg.mozilla.org/mozilla-central/rev/99d7167794ff
> 
> > +    var height = Math.ceil((this.contentWindow.innerHeight * .33)) + "px";
> 
> Pity you can't use CSS3 -moz-calc() here

Eventually, we should use some slick animated slide-down:)

> 
> > +    var style = "height: " + height + ";";
> > +    this.HUDBox.setAttribute("style", style);
> 
> Perhaps this.HUDBox.style.setProperty("height", height, null);

is the height property the preferred method here?
(In reply to comment #5)
> (In reply to comment #4)
> > Pity you can't use CSS3 -moz-calc() here
> 
> Eventually, we should use some slick animated slide-down:)

I believe the technical term is "voop". :)

> > > +    var style = "height: " + height + ";";
> > > +    this.HUDBox.setAttribute("style", style);
> > 
> > Perhaps this.HUDBox.style.setProperty("height", height, null);
> 
> is the height property the preferred method here?

well, it's more direct than constructing a string containing the style at the expense of further indirection. You might also need a null check on this.HUDBox.style before doing the above.

IMO, what you submitted is adequate.

Comment 7

8 years ago
> You might also need a null check on
> this.HUDBox.style before doing the above.
AFAIK element.style should always exist as it is in the IDL.
<https://developer.mozilla.org/en/STYLE>
<http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-ElementCSSInlineStyle>

> IMO, what you submitted is adequate.
Sorry.
(In reply to comment #7)
> > You might also need a null check on
> > this.HUDBox.style before doing the above.
> AFAIK element.style should always exist as it is in the IDL.

ah, you're right.

> <https://developer.mozilla.org/en/STYLE>
> <http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-ElementCSSInlineStyle>
> 
> > IMO, what you submitted is adequate.
> Sorry.

nono! I liked the suggestion, it's just that we've checked this in already and had a review on it. Feel free to file a follow-up patch and we can get it in.
You need to log in before you can comment on or make changes to this bug.