|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
layout intrinsic heightThis is from (https://bugs.webkit.org/show_bug.cgi?id=31036). Sorry
for duplicating here, but I was hoping to get some feedback. I'm happy to carry on the conversation in the bug. Also, in case it isn't clear in the bug, I'm happy to make the change myself if that makes sense. For Chrome's extension system, we let the extension create a popup widget using HTML. This popup widget's size is (mostly) unconstrained externally. The idea is to let the developer take advantage of some dynamic layout so that they don't have to worry as much about issues like system font sizes and localization. Obviously, the developer needs to put some constraints in (whitespace: nowrap, , an explicit width or height on an element, etc.). I can get pretty close to my goal by using RenderBox::minPrefWidth() (on RenderView) and using contentHeight() for the height and resizing the RenderView to match. Unfortunately, with this technique, the height will never shrink. There doesn't seem to be a way to ask for the "intrinsic height" of the view at its current width. I'm assuming this must be known somewhere in order to calculate the overflow if any, but it looks like this value isn't saved or exposed. thanks, Erik _______________________________________________ webkit-dev mailing list webkit-dev@... http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev |
|
|
Re: layout intrinsic heightI responded in the bug. Basically lowestPosition works, but it will
always at a minimum return the viewport height. If you size the view to 0 first, you can get an accurate answer out of it. dave On Nov 4, 2009, at 5:48 PM, Erik Kay wrote: > This is from (https://bugs.webkit.org/show_bug.cgi?id=31036). Sorry > for duplicating here, but I was hoping to get some feedback. I'm > happy to carry on the conversation in the bug. Also, in case it isn't > clear in the bug, I'm happy to make the change myself if that makes > sense. > > For Chrome's extension system, we let the extension create a popup > widget using > HTML. This popup widget's size is (mostly) unconstrained > externally. The idea > is to let the developer take advantage of some dynamic layout so > that they > don't have to worry as much about issues like system font sizes and > localization. > Obviously, the developer needs to put some constraints in > (whitespace: nowrap, > , an explicit width or height on an element, etc.). > > I can get pretty close to my goal by using RenderBox::minPrefWidth() > (on > RenderView) and using contentHeight() for the height and resizing the > RenderView to match. Unfortunately, with this technique, the height > will never > shrink. There doesn't seem to be a way to ask for the "intrinsic > height" of > the view at its current width. I'm assuming this must be known > somewhere in > order to calculate the overflow if any, but it looks like this value > isn't > saved or exposed. > > thanks, > Erik > _______________________________________________ > webkit-dev mailing list > webkit-dev@... > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev _______________________________________________ webkit-dev mailing list webkit-dev@... http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev |
| Free embeddable forum powered by Nabble | Forum Help |