[webkit-reviews] review granted: [Bug 107200] [WK2] Minimum layout width auto-sizing should use FrameView::enableAutoSizeMode so that it can shrink the viewport : [Attachment 183341] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 17 18:28:16 PST 2013


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Tim Horton
<timothy_horton at apple.com>'s request for review:
Bug 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

Attachment 183341: patch
https://bugs.webkit.org/attachment.cgi?id=183341&action=review

------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
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.


More information about the webkit-reviews mailing list