Would it make sense for inline and text frames to implement GetMinWidth and
GetPrefWidth in addition to the inline methods? Presumably they would implement
these in terms of the inline methods...
The reason I'm running into this is twofold. First of all, XUL boxes with text
in them (eg data:text/html,<div style="display:-moz-box">aaa</div> ) assert,
since the text doesn't implement GetPrefWidth/GetMinWidth. Second, I'm
considering nixing nsLegendFrame altogether if I can; it really doesn't have
that much reason to exist. But then in the fieldset frame I'll want to call
GetPrefWidth on the legend (since the fieldset's minimum width depends on the
legend's preferred width as things stand). And if the legend frame is
constructed by display (so it can be an inline), then I run into inlines not
Of course another option for the latter problem is to just set "display: block
!important" on legends in forms.css...
And a third option (possibly to be combined with the second) is that we allow
legends to wrap.
On Friday 2006-04-28 00:07 -0500, Boris Zbarsky wrote:
> Would it make sense for inline and text frames to implement GetMinWidth and
> GetPrefWidth in addition to the inline methods? Presumably they would
> implement these in terms of the inline methods...
Inline, definitely not. Text, maybe. Anything that needs inlines
absolutely needs to wrap them in a block. Although given the current
text frame code, I'm tempted to say the same for text, unless you can
convince me that the numerous null-checks of nsLineLayout objects don't
actually break anything. See
L. David Baron <URL: http://dbaron.org/ >
Technical Lead, Layout & CSS, Mozilla Corporation