WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
107200
[WK2] Minimum layout width auto-sizing should use FrameView::enableAutoSizeMode so that it can shrink the viewport
https://bugs.webkit.org/show_bug.cgi?id=107200
Summary
[WK2] Minimum layout width auto-sizing should use FrameView::enableAutoSizeMo...
Tim Horton
Reported
2013-01-17 16:35:22 PST
<
rdar://problem/12849029
> Using minimum layout width auto-sizing currently doesn't shrink past the current viewport size, so it can only get *taller*, never shorter. FrameView::enableAutoSizeMode already fiddles with layout to fix this, so we should make use of it!
Attachments
patch
(9.53 KB, patch)
2013-01-17 16:50 PST
,
Tim Horton
no flags
Details
Formatted Diff
Diff
patch with a const and WebPage will disable the mode if needed
(9.70 KB, patch)
2013-01-17 16:59 PST
,
Tim Horton
simon.fraser
: review-
Details
Formatted Diff
Diff
patch
(12.93 KB, patch)
2013-01-17 18:22 PST
,
Tim Horton
simon.fraser
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Tim Horton
Comment 1
2013-01-17 16:50:26 PST
Created
attachment 183316
[details]
patch
Tim Horton
Comment 2
2013-01-17 16:51:48 PST
Hmm, I should probably support falling back out of auto-sizing mode.
Tim Horton
Comment 3
2013-01-17 16:59:44 PST
Created
attachment 183319
[details]
patch with a const and WebPage will disable the mode if needed
Simon Fraser (smfr)
Comment 4
2013-01-17 17:12:53 PST
Comment on
attachment 183319
[details]
patch with a const and WebPage will disable the mode if needed View in context:
https://bugs.webkit.org/attachment.cgi?id=183319&action=review
> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:3787 > + if (!m_minimumLayoutWidth) > + corePage()->mainFrame()->view()->enableAutoSizeMode(false, IntSize(), IntSize());
It's weird that you disable auto size mode here, but enable it in the drawing area. I think this should be fixed; this mode should be indpendent of what kind of drawing area is being used.
Tim Horton
Comment 5
2013-01-17 18:22:25 PST
Created
attachment 183341
[details]
patch
Simon Fraser (smfr)
Comment 6
2013-01-17 18:30:04 PST
Comment on
attachment 183341
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=183341&action=review
> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:3789 > + m_minimumLayoutWidth = minimumLayoutWidth; > + > + if (minimumLayoutWidth > 0) > + corePage()->mainFrame()->view()->enableAutoSizeMode(true, IntSize(minimumLayoutWidth, 1), IntSize(minimumLayoutWidth, INT_MAX)); > + else > + corePage()->mainFrame()->view()->enableAutoSizeMode(false, IntSize(), IntSize());
Do we have to call enableAutoSizeMode() even when m_minimumLayoutWidth doesn't change?
> Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:-375 > - if (m_minimumLayoutWidth > 0) { > - m_webPage->setSize(IntSize(m_minimumLayoutWidth, 0)); > - m_webPage->layoutIfNeeded(); > + if (!m_webPage->minimumLayoutWidth()) > + m_webPage->setSize(size); > + > + m_webPage->layoutIfNeeded(); > > + if (m_webPage->minimumLayoutWidth()) { > contentSize = m_webPage->mainWebFrame()->contentBounds().size(); > size = contentSize; > } > > - m_webPage->setSize(size); > - m_webPage->layoutIfNeeded();
This is pretty confusing. I don't know whose responsibility it is to set the size of the WebPage.
Tim Horton
Comment 7
2013-01-17 18:41:02 PST
http://trac.webkit.org/changeset/140087
Tim Horton
Comment 8
2013-01-17 23:19:11 PST
Aahhhh, all the random assertion failures. I'm investigating.
Tim Horton
Comment 9
2013-01-18 00:52:59 PST
(In reply to
comment #8
)
> Aahhhh, all the random assertion failures. I'm investigating.
I can reproduce with this rolled out, must be something else.
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