Closed Bug 573845 Opened 14 years ago Closed 14 years ago

open the console to a percentage of the browser window height

Categories

(DevTools :: General, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ddahl, Assigned: ddahl)

References

Details

Attachments

(1 file)

Currently, the console opens at a fixed height, which is not good for smaller screens.
Blocks: 529086
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+
Summary: open th e console to a percentage of the browser window height → open the console to a percentage of the browser window height
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
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
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);
(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.
> 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.
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: