Fred,
I've also spent days to find out that especially the 100%-height stuff
is simply not working in strict mode. And it will not help to have an
unbroken chain of height settings on the dom tree.
As it would be nice to have let's say a "full screen" DockPanel
working (with sticky footer added south, header north and a scrollable
content area) I assume that we have to provide completely different
solutions for different browsers/compatibility modes.
So my proposal would be to make the browser mode available to the
deferred binding (if it's not yet available) so that we can use
different implementations for different modes. E.g. DockPanel works
fine in quirks mode using tables, it could work fine in IE8/css 3 in
standard mode based on divs and could work a little bit in standard
mode on IE6/7 using divs with lots of css hacks.
To achieve a proper 100%-height handling I'd vote for methods like
expand(VERTICAL/HORIZONTAL/BOTH) applying the proper logic for the
different environments. Simply using the setSize(x,x) method will
force us to do string parsing to figure out if we have to apply the
100% hacks or if it's a simple px value.
Cheers,
Daniel
On 18 Jul., 05:47, "Fred Sauer" <
f...@allen-sauer.com> wrote:
> Joel,
>
> There was a thread a while back where I looked into the height:100% issue in
> standard's mode. That was back in this thread:
>
>
http://groups.google.com/group/Google-Web-Toolkit-Contributors/msg/b8...
>
> Quoting from that email:
>
> I wanted to follow up on the CSS height:100% issue, which I believe stems
> from
http://www.w3.org/TR/REC-CSS2/visudet.html#the-height-property,
> specifically:
>
> The percentage is calculated with respect to the height of the generated
>
> > box's containing block. If the height of the containing block is not
> > specified explicitly (i.e., it depends on content height), the value is
> > interpreted like 'auto'.
>
> In quirks mode setting the body height:100% fills the entire page height. In
> standard mode it does not. This is not because the CSS height is ignored,
> but because the surrounding element (= the HTML document element)
> essentially has height:100% in quirks mode and height:auto in standard mode.
>
> So, where one would in quirks mode write
>
> > body{height:100%}
>
> you would need this in standard mode for the same effect:
>
> > html,body{height:100%}
>
> Also, if you want any given block level element (usually a DIV based widget
> within a table) to have 100% height to say fill the table cell vertically
> (or any height greater than what is required to fill the contents of that
> block), you must walk up the DOM tree from that widget and either:
>
> - set an absolute height, such as height:300px or height:10em
> - set a percentage based height (height:100%), and then repeat with the
> widget's parent
>
> Your goal is to have an unbroken chain of percentage heights from some
> ancestor which has an absolute height. For this purpose body (quirks mode)
> or html (standard mode) has an absolute height.
>
> If what I wrote there pans out, do you think it addresses the widget use
> cases such as the stack panel with height? I know I specifically looked at
> the <div> in a <td> case.
>
> HTH
> Fred Sauer
>
f...@allen-sauer.com