Bug 119104

Summary: Add a mode where autosizing fixes the FrameView height to at least the WKView height
Product: WebKit Reporter: Tim Horton <thorton>
Component: WebKit2Assignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, commit-queue
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch andersca: review+

Description Tim Horton 2013-07-25 13:43:53 PDT
If a client enables WKView autolayout, and autolayout decides to lay the view out to a size larger than the computed intrinsic content size, we currently don't stretch the FrameView to fit the WKView size, leaving an unpainted gap between the bottom of the content and the view. Also, it is very hard for clients to work around this by setting the height component of minimumSizeForAutoLayout, because content with a div that consumes 100%x100% of the view will forever grow, and the intrinsic content size reported by WKView will not be the true intrinsic content size, but instead the size based off of the minimumSizeForAutoLayout height.

In the worst case, content can consume *over* 100% of the view, which (without this patch, using minimumSizeForAutoLayout's height affixed to the WKView's height) will lead to the view growing in size every single layout.

<rdar://problem/14549021>
Comment 1 Tim Horton 2013-07-25 13:46:35 PDT
I'm making it a mode because it adds a potential extra layout pass (in autoSizeIfEnabled, we do the normal work to compute the intrinsic content size, and then we set the FrameView height to the max of the intrinsic height and the WKView height and do one extra layout).
Comment 2 Tim Horton 2013-07-25 14:18:17 PDT
Created attachment 207485 [details]
patch
Comment 3 WebKit Commit Bot 2013-07-25 14:21:26 PDT
Attachment 207485 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/WebCore.exp.in', u'Source/WebCore/page/FrameView.cpp', u'Source/WebCore/page/FrameView.h', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/Shared/WebPageCreationParameters.cpp', u'Source/WebKit2/Shared/WebPageCreationParameters.h', u'Source/WebKit2/UIProcess/API/mac/WKView.mm', u'Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h', u'Source/WebKit2/UIProcess/WebPageProxy.cpp', u'Source/WebKit2/UIProcess/WebPageProxy.h', u'Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp', u'Source/WebKit2/WebProcess/WebPage/WebPage.cpp', u'Source/WebKit2/WebProcess/WebPage/WebPage.h', u'Source/WebKit2/WebProcess/WebPage/WebPage.messages.in', u'Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm']" exit_code: 1
Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h:65:  Extra space before ( in function call  [whitespace/parens] [4]
Source/WebCore/page/FrameView.h:301:  The parameter name "fixedMinimumHeight" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebKit2/WebProcess/WebPage/WebPage.h:642:  The parameter name "shouldExpand" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 3 in 16 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Tim Horton 2013-07-26 13:08:45 PDT
http://trac.webkit.org/changeset/153378