<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[153378] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/153378">153378</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2013-07-26 13:09:25 -0700 (Fri, 26 Jul 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add a mode where autosizing fixes the FrameView height to at least the WKView height
https://bugs.webkit.org/show_bug.cgi?id=119104
&lt;rdar://problem/14549021&gt;

Reviewed by Anders Carlsson.

* WebCore.exp.in: Export FrameView::setAutoSizeFixedMinimumHeight.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
Initialize m_autoSizeFixedMinimumHeight to 0.

(WebCore::FrameView::autoSizeIfEnabled):
Increase the FrameView height to m_autoSizeFixedMinimumHeight if necessary,
and do another layout. Store the computed intrinsic content size.

(WebCore::FrameView::setAutoSizeFixedMinimumHeight): Added.

* page/FrameView.h:
(WebCore::FrameView::autoSizingIntrinsicContentSize): Added.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
Add autoSizingShouldExpandToViewHeight parameter.

* UIProcess/API/mac/WKView.mm:
(-[WKView minimumWidthForAutoLayout]):
(-[WKView setMinimumWidthForAutoLayout:]):
Un-deprecate these as they're still useful if not sending a height.

(-[WKView shouldExpandToViewHeightForAutoLayout]):
(-[WKView setShouldExpandToViewHeightForAutoLayout:]):
* UIProcess/API/mac/WKViewPrivate.h:
New property, forward to WebPageProxy.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setAutoSizingShouldExpandToViewHeight):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::autoSizingShouldExpandToViewHeight):
New property, forward to WebPage.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
If enabled, update the FrameView's autoSizeFixedMinimumHeight.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setAutoSizingShouldExpandToViewHeight):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::autoSizingShouldExpandToViewHeight):
New property; if enabled, set FrameView's autoSizeFixedMinimumHeight,
otherwise reset it to 0.

* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired):
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
Retrieve intrinsic content size explicitly from the FrameView, as
it may not have used it as its final contentsSize if
autoSizeFixedMinimumHeight is set.

Set the WebPage's size in case the load is committed so that the
WebFrameLoaderClient doesn't reset us to the wrong size.

Update autoSizeFixedMinimumHeight if enabled when the view size changes.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewh">trunk/Source/WebCore/page/FrameView.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPageCreationParameterscpp">trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPageCreationParametersh">trunk/Source/WebKit2/Shared/WebPageCreationParameters.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewmm">trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewPrivateh">trunk/Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagemessagesin">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm">trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (153377 => 153378)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-07-26 19:19:34 UTC (rev 153377)
+++ trunk/Source/WebCore/ChangeLog        2013-07-26 20:09:25 UTC (rev 153378)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2013-07-26  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        Add a mode where autosizing fixes the FrameView height to at least the WKView height
+        https://bugs.webkit.org/show_bug.cgi?id=119104
+        &lt;rdar://problem/14549021&gt;
+
+        Reviewed by Anders Carlsson.
+
+        * WebCore.exp.in: Export FrameView::setAutoSizeFixedMinimumHeight.
+        * page/FrameView.cpp:
+        (WebCore::FrameView::FrameView):
+        Initialize m_autoSizeFixedMinimumHeight to 0.
+
+        (WebCore::FrameView::autoSizeIfEnabled):
+        Increase the FrameView height to m_autoSizeFixedMinimumHeight if necessary,
+        and do another layout. Store the computed intrinsic content size.
+
+        (WebCore::FrameView::setAutoSizeFixedMinimumHeight): Added.
+
+        * page/FrameView.h:
+        (WebCore::FrameView::autoSizingIntrinsicContentSize): Added.
+
</ins><span class="cx"> 2013-07-26  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Windows] Remove workarounds now that rdar://problem/14390466 is fixed.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (153377 => 153378)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2013-07-26 19:19:34 UTC (rev 153377)
+++ trunk/Source/WebCore/WebCore.exp.in        2013-07-26 20:09:25 UTC (rev 153378)
</span><span class="lines">@@ -1176,6 +1176,7 @@
</span><span class="cx"> __ZN7WebCore9FrameView26adjustPageHeightDeprecatedEPffff
</span><span class="cx"> __ZN7WebCore9FrameView26adjustTiledBackingCoverageEv
</span><span class="cx"> __ZN7WebCore9FrameView29setShouldUpdateWhileOffscreenEb
</span><ins>+__ZN7WebCore9FrameView29setAutoSizeFixedMinimumHeightEi
</ins><span class="cx"> __ZN7WebCore9FrameView31setVisualUpdatesAllowedByClientEb
</span><span class="cx"> __ZN7WebCore9FrameView37setScrollingPerformanceLoggingEnabledEb
</span><span class="cx"> __ZN7WebCore9FrameView37updateLayoutAndStyleIfNeededRecursiveEv
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (153377 => 153378)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2013-07-26 19:19:34 UTC (rev 153377)
+++ trunk/Source/WebCore/page/FrameView.cpp        2013-07-26 20:09:25 UTC (rev 153378)
</span><span class="lines">@@ -195,6 +195,7 @@
</span><span class="cx">     , m_shouldAutoSize(false)
</span><span class="cx">     , m_inAutoSize(false)
</span><span class="cx">     , m_didRunAutosize(false)
</span><ins>+    , m_autoSizeFixedMinimumHeight(0)
</ins><span class="cx">     , m_headerHeight(0)
</span><span class="cx">     , m_footerHeight(0)
</span><span class="cx">     , m_milestonesPendingPaint(0)
</span><span class="lines">@@ -2967,9 +2968,27 @@
</span><span class="cx">         setHorizontalScrollbarLock(false);
</span><span class="cx">         setScrollbarModes(horizonalScrollbarMode, verticalScrollbarMode, true, true);
</span><span class="cx">     }
</span><ins>+
+    m_autoSizeContentSize = contentsSize();
+
+    if (m_autoSizeFixedMinimumHeight) {
+        resize(m_autoSizeContentSize.width(), max(m_autoSizeFixedMinimumHeight, m_autoSizeContentSize.height()));
+        document-&gt;updateLayoutIgnorePendingStylesheets();
+    }
+
</ins><span class="cx">     m_didRunAutosize = true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void FrameView::setAutoSizeFixedMinimumHeight(int fixedMinimumHeight)
+{
+    if (m_autoSizeFixedMinimumHeight == fixedMinimumHeight)
+        return;
+
+    m_autoSizeFixedMinimumHeight = fixedMinimumHeight;
+
+    setNeedsLayout();
+}
+
</ins><span class="cx"> void FrameView::updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow)
</span><span class="cx"> {
</span><span class="cx">     if (!m_viewportRenderer)
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.h (153377 => 153378)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.h        2013-07-26 19:19:34 UTC (rev 153377)
+++ trunk/Source/WebCore/page/FrameView.h        2013-07-26 20:09:25 UTC (rev 153378)
</span><span class="lines">@@ -298,6 +298,8 @@
</span><span class="cx">     void updateIsVisuallyNonEmpty();
</span><span class="cx">     bool isVisuallyNonEmpty() const { return m_isVisuallyNonEmpty; }
</span><span class="cx">     void enableAutoSizeMode(bool enable, const IntSize&amp; minSize, const IntSize&amp; maxSize);
</span><ins>+    void setAutoSizeFixedMinimumHeight(int fixedMinimumHeight);
+    IntSize autoSizingIntrinsicContentSize() const { return m_autoSizeContentSize; }
</ins><span class="cx"> 
</span><span class="cx">     void forceLayout(bool allowSubtree = false);
</span><span class="cx">     void forceLayoutForPagination(const FloatSize&amp; pageSize, const FloatSize&amp; originalPageSize, float maximumShrinkFactor, AdjustViewSizeOrNot);
</span><span class="lines">@@ -636,6 +638,10 @@
</span><span class="cx">     IntSize m_minAutoSize;
</span><span class="cx">     // The upper bound on the size when autosizing.
</span><span class="cx">     IntSize m_maxAutoSize;
</span><ins>+    // The fixed height to resize the view to after autosizing is complete.
+    int m_autoSizeFixedMinimumHeight;
+    // The intrinsic content size decided by autosizing.
+    IntSize m_autoSizeContentSize;
</ins><span class="cx"> 
</span><span class="cx">     OwnPtr&lt;ScrollableAreaSet&gt; m_scrollableAreas;
</span><span class="cx">     OwnPtr&lt;ViewportConstrainedObjectSet&gt; m_viewportConstrainedObjects;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (153377 => 153378)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2013-07-26 19:19:34 UTC (rev 153377)
+++ trunk/Source/WebKit2/ChangeLog        2013-07-26 20:09:25 UTC (rev 153378)
</span><span class="lines">@@ -1,3 +1,60 @@
</span><ins>+2013-07-26  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        Add a mode where autosizing fixes the FrameView height to at least the WKView height
+        https://bugs.webkit.org/show_bug.cgi?id=119104
+        &lt;rdar://problem/14549021&gt;
+
+        Reviewed by Anders Carlsson.
+
+        * Shared/WebPageCreationParameters.cpp:
+        (WebKit::WebPageCreationParameters::encode):
+        (WebKit::WebPageCreationParameters::decode):
+        * Shared/WebPageCreationParameters.h:
+        Add autoSizingShouldExpandToViewHeight parameter.
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView minimumWidthForAutoLayout]):
+        (-[WKView setMinimumWidthForAutoLayout:]):
+        Un-deprecate these as they're still useful if not sending a height.
+
+        (-[WKView shouldExpandToViewHeightForAutoLayout]):
+        (-[WKView setShouldExpandToViewHeightForAutoLayout:]):
+        * UIProcess/API/mac/WKViewPrivate.h:
+        New property, forward to WebPageProxy.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy):
+        (WebKit::WebPageProxy::creationParameters):
+        (WebKit::WebPageProxy::setAutoSizingShouldExpandToViewHeight):
+        * UIProcess/WebPageProxy.h:
+        (WebKit::WebPageProxy::autoSizingShouldExpandToViewHeight):
+        New property, forward to WebPage.
+
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
+        If enabled, update the FrameView's autoSizeFixedMinimumHeight.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::WebPage):
+        (WebKit::WebPage::setAutoSizingShouldExpandToViewHeight):
+        * WebProcess/WebPage/WebPage.h:
+        (WebKit::WebPage::autoSizingShouldExpandToViewHeight):
+        New property; if enabled, set FrameView's autoSizeFixedMinimumHeight,
+        otherwise reset it to 0.
+
+        * WebProcess/WebPage/WebPage.messages.in:
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired):
+        (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
+        Retrieve intrinsic content size explicitly from the FrameView, as
+        it may not have used it as its final contentsSize if
+        autoSizeFixedMinimumHeight is set.
+
+        Set the WebPage's size in case the load is committed so that the
+        WebFrameLoaderClient doesn't reset us to the wrong size.
+
+        Update autoSizeFixedMinimumHeight if enabled when the view size changes.
+
</ins><span class="cx"> 2013-07-25  Andreas Kling  &lt;akling@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         ChromeClient::focusedNodeChanged() should be focusedElementChanged().
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPageCreationParameterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp (153377 => 153378)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp        2013-07-26 19:19:34 UTC (rev 153377)
+++ trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp        2013-07-26 20:09:25 UTC (rev 153378)
</span><span class="lines">@@ -60,6 +60,7 @@
</span><span class="cx">     encoder &lt;&lt; mediaVolume;
</span><span class="cx">     encoder &lt;&lt; mayStartMediaWhenInWindow;
</span><span class="cx">     encoder &lt;&lt; minimumLayoutSize;
</span><ins>+    encoder &lt;&lt; autoSizingShouldExpandToViewHeight;
</ins><span class="cx">     encoder.encodeEnum(scrollPinningBehavior);
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="lines">@@ -124,6 +125,8 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(parameters.minimumLayoutSize))
</span><span class="cx">         return false;
</span><ins>+    if (!decoder.decode(parameters.autoSizingShouldExpandToViewHeight))
+        return false;
</ins><span class="cx">     if (!decoder.decodeEnum(parameters.scrollPinningBehavior))
</span><span class="cx">         return false;
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPageCreationParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPageCreationParameters.h (153377 => 153378)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPageCreationParameters.h        2013-07-26 19:19:34 UTC (rev 153377)
+++ trunk/Source/WebKit2/Shared/WebPageCreationParameters.h        2013-07-26 20:09:25 UTC (rev 153378)
</span><span class="lines">@@ -90,6 +90,7 @@
</span><span class="cx">     bool mayStartMediaWhenInWindow;
</span><span class="cx"> 
</span><span class="cx">     WebCore::IntSize minimumLayoutSize;
</span><ins>+    bool autoSizingShouldExpandToViewHeight;
</ins><span class="cx">     
</span><span class="cx">     WebCore::ScrollPinningBehavior scrollPinningBehavior;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (153377 => 153378)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2013-07-26 19:19:34 UTC (rev 153377)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2013-07-26 20:09:25 UTC (rev 153378)
</span><span class="lines">@@ -3229,25 +3229,11 @@
</span><span class="cx"> 
</span><span class="cx"> - (CGFloat)minimumWidthForAutoLayout
</span><span class="cx"> {
</span><del>-    static BOOL loggedDeprecationWarning = NO;
-
-    if (!loggedDeprecationWarning) {
-        NSLog(@&quot;Please use minimumSizeForAutoLayout instead of minimumWidthForAutoLayout.&quot;);
-        loggedDeprecationWarning = YES;
-    }
-
</del><span class="cx">     return self.minimumSizeForAutoLayout.width;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)setMinimumWidthForAutoLayout:(CGFloat)minimumLayoutWidth
</span><span class="cx"> {
</span><del>-    static BOOL loggedDeprecationWarning = NO;
-
-    if (!loggedDeprecationWarning) {
-        NSLog(@&quot;Please use setMinimumSizeForAutoLayout: instead of setMinimumWidthForAutoLayout:&quot;);
-        loggedDeprecationWarning = YES;
-    }
-
</del><span class="cx">     self.minimumSizeForAutoLayout = NSMakeSize(minimumLayoutWidth, self.minimumSizeForAutoLayout.height);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3266,6 +3252,16 @@
</span><span class="cx">     [self setShouldClipToVisibleRect:expandsToFit];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (BOOL)shouldExpandToViewHeightForAutoLayout
+{
+    return _data-&gt;_page-&gt;autoSizingShouldExpandToViewHeight();
+}
+
+- (void)setShouldExpandToViewHeightForAutoLayout:(BOOL)shouldExpand
+{
+    return _data-&gt;_page-&gt;setAutoSizingShouldExpandToViewHeight(shouldExpand);
+}
+
</ins><span class="cx"> - (BOOL)shouldClipToVisibleRect
</span><span class="cx"> {
</span><span class="cx">     return _data-&gt;_clipsToVisibleRect;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h (153377 => 153378)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h        2013-07-26 19:19:34 UTC (rev 153377)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h        2013-07-26 20:09:25 UTC (rev 153378)
</span><span class="lines">@@ -62,6 +62,7 @@
</span><span class="cx"> @property (readwrite) CGFloat minimumWidthForAutoLayout;
</span><span class="cx"> @property (readwrite) NSSize minimumSizeForAutoLayout;
</span><span class="cx"> @property (readwrite) BOOL shouldClipToVisibleRect;
</span><ins>+@property (readwrite) BOOL shouldExpandToViewHeightForAutoLayout;
</ins><span class="cx"> 
</span><span class="cx"> @property(copy, nonatomic) NSColor *underlayColor;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (153377 => 153378)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2013-07-26 19:19:34 UTC (rev 153377)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2013-07-26 20:09:25 UTC (rev 153378)
</span><span class="lines">@@ -306,6 +306,7 @@
</span><span class="cx">     , m_renderTreeSize(0)
</span><span class="cx">     , m_shouldSendEventsSynchronously(false)
</span><span class="cx">     , m_suppressVisibilityUpdates(false)
</span><ins>+    , m_autoSizingShouldExpandToViewHeight(false)
</ins><span class="cx">     , m_mediaVolume(1)
</span><span class="cx">     , m_mayStartMediaWhenInWindow(true)
</span><span class="cx">     , m_waitingForDidUpdateInWindowState(false)
</span><span class="lines">@@ -3955,6 +3956,7 @@
</span><span class="cx">     parameters.mediaVolume = m_mediaVolume;
</span><span class="cx">     parameters.mayStartMediaWhenInWindow = m_mayStartMediaWhenInWindow;
</span><span class="cx">     parameters.minimumLayoutSize = m_minimumLayoutSize;
</span><ins>+    parameters.autoSizingShouldExpandToViewHeight = m_autoSizingShouldExpandToViewHeight;
</ins><span class="cx">     parameters.scrollPinningBehavior = m_scrollPinningBehavior;
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="lines">@@ -4349,6 +4351,19 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebPageProxy::setAutoSizingShouldExpandToViewHeight(bool shouldExpand)
+{
+    if (m_autoSizingShouldExpandToViewHeight == shouldExpand)
+        return;
+
+    m_autoSizingShouldExpandToViewHeight = shouldExpand;
+
+    if (!isValid())
+        return;
+
+    m_process-&gt;send(Messages::WebPage::SetAutoSizingShouldExpandToViewHeight(shouldExpand), m_pageID, 0);
+}
+
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::substitutionsPanelIsShowing(bool&amp; isShowing)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (153377 => 153378)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2013-07-26 19:19:34 UTC (rev 153377)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2013-07-26 20:09:25 UTC (rev 153378)
</span><span class="lines">@@ -756,6 +756,9 @@
</span><span class="cx">     WebCore::IntSize minimumLayoutSize() const { return m_minimumLayoutSize; }
</span><span class="cx">     void setMinimumLayoutSize(const WebCore::IntSize&amp;);
</span><span class="cx"> 
</span><ins>+    bool autoSizingShouldExpandToViewHeight() const { return m_autoSizingShouldExpandToViewHeight; }
+    void setAutoSizingShouldExpandToViewHeight(bool);
+
</ins><span class="cx">     bool mainFrameInViewSourceMode() const { return m_mainFrameInViewSourceMode; }
</span><span class="cx">     void setMainFrameInViewSourceMode(bool);
</span><span class="cx"> 
</span><span class="lines">@@ -1252,6 +1255,7 @@
</span><span class="cx">     bool m_shouldSendEventsSynchronously;
</span><span class="cx"> 
</span><span class="cx">     bool m_suppressVisibilityUpdates;
</span><ins>+    bool m_autoSizingShouldExpandToViewHeight;
</ins><span class="cx">     WebCore::IntSize m_minimumLayoutSize;
</span><span class="cx"> 
</span><span class="cx">     float m_mediaVolume;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (153377 => 153378)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2013-07-26 19:19:34 UTC (rev 153377)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2013-07-26 20:09:25 UTC (rev 153378)
</span><span class="lines">@@ -1212,6 +1212,7 @@
</span><span class="cx">         int minimumLayoutHeight = std::max(webPage-&gt;minimumLayoutSize().height(), 1);
</span><span class="cx">         int maximumSize = std::numeric_limits&lt;int&gt;::max();
</span><span class="cx">         m_frame-&gt;coreFrame()-&gt;view()-&gt;enableAutoSizeMode(true, IntSize(minimumLayoutWidth, minimumLayoutHeight), IntSize(maximumSize, maximumSize));
</span><ins>+        m_frame-&gt;coreFrame()-&gt;view()-&gt;setAutoSizeFixedMinimumHeight(webPage-&gt;size().height());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_frame-&gt;coreFrame()-&gt;view()-&gt;setProhibitsScrolling(shouldDisableScrolling);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (153377 => 153378)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2013-07-26 19:19:34 UTC (rev 153377)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2013-07-26 20:09:25 UTC (rev 153378)
</span><span class="lines">@@ -278,6 +278,7 @@
</span><span class="cx">     , m_canShortCircuitHorizontalWheelEvents(false)
</span><span class="cx">     , m_numWheelEventHandlers(0)
</span><span class="cx">     , m_cachedPageCount(0)
</span><ins>+    , m_autoSizingShouldExpandToViewHeight(false)
</ins><span class="cx"> #if ENABLE(CONTEXT_MENUS)
</span><span class="cx">     , m_isShowingContextMenu(false)
</span><span class="cx"> #endif
</span><span class="lines">@@ -380,6 +381,7 @@
</span><span class="cx">     setIsInWindow(parameters.isInWindow);
</span><span class="cx"> 
</span><span class="cx">     setMinimumLayoutSize(parameters.minimumLayoutSize);
</span><ins>+    setAutoSizingShouldExpandToViewHeight(parameters.autoSizingShouldExpandToViewHeight);
</ins><span class="cx">     
</span><span class="cx">     setScrollPinningBehavior(parameters.scrollPinningBehavior);
</span><span class="cx"> 
</span><span class="lines">@@ -3900,6 +3902,16 @@
</span><span class="cx">     corePage()-&gt;mainFrame()-&gt;view()-&gt;enableAutoSizeMode(true, IntSize(minimumLayoutWidth, minimumLayoutHeight), IntSize(maximumSize, maximumSize));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebPage::setAutoSizingShouldExpandToViewHeight(bool shouldExpand)
+{
+    if (m_autoSizingShouldExpandToViewHeight == shouldExpand)
+        return;
+
+    m_autoSizingShouldExpandToViewHeight = shouldExpand;
+
+    corePage()-&gt;mainFrame()-&gt;view()-&gt;setAutoSizeFixedMinimumHeight(shouldExpand ? m_viewSize.height() : 0);
+}
+
</ins><span class="cx"> bool WebPage::isSmartInsertDeleteEnabled()
</span><span class="cx"> {
</span><span class="cx">     return m_page-&gt;settings()-&gt;smartInsertDeleteEnabled();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (153377 => 153378)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2013-07-26 19:19:34 UTC (rev 153377)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2013-07-26 20:09:25 UTC (rev 153378)
</span><span class="lines">@@ -639,6 +639,9 @@
</span><span class="cx">     void setMinimumLayoutSize(const WebCore::IntSize&amp;);
</span><span class="cx">     WebCore::IntSize minimumLayoutSize() const { return m_minimumLayoutSize; }
</span><span class="cx"> 
</span><ins>+    void setAutoSizingShouldExpandToViewHeight(bool shouldExpand);
+    bool autoSizingShouldExpandToViewHeight() { return m_autoSizingShouldExpandToViewHeight; }
+
</ins><span class="cx">     bool canShowMIMEType(const String&amp; MIMEType) const;
</span><span class="cx"> 
</span><span class="cx">     void addTextCheckingRequest(uint64_t requestID, PassRefPtr&lt;WebCore::TextCheckingRequest&gt;);
</span><span class="lines">@@ -1003,6 +1006,7 @@
</span><span class="cx">     unsigned m_cachedPageCount;
</span><span class="cx"> 
</span><span class="cx">     WebCore::IntSize m_minimumLayoutSize;
</span><ins>+    bool m_autoSizingShouldExpandToViewHeight;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(CONTEXT_MENUS)
</span><span class="cx">     bool m_isShowingContextMenu;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (153377 => 153378)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2013-07-26 19:19:34 UTC (rev 153377)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2013-07-26 20:09:25 UTC (rev 153378)
</span><span class="lines">@@ -289,6 +289,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     SetMinimumLayoutSize(WebCore::IntSize minimumLayoutSize)
</span><ins>+    SetAutoSizingShouldExpandToViewHeight(bool shouldExpand)
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(EFL)
</span><span class="cx">     ConfirmComposition(WTF::String compositionString)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (153377 => 153378)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2013-07-26 19:19:34 UTC (rev 153377)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2013-07-26 20:09:25 UTC (rev 153378)
</span><span class="lines">@@ -275,7 +275,7 @@
</span><span class="cx">     if (!frameView)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    IntSize contentSize = frameView-&gt;contentsSize();
</del><ins>+    IntSize contentSize = frameView-&gt;autoSizingIntrinsicContentSize();
</ins><span class="cx"> 
</span><span class="cx">     if (m_lastSentIntrinsicContentSize == contentSize)
</span><span class="cx">         return;
</span><span class="lines">@@ -449,13 +449,18 @@
</span><span class="cx">     IntSize size = viewSize;
</span><span class="cx">     IntSize contentSize = IntSize(-1, -1);
</span><span class="cx"> 
</span><del>-    if (!m_webPage-&gt;minimumLayoutSize().width())
</del><ins>+    if (!m_webPage-&gt;minimumLayoutSize().width() || m_webPage-&gt;autoSizingShouldExpandToViewHeight())
</ins><span class="cx">         m_webPage-&gt;setSize(size);
</span><span class="cx"> 
</span><ins>+    FrameView* frameView = m_webPage-&gt;mainFrameView();
+
+    if (m_webPage-&gt;autoSizingShouldExpandToViewHeight() &amp;&amp; frameView)
+        frameView-&gt;setAutoSizeFixedMinimumHeight(viewSize.height());
+
</ins><span class="cx">     m_webPage-&gt;layoutIfNeeded();
</span><span class="cx"> 
</span><del>-    if (m_webPage-&gt;minimumLayoutSize().width()) {
-        contentSize = m_webPage-&gt;mainWebFrame()-&gt;contentBounds().size();
</del><ins>+    if (m_webPage-&gt;minimumLayoutSize().width() &amp;&amp; frameView) {
+        contentSize = frameView-&gt;autoSizingIntrinsicContentSize();
</ins><span class="cx">         size = contentSize;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>