Safari tabs still have shrunken content after coming out of fullscreen
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Jun 2015 19:23:08 +0000 (19:23 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Jun 2015 19:23:08 +0000 (19:23 +0000)
commit7338ec2b53e50583c559c76cb0bc426aec099043
tree989166434915c094c4ad02f47eb5b1c49208444f
parent769ce2a34a4d5269561ea912e3da1311f55ced93
Safari tabs still have shrunken content after coming out of fullscreen
https://bugs.webkit.org/show_bug.cgi?id=146037
<rdar://problem/21105960>

Reviewed by Simon Fraser and Darin Adler.

* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::useFixedLayoutDidChange):
(WebKit::WebPageProxy::fixedLayoutSizeDidChange):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setUseFixedLayout):
(WebKit::WebPage::setFixedLayoutSize):
Keep the UI process up-to-date when fixed layout is enabled or the size changes.
This is important because these things can change from the Web process side too,
and the UI process uses its (potentially stale) version to do some short-circuiting.
This was causing us to fail to turn off fixed layout when it was turned
on from the Web process side (by TiledCoreAnimationDrawingArea).

* UIProcess/mac/WKViewLayoutStrategy.mm:
(-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy willChangeLayoutStrategy]):
Reset the view scale, which WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy
makes heavy use of, just like the others.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/ShrinkToFit.mm: Added.
(-[ShrinkToFitNavigationDelegate webView:didFinishNavigation:]):
(TEST):
Add a test that ensures that disabling scale-to-fit mode correctly updates
the page's layout.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/UIProcess/mac/WKViewLayoutStrategy.mm
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/ShrinkToFit.mm [new file with mode: 0644]