-
timothy_horton@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=121874 <rdar://problem/15071494> Reviewed by Sam Weinig. * Shared/DrawingAreaInfo.h: We can have DrawingAreaTypeTiledCoreAnimation without threaded scrolling. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetThreadedScrollingEnabled): (WKPreferencesGetThreadedScrollingEnabled): * UIProcess/API/C/WKPreferencesPrivate.h: Add a preference for threaded scrolling. * UIProcess/API/mac/WKView.mm: (-[WKView WebKit::]): * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: * WebProcess/WebPage/DrawingArea.cpp: (WebKit::DrawingArea::create): * WebProcess/WebPage/DrawingArea.h: Make it so we can use TiledCoreAnimationDrawingArea without ENABLE(THREADED_SCROLLING). * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::shouldUseTiledBackingForFrame): * WebProcess/WebCoreSupport/WebChromeClient.h: Override shouldUseTiledBackingForFrame; ask the drawing area if we want a tiled backing for the given frame. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::~WebPage): * WebProcess/WebPage/WebPage.h: Move attaching and detaching the scrolling tree into WebPage. Store whether or not this page is going to use threaded scrolling once, as this cannot change through the life of a page. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea): Move attaching and detaching the scrolling tree into WebPage. (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay): (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay): (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition): Only do scrolling coordinator work if we have a scrolling coordinator. (WebKit::TiledCoreAnimationDrawingArea::shouldUseTiledBackingForFrame): TiledCoreAnimationDrawingArea always wants a tiled backing for the main frame. No new tests; a near-future patch is going to put the majority of layout tests into the tiled-drawing-without-threaded-scrolling mode. * page/ChromeClient.h: (WebCore::ChromeClient::shouldUseTiledBackingForFrame): Add a ChromeClient callback to determine whether a given frame wants a TiledBacking for its contents. * page/FrameView.h: * WebCore.exp.in: Make isMainFrameView public and export it for use in WebKit2. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::RenderLayerBacking): Make use of shouldUseTiledBackingForFrame instead of predicating the main frame using a tile cache on whether we have a scrolling coordinator. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::mainFrameBackingIsTiled): Added. (WebCore::RenderLayerCompositor::shouldCompositeOverflowControls): (WebCore::RenderLayerCompositor::requiresOverhangAreasLayer): (WebCore::RenderLayerCompositor::requiresContentShadowLayer): All of these checks for existence of a scrollingCoordinator should actually key off whether we're using tiled drawing at the root; they have nothing to do with threaded scrolling. * rendering/RenderLayerCompositor.h: * WebKitTestRunner/mac/PlatformWebViewMac.mm: (WTR::PlatformWebView::PlatformWebView): The existing tiled-drawing layout tests require threaded scrolling to be enabled. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
017ef58c