Open
Bug 430608
Opened 16 years ago
Updated 2 years ago
xul:button with constrained width looks bad (label overflows aqua button border)
Categories
(Core :: XUL, defect)
Tracking
()
NEW
People
(Reporter: jruderman, Unassigned)
References
Details
(Keywords: regression, testcase)
Attachments
(1 file)
254 bytes,
application/xhtml+xml
|
Details |
The text "Why was this site blocked?" goes outside of the button. The button appearance should expand to accommodate the text that insists on not wrapping. This bug affects phishing-protection pages in frames, e.g.: data:text/html,<iframe src="http://www.mozilla.com/firefox/its-a-trap.html"></iframe>
Comment 1•16 years ago
|
||
Not a form controls issue; this thing doesn't use any of the form controls code. That said, this is a regression from 1.8; probably from the reflow branch.
Blocks: reflow-refactor
Component: Layout: Form Controls → XP Toolkit/Widgets: XUL
Keywords: regression
QA Contact: layout.form-controls → xptoolkit.xul
Comment 2•16 years ago
|
||
I suppose we could throw a "min-width: -moz-max-content" on this thing, at least if it's not ever supposed to wrap.... That said, if it's not supposed to wrap, I'd think that "min-width: -moz-min-content" would also work, but that seems to use the longest word.
Comment 3•16 years ago
|
||
Alternately, we could have nsButtonBoxFrame implement a better GetMinWidth/GetPrefWidth.
Comment 4•16 years ago
|
||
Offhand I'm not sure either of those solutions would work; you can put your own <label>wrapped text goes here</label> inside a button if you wish, and buttons aren't the only controls using button frames.
Comment 5•16 years ago
|
||
The problem here is that the div wants to follow HTML layout rules whereby it sets the size of the button, while the label wants to follow XUL layout rules whereby the label sets the size of the button, and never the twain shall meet. For cropped or wrapped text in a button you have to provide your own explicit label e.g. <button><label flex="1" crop="right" value="Why was this site blocked?"></button> <button><label>Why was this site blocked?</label><button>
Comment 6•16 years ago
|
||
The button can decide that it'll always let its children set its size. That's basically what both of the solutions I suggested are all about.
Comment 7•16 years ago
|
||
In that case I'd apply min-width: -moz-max-content; to that specific button.
Comment 8•16 years ago
|
||
You mean in the error page styles? That would make a lot of sense to me.
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
Updated•2 years ago
|
Severity: minor → S4
You need to log in
before you can comment on or make changes to this bug.
Description
•