WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
32807
FrameView::adjustSize does not size to true content height
https://bugs.webkit.org/show_bug.cgi?id=32807
Summary
FrameView::adjustSize does not size to true content height
Aaron Boodman
Reported
2009-12-20 19:16:36 PST
Currently, FrameView::adjustSize sets the content size to the max() of the content's height and the container height. This means that if the content does not fill the container, the content size will still be set to the contianer's height. This makes it impossible to implement containers that shrinkwrap their contents height using APIs like FrameView::contentSize() and ChromeClient::contentsSizeChanged(). It is possible to get the content's true height using frame->document()->documentElement()->scrollHeight(), but there is no corresponding event for when this changes. Instead of adding more API for when the scroll height changes, it seems to me that it would be better to just change ::adjustSize() to set the content size to the true height. Applications that want the old behavior will still be able to get it, since they can get the container height.
Attachments
Incomplete patch -- for discussion only
(826 bytes, patch)
2009-12-20 19:19 PST
,
Aaron Boodman
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Aaron Boodman
Comment 1
2009-12-20 19:19:44 PST
Created
attachment 45305
[details]
Incomplete patch -- for discussion only This patch is missing changes to ChangeLogs and layout tests. I don't have access to my WebKit development computer to create a proper patch until Tuesday, but I wanted to get feedback on this change before then.
Adam Treat
Comment 2
2009-12-21 12:45:15 PST
Why only for height? Why not do the same for width as well? I can't totally speak for the larger implications here, but I think scrollHeight does take into account overflow::hidden while what is currently there does not. That is a behavior change that I don't think is wanted. I guess dhyatt can speak more to this.
Aaron Boodman
Comment 3
2009-12-21 14:55:03 PST
Width already does the right thing for whatever reason.
Dave Hyatt
Comment 4
2010-10-20 14:18:09 PDT
I'd look into frame flattening here. I think it kind of does what you want (makes an iframe or frame size around its content).
David Levin
Comment 5
2011-03-03 14:31:44 PST
(In reply to
comment #4
)
> I'd look into frame flattening here. I think it kind of does what you want (makes an iframe or frame size around its content).
I looked at frame flattening (and did an experiment to verify). Frame flattening doesn't quite work for the desired use case because frame flattening applies recursively to all enclosed frames.
David Levin
Comment 6
2012-01-09 00:27:13 PST
This has been handled in other ways in Chromium code.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug