Closed Bug 533714 Opened 15 years ago Closed 14 years ago

Using width/height on a menu/panel affects normal layout

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: enndeakin, Assigned: enndeakin)

References

Details

Attachments

(1 file)

The following:

<panel height="200">...</panel>

causes 200 pixels of space in the normal layout to be allocated for the panel, even when closed. The expected behaviour is that the panel should take up no space when closed, but have a floating window 200 pixels high when open.
This happens with the Inspect element on Mac:

http://grab.by/4XaA

And the inspector's panel has a height attribute set:

http://grab.by/4XaO
I think this is because the box layout code isn't skipping over the menupopup's placeholder frame and is setting its height. Alternatively, the placeholder frame should have an implementation of GetMinSize/GetPrefSize/GetMaxSize which returns (0,0)
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Attachment #452031 - Flags: review?(bzbarsky)
Comment on attachment 452031 [details] [diff] [review]
add simple implementations of GetMin/Pref/MaxSize

Why not 0x0 for the max size?
It causes the UI to mostly appear all scrunched up and misplaced, likely as no other constraints exists on other elements. The same would occur if (0,0) was used as the max size on other elements.
Oh, I see.  Because box layout is silly like that, ok.
Attachment #452031 - Flags: review?(bzbarsky) → review+
http://hg.mozilla.org/mozilla-central/rev/76c076305bdf
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
This patch added tests to the reftest directory layout/xul/base/reftest/ (originally added in bug 442228) which was not listed in the toplevel manifest, so they were never run in our automated testing.  I just did that:
https://hg.mozilla.org/integration/mozilla-inbound/rev/139eed687d77
Component: XP Toolkit/Widgets: Menus → XUL
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: