Expose and test fixedLayoutSize via modern WebKit SPI
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Apr 2015 22:37:11 +0000 (22:37 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Apr 2015 22:37:11 +0000 (22:37 +0000)
commit0f2cb0277958dc2d8262924639ff892bab56736a
tree683d1e5cdf58cc41d6d763019164b6d49eb5aae4
parent2a6a01dc5181e6ca67ada2a7fe64d5b79370efc2
Expose and test fixedLayoutSize via modern WebKit SPI
https://bugs.webkit.org/show_bug.cgi?id=143500

Reviewed by Simon Fraser.

* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isFixedLayoutEnabled]):
(-[WKWebView _setFixedLayoutEnabled:]):
(-[WKWebView _fixedLayoutSize]):
(-[WKWebView _setFixedLayoutSize:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _isFixedLayoutEnabled]):
(-[WKView _setFixedLayoutEnabled:]):
(-[WKView _fixedLayoutSize]):
(-[WKView _setFixedLayoutSize:]):
Add API for adjusting the fixed layout size, and whether or not we use it.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
Repair a mistake I made in r139822, where I brought odd TILED_BACKING_STORE-only
logic (which disables scrollbars if fixedLayoutSize is enabled) to the rest of the ports.
Put it back as TILED_BACKING_STORE-only.

Persist the fixedLayoutSize through view creation; we already persist the enabled state,
but not the size, which doesn't make any sense.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::fixedLayoutSize):
* WebProcess/WebPage/WebPage.h:
Add a fixedLayoutSize() getter.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/FixedLayoutSize.mm: Added.
(-[FixedLayoutSizeNavigationDelegate webView:didFinishNavigation:]):
(TEST):
Add a test that verifies that fixedLayoutSize works at all, that
it persists through a navigation, and that turning it back off reverts to
laying out at the size of the view.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/FixedLayoutSize.mm [new file with mode: 0644]