[mac] Stop using DrawingAreaImpl on PLATFORM(MAC)
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Oct 2013 21:14:26 +0000 (21:14 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Oct 2013 21:14:26 +0000 (21:14 +0000)
commit70e03f041bbb3f022e906d0fc13077a3c0eda9a7
tree0266adcb9f5a019159817fb5eb62a4e0bec20719
parent98e2d8b2349d678e831b59f33d62b6bf87f86a3a
[mac] Stop using DrawingAreaImpl on PLATFORM(MAC)
https://bugs.webkit.org/show_bug.cgi?id=121859
<rdar://problem/15069359>

Reviewed by Anders Carlsson.

The Mac port will now use tiled drawing for all WebKit2 views.

* Shared/DrawingAreaInfo.h:
Don't include DrawingAreaTypeImpl as a valid DrawingAreaType on Mac.

* UIProcess/API/mac/WKView.mm:
(-[WKView drawRect:]):
Remove our implementation of drawRect that paints from DrawingAreaImpl's backing store.

(-[WKView _shouldUseTiledDrawingArea]):
Removed. Always treated as if it were true, now.

(-[WKView _createDrawingAreaProxy]):
Always create a TiledCoreAnimationDrawingAreaProxy now.

(-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
(-[WKView wantsUpdateLayer]):
WKView always wants a layer, etc.

* UIProcess/BackingStore.h:
Remove Mac-specific BackingStore code, only used for DrawingAreaImpl on Mac.

* UIProcess/DrawingAreaProxy.h:
Remove an unneeded include.

* UIProcess/mac/BackingStoreMac.mm: Removed.
* WebKit2.xcodeproj/project.pbxproj:
Remove a bunch of files we don't need to build anymore.

* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create):
Never create a DrawingAreaImpl on Mac.

* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::updatePreferences):
(WebKit::DrawingAreaImpl::resumePainting):
* WebProcess/WebPage/DrawingAreaImpl.h:
Remove Mac-specific DrawingAreaImpl code.

* WebProcess/WebPage/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::create):
* WebProcess/WebPage/mac/LayerTreeHostMac.h: Removed.
* WebProcess/WebPage/mac/LayerTreeHostMac.mm: Removed.

* page/FrameView.cpp:
(WebCore::FrameView::addTrackedRepaintRect):
(WebCore::FrameView::repaintContentRectangle):
* page/FrameView.h:
Factor out the coordinate conversion and appending of new repaint rects on FrameView.

* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::dumpProperties):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::shouldDumpPropertyForLayer):
Don't dump repaint rects on the root tile cache, they'll be included at the top,
where FrameView's repaints are normally included.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setContentsNeedDisplay):
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
Push the root tile cache's tracked repaint rects to FrameView instead.

* WebKitTestRunner/TestInvocation.cpp:
(WTR::shouldUseThreadedScrolling):
(WTR::updateThreadedScrollingForCurrentTest):
(WTR::TestInvocation::invoke):
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(-[TestRunnerWKView initWithFrame:contextRef:pageGroupRef:relatedToPage:useThreadedScrolling:]):
(WTR::PlatformWebView::PlatformWebView):
(WTR::PlatformWebView::viewSupportsOptions):
Rename the tiled drawing switch to threaded scrolling, since that's really
all it switches now that we use tiled drawing everywhere.

Use an unbuffered window, as well, to avoid snapshotting issues on some platforms
and to more closely match the case we're interested in testing.

* platform/mac-wk2/TestExpectations:

* platform/mac-wk2/compositing/contents-opaque/body-background-painted-expected.txt: Added.
* platform/mac-wk2/compositing/contents-opaque/body-background-skipped-expected.txt: Added.
* platform/mac-wk2/compositing/rtl/rtl-absolute-expected.txt: Added.
* platform/mac-wk2/compositing/rtl/rtl-absolute-overflow-expected.txt: Added.
* platform/mac-wk2/compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt: Added.
Add WebKit2 results, because we dump non-white background color on the root layer now.

* platform/mac-wk2/compositing/repaint/fixed-background-scroll-expected.txt: Added.
New WebKit2 result; repaint rects are showing up now.

* platform/mac-wk2/compositing/rtl/rtl-fixed-expected.txt:
* platform/mac-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt:
Slightly adjusted results.

* platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt: Added.
* platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: Added.
* platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt: Added.
* platform/mac-wk2/compositing/tiling/tiled-layer-resize-expected.txt: Added.
New WebKit2 results; we show the root tile cache if layerTreeAsText is asked to dump tile caches.

* platform/mac-wk2/editing/input/caret-at-the-edge-of-contenteditable-expected.txt: Added.
* platform/mac-wk2/editing/input/reveal-caret-of-multiline-contenteditable-expected.txt: Added.
* platform/mac-wk2/fast/block/basic/020-expected.txt: Added.
* platform/mac-wk2/fast/dynamic/012-expected.txt: Added.
* platform/mac-wk2/fast/dynamic/layer-hit-test-crash-expected.txt: Added.
* platform/mac-wk2/fast/repaint/layer-hide-when-needs-layout-expected.txt: Added.
* platform/mac-wk2/fast/text/whitespace/028-expected.txt: Added.
* platform/mac-wk2/fast/layers/layer-visibility-expected.txt: Added.
* platform/mac-wk2/fast/layers/layer-visibility-sublayer-expected.txt: Added.
* platform/mac-wk2/fast/repaint/invisible-objects-expected.txt: Added.
New WebKit2 results; additional compositing layers.

* platform/mac-wk2/tiled-drawing/window-server-snapshots-work-expected-mismatch.html: Added.
* platform/mac-wk2/tiled-drawing/window-server-snapshots-work.html: Added.
New test to ensure that window-server snapshots work with tiled drawing.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
47 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/TestExpectations
LayoutTests/platform/mac-wk2/compositing/contents-opaque/body-background-painted-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/compositing/contents-opaque/body-background-skipped-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/compositing/repaint/fixed-background-scroll-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/compositing/rtl/rtl-absolute-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/compositing/rtl/rtl-absolute-overflow-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/compositing/rtl/rtl-fixed-expected.txt
LayoutTests/platform/mac-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt
LayoutTests/platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/compositing/tiling/tiled-layer-resize-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/editing/input/caret-at-the-edge-of-contenteditable-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/editing/input/reveal-caret-of-multiline-contenteditable-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/fast/block/basic/020-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/fast/dynamic/012-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/fast/dynamic/layer-hit-test-crash-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/fast/layers/layer-visibility-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/fast/layers/layer-visibility-sublayer-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/fast/repaint/invisible-objects-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/fast/repaint/layer-hide-when-needs-layout-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/fast/text/whitespace/028-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/tiled-drawing/window-server-snapshots-work-expected-mismatch.html [new file with mode: 0644]
LayoutTests/platform/mac-wk2/tiled-drawing/window-server-snapshots-work.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/platform/graphics/GraphicsLayer.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/DrawingAreaInfo.h
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/BackingStore.h
Source/WebKit2/UIProcess/DrawingAreaProxy.h
Source/WebKit2/UIProcess/mac/BackingStoreMac.mm [deleted file]
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp
Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp
Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h
Source/WebKit2/WebProcess/WebPage/LayerTreeHost.cpp
Source/WebKit2/WebProcess/WebPage/mac/LayerTreeHostMac.h [deleted file]
Source/WebKit2/WebProcess/WebPage/mac/LayerTreeHostMac.mm [deleted file]
Tools/ChangeLog
Tools/WebKitTestRunner/TestInvocation.cpp
Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm