[iOS] Do not flatten frames when async frame scrolling is enabled
authorfred.wang@free.fr <fred.wang@free.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Oct 2017 07:54:37 +0000 (07:54 +0000)
committerfred.wang@free.fr <fred.wang@free.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Oct 2017 07:54:37 +0000 (07:54 +0000)
commit6bc85a45d56c9b0c16199509fb9b07961b01d939
treec396e5f140d783dd56f8ef6d5c508fb725b157ac
parent9e931fa2b450e536f65a94e0f2c2d451152013f4
[iOS] Do not flatten frames when async frame scrolling is enabled
https://bugs.webkit.org/show_bug.cgi?id=173704

Patch by Frederic Wang <fwang@igalia.com> on 2017-09-27
Reviewed by Simon Fraser.

Source/WebCore:

This patch disables frame flattening when async frame scrolling is enabled on iOS, as
otherwise you can not scroll them. Once iframe scrolling is implemented in iOS (bug 149264),
developers and beta testers will be able to check it by enabling "Async Frame Scrolling"
in the "Experimental WebKit Features" menu of Safari iOS.

Test: platform/ios/fast/frames/flattening/iframe-flattening-with-async-frame-scrolling.html

* page/FrameView.cpp:
(WebCore::FrameView::frameFlatteningEnabled): Use effectiveFrameFlattening()
* page/Settings.cpp:
(WebCore::Settings::effectiveFrameFlattening): New function to return frameFlattening() or do
some exceptions on iOS.
* page/Settings.h: Declare effectiveFrameFlattening.
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::flattenFrameSet): Use effectiveFrameFlattening()
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::flattenFrame): Ditto.
* rendering/RenderView.cpp:
(WebCore::FrameFlatteningLayoutDisallower::FrameFlatteningLayoutDisallower): Ditto.

Source/WebKit:

This patch disables frame flattening when async frame scrolling is enabled on iOS, as
otherwise you can not scroll them. Once iframe scrolling is implemented in iOS (bug 149264),
developers and beta testers will be able to check it by enabling "Async Frame Scrolling"
in the "Experimental WebKit Features" menu of Safari iOS.

Test: platform/ios/fast/frames/flattening/iframe-flattening-with-async-frame-scrolling.html

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged): Use effectiveFrameFlattening() introduced in
Source/WebCore.

LayoutTests:

Add an iOS test to verify that frame flattening is disabled when async frame scrolling is enabled.

* platform/ios/fast/frames/flattening/iframe-flattening-with-async-frame-scrolling-expected.txt: Added.
* platform/ios/fast/frames/flattening/iframe-flattening-with-async-frame-scrolling.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/ios/fast/frames/flattening/iframe-flattening-with-async-frame-scrolling-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/fast/frames/flattening/iframe-flattening-with-async-frame-scrolling.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.h
Source/WebCore/rendering/RenderFrameSet.cpp
Source/WebCore/rendering/RenderIFrame.cpp
Source/WebCore/rendering/RenderView.cpp
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp