[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)
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

index dec084a..0aece4b 100644 (file)
@@ -1,3 +1,49 @@
+2013-10-02  Tim Horton  <timothy_horton@apple.com>
+
+        [mac] Stop using DrawingAreaImpl on PLATFORM(MAC) 
+        https://bugs.webkit.org/show_bug.cgi?id=121859
+        <rdar://problem/15069359>
+
+        Reviewed by Anders Carlsson.
+
+        * 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.
+
 2013-10-01  Oliver Hunt  <oliver@apple.com>
 
         Implement Array key, value and entries iterators
index f1ccc70..b300a30 100644 (file)
@@ -347,6 +347,48 @@ webkit.org/b/107018 svg/animations/animate-linear-discrete-additive-b.svg [ Imag
 webkit.org/b/107018 svg/animations/animate-linear-discrete-additive-c.svg  [ ImageOnlyFailure Pass ]
 webkit.org/b/107018 svg/animations/mozilla/animateMotion-mpath-pathLength-1.svg [ ImageOnlyFailure Pass ]
 
+# Region overflow doesn't quite work with tiled drawing.
+webkit.org/b/122233 fast/regions/percentage-margins-mixed-ltr-dominant-regions.html [ ImageOnlyFailure ]
+webkit.org/b/122233 fast/regions/percentage-margins-mixed-rtl-dominant-regions.html [ ImageOnlyFailure ]
+webkit.org/b/122233 fast/regions/percentage-margins-rtl-variable-width-regions.html [ ImageOnlyFailure ]
+webkit.org/b/122233 fast/regions/percentage-margins-variable-width-regions.html [ ImageOnlyFailure ]
+webkit.org/b/122233 fast/regions/frame-view-overflow-scroll.html [ ImageOnlyFailure ]
+
+# Color space issues from switching to tiled drawing.
+webkit.org/b/122234 fast/css/computed-image-width-with-percent-height.html [ ImageOnlyFailure ]
+webkit.org/b/122234 svg/filters/color-space-conversion.svg  [ ImageOnlyFailure ]
+webkit.org/b/122234 svg/masking/mask-type-luminance.svg  [ ImageOnlyFailure ]
+webkit.org/b/122234 svg/masking/mask-type-not-set.svg  [ ImageOnlyFailure ]
+webkit.org/b/122234 svg/filters/feSpecularLight-premultiplied.svg [ ImageOnlyFailure ]
+webkit.org/b/122234 svg/filters/filter-cycle.html [ ImageOnlyFailure ]
+webkit.org/b/122234 css3/filters/null-effect-check.html [ ImageOnlyFailure ]
+webkit.org/b/122234 fast/images/pdf-as-image-with-annotations.html [ ImageOnlyFailure ]
+webkit.org/b/122234 css3/filters/custom/composited/custom-filter-blend-modes.html [ ImageOnlyFailure ]
+webkit.org/b/122234 css3/filters/custom/custom-filter-a-tex-coord-optional.html [ ImageOnlyFailure ]
+webkit.org/b/122234 css3/filters/custom/custom-filter-array-uniform-indirect-index.html [ ImageOnlyFailure ]
+webkit.org/b/122234 css3/filters/custom/custom-filter-array.html [ ImageOnlyFailure ]
+webkit.org/b/122234 css3/filters/custom/custom-filter-blend-modes.html [ ImageOnlyFailure ]
+webkit.org/b/122234 css3/filters/custom/custom-filter-change-blend-mode.html [ ImageOnlyFailure ]
+webkit.org/b/122234 css3/filters/custom/custom-filter-color.html [ ImageOnlyFailure ]
+webkit.org/b/122234 css3/filters/custom/custom-filter-detached-mesh-with-mesh-box-type.html [ ImageOnlyFailure ]
+webkit.org/b/122234 css3/filters/custom/custom-filter-matN.html [ ImageOnlyFailure ]
+webkit.org/b/122234 css3/filters/custom/custom-filter-mesh-column-row-order.html [ ImageOnlyFailure ]
+webkit.org/b/122234 css3/filters/custom/custom-filter-u-mesh-box.html [ ImageOnlyFailure ]
+webkit.org/b/122234 css3/filters/custom/custom-filter-u-mesh-size.html [ ImageOnlyFailure ]
+webkit.org/b/122234 css3/filters/custom/custom-filter-u-texture-size.html [ ImageOnlyFailure ]
+webkit.org/b/122234 css3/filters/custom/custom-filter-u-tile-size.html [ ImageOnlyFailure ]
+webkit.org/b/122234 css3/filters/custom/custom-filter-unavailable-varying.html [ ImageOnlyFailure ]
+webkit.org/b/122234 css3/filters/custom/custom-filter-clamp-css-color-matrix.html [ ImageOnlyFailure ]
+
+# Tiled background images that intersect the tiles are getting weird fringing.
+webkit.org/b/122235 css3/masking/mask-repeat-space-border.html [ ImageOnlyFailure ]
+webkit.org/b/122235 css3/masking/mask-repeat-space-padding.html [ ImageOnlyFailure ]
+webkit.org/b/122235 css3/background/background-repeat-space-border.html [ ImageOnlyFailure ]
+webkit.org/b/122235 css3/background/background-repeat-space-padding.html [ ImageOnlyFailure ]
+
+webkit.org/b/122237 [ Debug ] fast/table/crash-section-logical-height-changed-needsCellRecalc.html [ Crash ]
+webkit.org/b/122238 fast/layers/no-clipping-overflow-hidden-added-after-transform.html [ ImageOnlyFailure ]
+
 ### END OF (1) Classified failures with bug reports
 ########################################
 
diff --git a/LayoutTests/platform/mac-wk2/compositing/contents-opaque/body-background-painted-expected.txt b/LayoutTests/platform/mac-wk2/compositing/contents-opaque/body-background-painted-expected.txt
new file mode 100644 (file)
index 0000000..18c2ac3
--- /dev/null
@@ -0,0 +1,28 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (contentsOpaque 1)
+      (backgroundColor #0000FF)
+      (children 1
+        (GraphicsLayer
+          (bounds 800.00 600.00)
+          (contentsOpaque 1)
+          (drawsContent 1)
+          (children 2
+            (GraphicsLayer
+              (position 8.00 8.00)
+              (bounds 200.00 200.00)
+              (contentsOpaque 1)
+            )
+            (GraphicsLayer
+              (bounds 800.00 600.00)
+              (drawsContent 1)
+            )
+          )
+        )
+      )
+    )
+  )
+)
diff --git a/LayoutTests/platform/mac-wk2/compositing/contents-opaque/body-background-skipped-expected.txt b/LayoutTests/platform/mac-wk2/compositing/contents-opaque/body-background-skipped-expected.txt
new file mode 100644 (file)
index 0000000..b7d3795
--- /dev/null
@@ -0,0 +1,27 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (contentsOpaque 1)
+      (backgroundColor #0000FF)
+      (children 1
+        (GraphicsLayer
+          (bounds 800.00 600.00)
+          (drawsContent 1)
+          (children 2
+            (GraphicsLayer
+              (position 8.00 8.00)
+              (bounds 200.00 200.00)
+              (contentsOpaque 1)
+            )
+            (GraphicsLayer
+              (bounds 800.00 600.00)
+              (drawsContent 1)
+            )
+          )
+        )
+      )
+    )
+  )
+)
diff --git a/LayoutTests/platform/mac-wk2/compositing/repaint/fixed-background-scroll-expected.txt b/LayoutTests/platform/mac-wk2/compositing/repaint/fixed-background-scroll-expected.txt
new file mode 100644 (file)
index 0000000..09e3b00
--- /dev/null
@@ -0,0 +1,22 @@
+(repaint rects
+  (rect 0 0 785 600)
+)
+(GraphicsLayer
+  (bounds 785.00 2021.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 785.00 2021.00)
+      (contentsOpaque 1)
+      (children 1
+        (GraphicsLayer
+          (position -4.00 96.00)
+          (bounds 428.00 428.00)
+          (drawsContent 1)
+          (repaint rects
+            (rect 0.00 0.00 428.00 428.00)
+          )
+        )
+      )
+    )
+  )
+)
diff --git a/LayoutTests/platform/mac-wk2/compositing/rtl/rtl-absolute-expected.txt b/LayoutTests/platform/mac-wk2/compositing/rtl/rtl-absolute-expected.txt
new file mode 100644 (file)
index 0000000..2f80c4b
--- /dev/null
@@ -0,0 +1,17 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (contentsOpaque 1)
+      (backgroundColor #FF0000)
+      (children 1
+        (GraphicsLayer
+          (position 50.00 50.00)
+          (bounds 100.00 100.00)
+          (contentsOpaque 1)
+        )
+      )
+    )
+  )
+)
diff --git a/LayoutTests/platform/mac-wk2/compositing/rtl/rtl-absolute-overflow-expected.txt b/LayoutTests/platform/mac-wk2/compositing/rtl/rtl-absolute-overflow-expected.txt
new file mode 100644 (file)
index 0000000..ee0b5ef
--- /dev/null
@@ -0,0 +1,18 @@
+(GraphicsLayer
+  (position -215.00 0.00)
+  (bounds 1000.00 1000.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 1000.00 1000.00)
+      (contentsOpaque 1)
+      (backgroundColor #FF0000)
+      (children 1
+        (GraphicsLayer
+          (position 265.00 50.00)
+          (bounds 100.00 100.00)
+          (contentsOpaque 1)
+        )
+      )
+    )
+  )
+)
diff --git a/LayoutTests/platform/mac-wk2/compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt b/LayoutTests/platform/mac-wk2/compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt
new file mode 100644 (file)
index 0000000..b90fa23
--- /dev/null
@@ -0,0 +1,18 @@
+(GraphicsLayer
+  (position -215.00 0.00)
+  (bounds 1000.00 1000.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 1000.00 1000.00)
+      (contentsOpaque 1)
+      (backgroundColor #FF0000)
+      (children 1
+        (GraphicsLayer
+          (position 51.00 50.00)
+          (bounds 100.00 100.00)
+          (contentsOpaque 1)
+        )
+      )
+    )
+  )
+)
index c9092e3..542b1bf 100644 (file)
@@ -4,6 +4,7 @@
     (GraphicsLayer
       (bounds 800.00 600.00)
       (contentsOpaque 1)
+      (backgroundColor #FF0000)
       (children 2
         (GraphicsLayer
           (position 50.00 50.00)
index 023b9ce..90697c3 100644 (file)
@@ -5,6 +5,7 @@
     (GraphicsLayer
       (bounds 1000.00 1000.00)
       (contentsOpaque 1)
+      (backgroundColor #FF0000)
       (children 2
         (GraphicsLayer
           (position 265.00 50.00)
diff --git a/LayoutTests/platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt b/LayoutTests/platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt
new file mode 100644 (file)
index 0000000..7c474d6
--- /dev/null
@@ -0,0 +1,49 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (visible rect 0.00, 0.00 800.00 x 600.00)
+  (contentsScale 1.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (contentsOpaque 1)
+      (visible rect 0.00, 0.00 800.00 x 600.00)
+      (contentsScale 1.00)
+      (tile cache coverage 0, 0 800 x 600)
+      (tile size 512 x 512)
+      (top left tile 0, 0 tiles grid 2 x 2)
+      (children 1
+        (GraphicsLayer
+          (position 58.00 50.00)
+          (bounds 502.00 302.00)
+          (visible rect 0.00, 0.00 502.00 x 302.00)
+          (contentsScale 1.00)
+          (children 1
+            (GraphicsLayer
+              (position 1.00 1.00)
+              (bounds 500.00 300.00)
+              (childrenTransform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 -0.00] [0.00 0.00 0.00 1.00])
+              (visible rect 0.00, 0.00 500.00 x 300.00)
+              (contentsScale 1.00)
+              (children 1
+                (GraphicsLayer
+                  (position -1250.00 0.00)
+                  (anchor 0.54 0.50)
+                  (bounds 2800.00 300.00)
+                  (usingTiledLayer 1)
+                  (contentsOpaque 1)
+                  (drawsContent 1)
+                  (transform [0.17 0.00 -0.98 0.00] [0.00 1.00 0.00 0.00] [0.98 0.00 0.17 0.00] [0.00 0.00 0.00 1.00])
+                  (visible rect 0.00, 0.00 2800.00 x 300.00)
+                  (contentsScale 1.00)
+                  (tile cache coverage 0, 0 2799 x 299)
+                  (tile size 512 x 512)
+                  (top left tile 0, 0 tiles grid 5 x 1)
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
diff --git a/LayoutTests/platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt b/LayoutTests/platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt
new file mode 100644 (file)
index 0000000..390debd
--- /dev/null
@@ -0,0 +1,57 @@
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (visible rect 0.00, 0.00 800.00 x 600.00)
+  (contentsScale 1.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (contentsOpaque 1)
+      (visible rect 0.00, 0.00 800.00 x 600.00)
+      (contentsScale 1.00)
+      (tile cache coverage 0, 0 800 x 600)
+      (tile size 512 x 512)
+      (top left tile 0, 0 tiles grid 2 x 2)
+      (children 1
+        (GraphicsLayer
+          (position 58.00 50.00)
+          (bounds 502.00 302.00)
+          (visible rect 0.00, 0.00 502.00 x 302.00)
+          (contentsScale 1.00)
+          (children 1
+            (GraphicsLayer
+              (position 1.00 1.00)
+              (bounds 500.00 300.00)
+              (childrenTransform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 -0.00] [0.00 0.00 0.00 1.00])
+              (visible rect 0.00, 0.00 500.00 x 300.00)
+              (contentsScale 1.00)
+              (children 1
+                (GraphicsLayer
+                  (bounds 500.00 0.00)
+                  (preserves3D 1)
+                  (visible rect 0.00, 0.00 0.00 x 0.00)
+                  (contentsScale 1.00)
+                  (children 1
+                    (GraphicsLayer
+                      (position -1250.00 0.00)
+                      (anchor 0.54 0.50)
+                      (bounds 2800.00 300.00)
+                      (usingTiledLayer 1)
+                      (contentsOpaque 1)
+                      (drawsContent 1)
+                      (transform [0.17 0.00 -0.98 0.00] [0.00 1.00 0.00 0.00] [0.98 0.00 0.17 0.00] [0.00 0.00 0.00 1.00])
+                      (visible rect 0.00, 0.00 2800.00 x 300.00)
+                      (contentsScale 1.00)
+                      (tile cache coverage 0, 0 2799 x 299)
+                      (tile size 512 x 512)
+                      (top left tile 0, 0 tiles grid 5 x 1)
+                    )
+                  )
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
diff --git a/LayoutTests/platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt b/LayoutTests/platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt
new file mode 100644 (file)
index 0000000..76aa0f5
--- /dev/null
@@ -0,0 +1,28 @@
+(GraphicsLayer
+  (bounds 1932.00 4150.00)
+  (visible rect 0.00, 0.00 785.00 x 585.00)
+  (contentsScale 1.00)
+  (children 1
+    (GraphicsLayer
+      (anchor 0.00 0.00)
+      (bounds 1208.00 2594.00)
+      (contentsOpaque 1)
+      (transform [1.60 0.00 0.00 0.00] [0.00 1.60 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
+      (visible rect 0.00, 0.00 490.63 x 365.63)
+      (contentsScale 1.00)
+      (tile cache coverage 0, 0 640 x 640)
+      (tile size 512 x 512)
+      (top left tile 0, 0 tiles grid 2 x 2)
+      (children 1
+        (GraphicsLayer
+          (position 8.00 8.00)
+          (bounds 700.00 2500.00)
+          (contentsOpaque 1)
+          (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
+          (visible rect 0.00, 0.00 482.63 x 357.63)
+          (contentsScale 1.60)
+        )
+      )
+    )
+  )
+)
diff --git a/LayoutTests/platform/mac-wk2/compositing/tiling/tiled-layer-resize-expected.txt b/LayoutTests/platform/mac-wk2/compositing/tiling/tiled-layer-resize-expected.txt
new file mode 100644 (file)
index 0000000..adfcb5f
--- /dev/null
@@ -0,0 +1,25 @@
+Tiled layer
+(GraphicsLayer
+  (bounds 808.00 2121.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 808.00 2121.00)
+      (contentsOpaque 1)
+      (tile cache coverage 0, 0 808 x 1024)
+      (tile size 512 x 512)
+      (top left tile 0, 0 tiles grid 2 x 2)
+      (children 1
+        (GraphicsLayer
+          (position 8.00 8.00)
+          (bounds 800.00 2100.00)
+          (usingTiledLayer 1)
+          (contentsOpaque 1)
+          (drawsContent 1)
+          (tile cache coverage 0, 0 800 x 1024)
+          (tile size 512 x 512)
+          (top left tile 0, 0 tiles grid 2 x 2)
+        )
+      )
+    )
+  )
+)
diff --git a/LayoutTests/platform/mac-wk2/editing/input/caret-at-the-edge-of-contenteditable-expected.txt b/LayoutTests/platform/mac-wk2/editing/input/caret-at-the-edge-of-contenteditable-expected.txt
new file mode 100644 (file)
index 0000000..c86e370
--- /dev/null
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x72
+  RenderBlock {HTML} at (0,0) size 800x72
+    RenderBody {BODY} at (8,8) size 784x56
+      RenderBlock {DIV} at (0,0) size 784x36
+        RenderText {#text} at (0,0) size 769x36
+          text run at (0,0) width 769: "When the caret reaches the edge of the input box or content editable div, on the next input if must jump to the center of the"
+          text run at (0,18) width 48: "control."
+layer at (8,44) size 82x20 clip at (9,45) size 80x18 scrollX 42 scrollWidth 337
+  RenderBlock {DIV} at (0,36) size 82x20 [border: (1px solid #000000)]
+    RenderText {#text} at (1,1) size 336x18
+      text run at (1,1) width 336: "012345678901012345678901234567890123456789"
+layer at (8,44) size 8x18
+  RenderBlock (positioned) {SPAN} at (8,44) size 8x18
+    RenderText {#text} at (0,0) size 8x18
+      text run at (0,0) width 8: "0"
+caret: position 12 of child 0 {#text} of child 5 {DIV} of body
diff --git a/LayoutTests/platform/mac-wk2/editing/input/reveal-caret-of-multiline-contenteditable-expected.txt b/LayoutTests/platform/mac-wk2/editing/input/reveal-caret-of-multiline-contenteditable-expected.txt
new file mode 100644 (file)
index 0000000..b9863d2
--- /dev/null
@@ -0,0 +1,108 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x216
+  RenderBlock {HTML} at (0,0) size 800x216
+    RenderBody {BODY} at (8,8) size 784x200
+      RenderBlock {DIV} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 595x18
+          text run at (0,0) width 595: "When the caret is scrolled out, on starting typing it must be brought to the center of the control."
+layer at (8,26) size 784x182 clip at (9,27) size 767x165 scrollY 252 scrollHeight 558
+  RenderBlock {DIV} at (0,18) size 784x182 [border: (1px solid #000000)]
+    RenderText {#text} at (1,1) size 16x18
+      text run at (1,1) width 16: "00"
+    RenderBR {BR} at (17,1) size 0x18
+    RenderText {#text} at (1,19) size 16x18
+      text run at (1,19) width 16: "01"
+    RenderBR {BR} at (17,19) size 0x18
+    RenderText {#text} at (1,37) size 16x18
+      text run at (1,37) width 16: "02"
+    RenderBR {BR} at (17,37) size 0x18
+    RenderText {#text} at (1,55) size 16x18
+      text run at (1,55) width 16: "03"
+    RenderBR {BR} at (17,55) size 0x18
+    RenderText {#text} at (1,73) size 16x18
+      text run at (1,73) width 16: "04"
+    RenderBR {BR} at (17,73) size 0x18
+    RenderText {#text} at (1,91) size 16x18
+      text run at (1,91) width 16: "05"
+    RenderBR {BR} at (17,91) size 0x18
+    RenderText {#text} at (1,109) size 16x18
+      text run at (1,109) width 16: "06"
+    RenderBR {BR} at (17,109) size 0x18
+    RenderText {#text} at (1,127) size 16x18
+      text run at (1,127) width 16: "07"
+    RenderBR {BR} at (17,127) size 0x18
+    RenderText {#text} at (1,145) size 16x18
+      text run at (1,145) width 16: "08"
+    RenderBR {BR} at (17,145) size 0x18
+    RenderText {#text} at (1,163) size 16x18
+      text run at (1,163) width 16: "09"
+    RenderBR {BR} at (17,163) size 0x18
+    RenderText {#text} at (1,181) size 16x18
+      text run at (1,181) width 16: "10"
+    RenderBR {BR} at (17,181) size 0x18
+    RenderText {#text} at (1,199) size 16x18
+      text run at (1,199) width 16: "11"
+    RenderBR {BR} at (17,199) size 0x18
+    RenderText {#text} at (1,217) size 16x18
+      text run at (1,217) width 16: "12"
+    RenderBR {BR} at (17,217) size 0x18
+    RenderText {#text} at (1,235) size 16x18
+      text run at (1,235) width 16: "13"
+    RenderBR {BR} at (17,235) size 0x18
+    RenderText {#text} at (1,253) size 16x18
+      text run at (1,253) width 16: "14"
+    RenderBR {BR} at (17,253) size 0x18
+    RenderText {#text} at (1,271) size 16x18
+      text run at (1,271) width 16: "15"
+    RenderBR {BR} at (17,271) size 0x18
+    RenderText {#text} at (1,289) size 16x18
+      text run at (1,289) width 16: "16"
+    RenderBR {BR} at (17,289) size 0x18
+    RenderText {#text} at (1,307) size 16x18
+      text run at (1,307) width 16: "17"
+    RenderBR {BR} at (17,307) size 0x18
+    RenderText {#text} at (1,325) size 25x18
+      text run at (1,325) width 25: ">18"
+    RenderBR {BR} at (26,325) size 0x18
+    RenderText {#text} at (1,343) size 16x18
+      text run at (1,343) width 16: "19"
+    RenderBR {BR} at (17,343) size 0x18
+    RenderText {#text} at (1,361) size 16x18
+      text run at (1,361) width 16: "20"
+    RenderBR {BR} at (17,361) size 0x18
+    RenderText {#text} at (1,379) size 16x18
+      text run at (1,379) width 16: "21"
+    RenderBR {BR} at (17,379) size 0x18
+    RenderText {#text} at (1,397) size 16x18
+      text run at (1,397) width 16: "22"
+    RenderBR {BR} at (17,397) size 0x18
+    RenderText {#text} at (1,415) size 16x18
+      text run at (1,415) width 16: "23"
+    RenderBR {BR} at (17,415) size 0x18
+    RenderText {#text} at (1,433) size 16x18
+      text run at (1,433) width 16: "24"
+    RenderBR {BR} at (17,433) size 0x18
+    RenderText {#text} at (1,451) size 16x18
+      text run at (1,451) width 16: "25"
+    RenderBR {BR} at (17,451) size 0x18
+    RenderText {#text} at (1,469) size 16x18
+      text run at (1,469) width 16: "26"
+    RenderBR {BR} at (17,469) size 0x18
+    RenderText {#text} at (1,487) size 16x18
+      text run at (1,487) width 16: "27"
+    RenderBR {BR} at (17,487) size 0x18
+    RenderText {#text} at (1,505) size 16x18
+      text run at (1,505) width 16: "28"
+    RenderBR {BR} at (17,505) size 0x18
+    RenderText {#text} at (1,523) size 16x18
+      text run at (1,523) width 16: "29"
+    RenderBR {BR} at (17,523) size 0x18
+    RenderText {#text} at (1,541) size 16x18
+      text run at (1,541) width 16: "30"
+    RenderBR {BR} at (17,541) size 0x18
+layer at (8,26) size 8x18
+  RenderBlock (positioned) {SPAN} at (8,26) size 8x18
+    RenderText {#text} at (0,0) size 8x18
+      text run at (0,0) width 8: "0"
+caret: position 1 of child 36 {#text} of child 5 {DIV} of body
diff --git a/LayoutTests/platform/mac-wk2/fast/block/basic/020-expected.txt b/LayoutTests/platform/mac-wk2/fast/block/basic/020-expected.txt
new file mode 100644 (file)
index 0000000..9713e53
--- /dev/null
@@ -0,0 +1,24 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x576
+      RenderBlock {DIV} at (0,0) size 784x52
+        RenderBlock (anonymous) at (0,0) size 784x18
+          RenderText {#text} at (0,0) size 12x18
+            text run at (0,0) width 12: "A"
+          RenderText {#text} at (12,0) size 11x18
+            text run at (12,0) width 11: "C"
+        RenderBlock {P} at (0,34) size 784x0
+        RenderBlock {DIV} at (0,34) size 784x18
+          RenderBlock (anonymous) at (0,0) size 784x18
+            RenderText {#text} at (100,0) size 16x18
+              text run at (100,0) width 16: "A "
+            RenderBlock (floating) {SPAN} at (0,0) size 100x100 [bgcolor=#008000]
+            RenderText {#text} at (116,0) size 11x18
+              text run at (116,0) width 11: "B"
+          RenderBlock {P} at (0,34) size 784x0
+layer at (20,8) size 11x18
+  RenderBlock (positioned) {SPAN} at (20,8) size 11x18
+    RenderText {#text} at (0,0) size 11x18
+      text run at (0,0) width 11: "B"
diff --git a/LayoutTests/platform/mac-wk2/fast/dynamic/012-expected.txt b/LayoutTests/platform/mac-wk2/fast/dynamic/012-expected.txt
new file mode 100644 (file)
index 0000000..2944c6b
--- /dev/null
@@ -0,0 +1,108 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {H2} at (0,0) size 784x28
+        RenderText {#text} at (0,0) size 219x28
+          text run at (0,0) width 219: "Block Collapse Demo"
+      RenderBlock {P} at (0,47) size 784x18
+        RenderText {#text} at (0,0) size 687x18
+          text run at (0,0) width 304: "This table below has three hierarchical sections. "
+          text run at (304,0) width 383: "Collapsing a section should cause those below it to move up."
+      RenderBlock {P} at (0,81) size 784x18
+        RenderText {#text} at (0,0) size 765x18
+          text run at (0,0) width 765: "This works on the latest Windows IE and Mozilla Firefox (Win and Mac) but not on Safari 1.2.3 (v125.9) {or 2.0 (146)}."
+      RenderBlock {P} at (0,115) size 784x18
+        RenderText {#text} at (0,0) size 747x18
+          text run at (0,0) width 579: "Note that the second section is collapsed when the page opens and expanding it works fine. "
+          text run at (579,0) width 168: "Just the collapse is broken."
+      RenderBlock {DIV} at (0,149) size 784x148
+        RenderBlock {HR} at (0,0) size 784x2 [border: (1px inset #000000)]
+        RenderBlock {DIV} at (0,10) size 784x20
+          RenderImage {IMG} at (0,0) size 16x16
+          RenderText {#text} at (16,2) size 75x18
+            text run at (16,2) width 75: " Block One"
+        RenderBlock {DIV} at (0,30) size 784x20
+          RenderImage {IMG} at (0,0) size 16x16
+          RenderText {#text} at (16,2) size 78x18
+            text run at (16,2) width 78: " Block Two"
+        RenderBlock {DIV} at (0,50) size 784x20
+          RenderImage {IMG} at (0,0) size 16x16
+          RenderText {#text} at (16,2) size 88x18
+            text run at (16,2) width 88: " Block Three"
+        RenderBlock {DIV} at (0,70) size 784x68
+          RenderTable {TABLE} at (0,0) size 784x68
+            RenderTableSection {TBODY} at (0,0) size 784x68
+              RenderTableRow {TR} at (0,2) size 784x20
+                RenderTableCell {TD} at (2,2) size 32x20 [r=0 c=0 rs=1 cs=1]
+                  RenderText {#text} at (1,1) size 4x18
+                    text run at (1,1) width 4: " "
+                RenderTableCell {TD} at (36,2) size 746x20 [r=0 c=1 rs=1 cs=1]
+                  RenderText {#text} at (1,1) size 65x18
+                    text run at (1,1) width 65: "This is the"
+              RenderTableRow {TR} at (0,24) size 784x20
+                RenderTableCell {TD} at (2,24) size 32x20 [r=1 c=0 rs=1 cs=1]
+                  RenderText {#text} at (1,1) size 4x18
+                    text run at (1,1) width 4: " "
+                RenderTableCell {TD} at (36,24) size 746x20 [r=1 c=1 rs=1 cs=1]
+                  RenderText {#text} at (1,1) size 69x18
+                    text run at (1,1) width 69: "contents of"
+              RenderTableRow {TR} at (0,46) size 784x20
+                RenderTableCell {TD} at (2,46) size 32x20 [r=2 c=0 rs=1 cs=1]
+                  RenderText {#text} at (1,1) size 4x18
+                    text run at (1,1) width 4: " "
+                RenderTableCell {TD} at (36,46) size 746x20 [r=2 c=1 rs=1 cs=1]
+                  RenderText {#text} at (1,1) size 74x18
+                    text run at (1,1) width 74: "block three."
+        RenderBlock {HR} at (0,146) size 784x2 [border: (1px inset #000000)]
+layer at (8,187) size 109x68
+  RenderBlock (positioned) {DIV} at (8,187) size 109x68
+    RenderTable {TABLE} at (0,0) size 109x68
+      RenderTableSection {TBODY} at (0,0) size 109x68
+        RenderTableRow {TR} at (0,2) size 109x20
+          RenderTableCell {TD} at (2,2) size 32x20 [r=0 c=0 rs=1 cs=1]
+            RenderText {#text} at (1,1) size 4x18
+              text run at (1,1) width 4: " "
+          RenderTableCell {TD} at (36,2) size 71x20 [r=0 c=1 rs=1 cs=1]
+            RenderText {#text} at (1,1) size 65x18
+              text run at (1,1) width 65: "This is the"
+        RenderTableRow {TR} at (0,24) size 109x20
+          RenderTableCell {TD} at (2,24) size 32x20 [r=1 c=0 rs=1 cs=1]
+            RenderText {#text} at (1,1) size 4x18
+              text run at (1,1) width 4: " "
+          RenderTableCell {TD} at (36,24) size 71x20 [r=1 c=1 rs=1 cs=1]
+            RenderText {#text} at (1,1) size 69x18
+              text run at (1,1) width 69: "contents of"
+        RenderTableRow {TR} at (0,46) size 109x20
+          RenderTableCell {TD} at (2,46) size 32x20 [r=2 c=0 rs=1 cs=1]
+            RenderText {#text} at (1,1) size 4x18
+              text run at (1,1) width 4: " "
+          RenderTableCell {TD} at (36,46) size 71x20 [r=2 c=1 rs=1 cs=1]
+            RenderText {#text} at (1,1) size 66x18
+              text run at (1,1) width 66: "block one."
+layer at (8,207) size 109x68
+  RenderBlock (positioned) {DIV} at (8,207) size 109x68
+    RenderTable {TABLE} at (0,0) size 109x68
+      RenderTableSection {TBODY} at (0,0) size 109x68
+        RenderTableRow {TR} at (0,2) size 109x20
+          RenderTableCell {TD} at (2,2) size 32x20 [r=0 c=0 rs=1 cs=1]
+            RenderText {#text} at (1,1) size 4x18
+              text run at (1,1) width 4: " "
+          RenderTableCell {TD} at (36,2) size 71x20 [r=0 c=1 rs=1 cs=1]
+            RenderText {#text} at (1,1) size 65x18
+              text run at (1,1) width 65: "This is the"
+        RenderTableRow {TR} at (0,24) size 109x20
+          RenderTableCell {TD} at (2,24) size 32x20 [r=1 c=0 rs=1 cs=1]
+            RenderText {#text} at (1,1) size 4x18
+              text run at (1,1) width 4: " "
+          RenderTableCell {TD} at (36,24) size 71x20 [r=1 c=1 rs=1 cs=1]
+            RenderText {#text} at (1,1) size 69x18
+              text run at (1,1) width 69: "contents of"
+        RenderTableRow {TR} at (0,46) size 109x20
+          RenderTableCell {TD} at (2,46) size 32x20 [r=2 c=0 rs=1 cs=1]
+            RenderText {#text} at (1,1) size 4x18
+              text run at (1,1) width 4: " "
+          RenderTableCell {TD} at (36,46) size 71x20 [r=2 c=1 rs=1 cs=1]
+            RenderText {#text} at (1,1) size 67x18
+              text run at (1,1) width 67: "block two."
diff --git a/LayoutTests/platform/mac-wk2/fast/dynamic/layer-hit-test-crash-expected.txt b/LayoutTests/platform/mac-wk2/fast/dynamic/layer-hit-test-crash-expected.txt
new file mode 100644 (file)
index 0000000..f293e3b
--- /dev/null
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {DIV} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 746x18
+          text run at (0,0) width 746: "Mousing over the yellow square below should not cause an assertion failure or crash. This tests for regressions against "
+        RenderInline {A} at (0,0) size 32x18 [color=#0000EE]
+          RenderText {#text} at (746,0) size 32x18
+            text run at (746,0) width 32: "6931"
+        RenderText {#text} at (778,0) size 4x18
+          text run at (778,0) width 4: "."
+layer at (50,50) size 200x200
+  RenderBlock (positioned) zI: 1 {DIV} at (50,50) size 200x200 [bgcolor=#FFFF00]
+layer at (70,50) size 100x100
+  RenderBlock (positioned) zI: 5 {DIV} at (20,0) size 100x100 [bgcolor=#FF0000]
+caret: position 1 of child 2 {#text} of child 1 {DIV} of body
diff --git a/LayoutTests/platform/mac-wk2/fast/layers/layer-visibility-expected.txt b/LayoutTests/platform/mac-wk2/fast/layers/layer-visibility-expected.txt
new file mode 100644 (file)
index 0000000..d428dcd
--- /dev/null
@@ -0,0 +1,326 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock (floating) {DIV} at (0,0) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (134,0) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (268,0) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (402,0) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (536,0) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (0,104) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (134,104) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (268,104) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (402,104) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (536,104) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (0,208) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (134,208) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (268,208) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (402,208) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (536,208) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (0,312) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (134,312) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (268,312) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (402,312) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (536,312) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (0,416) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (134,416) size 134x104 [border: (2px solid #0000FF)]
+      RenderBlock (floating) {DIV} at (268,416) size 134x104 [border: (2px solid #0000FF)]
+layer at (10,10) size 130x44
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x44
+    RenderBlock (anonymous) at (0,0) size 130x18
+      RenderText {#text} at (0,0) size 79x18
+        text run at (0,0) width 79: "1 green box:"
+    RenderBlock {DIV} at (0,18) size 130x26 [border: (2px solid #008000)]
+      RenderBlock {DIV} at (2,2) size 126x22 [border: (2px solid #FF0000)]
+        RenderText {#text} at (2,2) size 35x18
+          text run at (2,2) width 35: "failed"
+layer at (144,10) size 130x62
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x62
+    RenderBlock (anonymous) at (0,0) size 130x36
+      RenderText {#text} at (0,0) size 107x36
+        text run at (0,0) width 12: "2 "
+        text run at (12,0) width 95: "green box with"
+        text run at (0,18) width 57: "word ok:"
+    RenderBlock {DIV} at (0,36) size 130x26 [border: (2px solid #FF0000)]
+      RenderBlock {DIV} at (2,2) size 126x22 [border: (2px solid #008000)]
+        RenderText {#text} at (2,2) size 16x18
+          text run at (2,2) width 16: "ok"
+layer at (278,10) size 130x36
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x36
+    RenderText {#text} at (0,0) size 107x36
+      text run at (0,0) width 107: "3 green box with"
+      text run at (0,18) width 57: "word ok:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (278,46) size 130x34
+  RenderBlock (positioned) {DIV} at (0,36) size 130x34 [border: (2px solid #FF0000)]
+    RenderBlock {DIV} at (2,2) size 126x22 [border: (2px solid #008000)]
+      RenderText {#text} at (2,2) size 16x18
+        text run at (2,2) width 16: "ok"
+layer at (412,10) size 130x36
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x36
+    RenderText {#text} at (0,0) size 107x36
+      text run at (0,0) width 107: "4 green box with"
+      text run at (0,18) width 57: "word ok:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (412,46) size 130x34
+  RenderBlock (positioned) {DIV} at (0,36) size 130x34 [border: (2px solid #FF0000)]
+layer at (414,48) size 126x30
+  RenderBlock (positioned) {DIV} at (2,2) size 126x30 [border: (2px solid #008000)]
+    RenderText {#text} at (2,2) size 16x18
+      text run at (2,2) width 16: "ok"
+layer at (546,10) size 130x36
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x36
+    RenderText {#text} at (0,0) size 107x36
+      text run at (0,0) width 107: "5 green box with"
+      text run at (0,18) width 57: "word ok:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (546,46) size 130x34
+  RenderBlock (positioned) {DIV} at (0,36) size 130x34 [border: (2px solid #FF0000)]
+    RenderBlock {DIV} at (2,2) size 126x26 [border: (2px solid #FF0000)]
+      RenderBlock {DIV} at (2,2) size 122x22 [border: (2px solid #008000)]
+        RenderText {#text} at (2,2) size 16x18
+          text run at (2,2) width 16: "ok"
+layer at (10,114) size 130x36
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x36
+    RenderText {#text} at (0,0) size 107x36
+      text run at (0,0) width 107: "6 green box with"
+      text run at (0,18) width 57: "word ok:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (10,150) size 130x34
+  RenderBlock (positioned) {DIV} at (0,36) size 130x34 [border: (2px solid #FF0000)]
+layer at (12,152) size 126x30
+  RenderBlock (positioned) {DIV} at (2,2) size 126x30 [border: (2px solid #FF0000)]
+    RenderBlock {DIV} at (2,2) size 122x22 [border: (2px solid #008000)]
+      RenderText {#text} at (2,2) size 16x18
+        text run at (2,2) width 16: "ok"
+layer at (144,114) size 130x36
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x36
+    RenderText {#text} at (0,0) size 107x36
+      text run at (0,0) width 107: "7 green box with"
+      text run at (0,18) width 57: "word ok:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (144,150) size 130x34
+  RenderBlock (positioned) {DIV} at (0,36) size 130x34 [border: (2px solid #FF0000)]
+layer at (146,152) size 126x30
+  RenderBlock (positioned) {DIV} at (2,2) size 126x30 [border: (2px solid #FF0000)]
+layer at (148,154) size 122x26
+  RenderBlock (positioned) {DIV} at (2,2) size 122x26 [border: (2px solid #008000)]
+    RenderText {#text} at (2,2) size 16x18
+      text run at (2,2) width 16: "ok"
+layer at (278,114) size 130x36
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x36
+    RenderText {#text} at (0,0) size 122x36
+      text run at (0,0) width 122: "8 double green box"
+      text run at (0,18) width 89: "with word ok:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (278,150) size 130x34
+  RenderBlock (positioned) {DIV} at (0,36) size 130x34 [border: (2px solid #008000)]
+layer at (280,152) size 126x30
+  RenderBlock (positioned) {DIV} at (2,2) size 126x30 [border: (2px solid #FF0000)]
+layer at (282,154) size 122x26
+  RenderBlock (positioned) {DIV} at (2,2) size 122x26 [border: (2px solid #008000)]
+    RenderText {#text} at (2,2) size 16x18
+      text run at (2,2) width 16: "ok"
+layer at (412,114) size 130x36
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x36
+    RenderText {#text} at (0,0) size 107x36
+      text run at (0,0) width 107: "9 green box with"
+      text run at (0,18) width 57: "word ok:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (412,150) size 130x34
+  RenderBlock (positioned) {DIV} at (0,36) size 130x34 [border: (2px solid #FF0000)]
+layer at (414,152) size 126x30
+  RenderBlock (positioned) {DIV} at (2,2) size 126x30 [border: (2px solid #FF0000)]
+layer at (416,154) size 122x26
+  RenderBlock (positioned) {DIV} at (2,2) size 122x26 [border: (2px solid #008000)]
+    RenderText {#text} at (2,2) size 16x18
+      text run at (2,2) width 16: "ok"
+layer at (546,114) size 130x18
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x18
+    RenderText {#text} at (0,0) size 87x18
+      text run at (0,0) width 87: "10 green box:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (546,132) size 130x34
+  RenderBlock (positioned) {DIV} at (0,18) size 130x34 [border: (2px solid #FF0000)]
+layer at (548,134) size 126x30
+  RenderBlock (positioned) {DIV} at (2,2) size 126x30 [border: (2px solid #008000)]
+layer at (550,136) size 122x26
+  RenderBlock (positioned) {DIV} at (2,2) size 122x26 [border: (2px solid #FF0000)]
+    RenderText {#text} at (2,2) size 35x18
+      text run at (2,2) width 35: "failed"
+layer at (10,218) size 130x36
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x36
+    RenderText {#text} at (0,0) size 115x36
+      text run at (0,0) width 115: "11 green box with"
+      text run at (0,18) width 57: "word ok:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (10,254) size 130x34
+  RenderBlock (positioned) {DIV} at (0,36) size 130x34 [border: (2px solid #FF0000)]
+    RenderBlock {DIV} at (2,2) size 126x26 [border: (2px solid #FF0000)]
+      RenderBlock {DIV} at (2,2) size 122x22 [border: (2px solid #008000)]
+        RenderText {#text} at (2,2) size 16x18
+          text run at (2,2) width 16: "ok"
+layer at (144,218) size 130x36
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x36
+    RenderText {#text} at (0,0) size 115x36
+      text run at (0,0) width 115: "12 green box with"
+      text run at (0,18) width 57: "word ok:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (144,254) size 130x34
+  RenderBlock (positioned) {DIV} at (0,36) size 130x34 [border: (2px solid #FF0000)]
+    RenderBlock {DIV} at (2,2) size 126x26 [border: (2px solid #FF0000)]
+      RenderBlock {DIV} at (2,2) size 122x22 [border: (2px solid #008000)]
+        RenderText {#text} at (2,2) size 16x18
+          text run at (2,2) width 16: "ok"
+layer at (278,218) size 130x18
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x18
+    RenderText {#text} at (0,0) size 87x18
+      text run at (0,0) width 87: "13 green box:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (278,236) size 130x34
+  RenderBlock (positioned) {DIV} at (0,18) size 130x34 [border: (2px solid #FF0000)]
+    RenderBlock {DIV} at (2,2) size 126x26 [border: (2px solid #008000)]
+      RenderBlock {DIV} at (2,2) size 122x22 [border: (2px solid #FF0000)]
+        RenderText {#text} at (2,2) size 35x18
+          text run at (2,2) width 35: "failed"
+layer at (412,218) size 130x36
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x36
+    RenderText {#text} at (0,0) size 115x36
+      text run at (0,0) width 115: "14 green box with"
+      text run at (0,18) width 57: "word ok:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (412,254) size 130x30
+  RenderBlock (positioned) {DIV} at (0,36) size 130x30
+    RenderBlock {DIV} at (0,0) size 130x22 [border: (2px solid #008000)]
+      RenderText {#text} at (2,2) size 16x18
+        text run at (2,2) width 16: "ok"
+layer at (546,218) size 130x36
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x36
+    RenderText {#text} at (0,0) size 115x36
+      text run at (0,0) width 115: "15 green box with"
+      text run at (0,18) width 57: "word ok:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (546,254) size 130x30
+  RenderBlock (positioned) {DIV} at (0,36) size 130x30
+layer at (546,254) size 130x30
+  RenderBlock (positioned) {DIV} at (0,0) size 130x30 [border: (2px solid #008000)]
+    RenderText {#text} at (2,2) size 16x18
+      text run at (2,2) width 16: "ok"
+layer at (10,322) size 130x36
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x36
+    RenderText {#text} at (0,0) size 115x36
+      text run at (0,0) width 115: "16 green box with"
+      text run at (0,18) width 57: "word ok:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (10,358) size 130x34
+  RenderBlock (positioned) {DIV} at (0,36) size 130x34 [border: (2px solid #FF0000)]
+    RenderBlock {DIV} at (2,2) size 126x48 [border: (2px solid #FF0000)]
+      RenderBlock {DIV} at (2,2) size 122x22 [border: (2px solid #FF0000)]
+        RenderText {#text} at (2,2) size 20x18
+          text run at (2,2) width 20: "fail"
+      RenderBlock {DIV} at (2,24) size 122x22 [border: (2px solid #008000)]
+        RenderText {#text} at (2,2) size 16x18
+          text run at (2,2) width 16: "ok"
+layer at (144,322) size 130x36
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x36
+    RenderText {#text} at (0,0) size 115x36
+      text run at (0,0) width 115: "17 green box with"
+      text run at (0,18) width 57: "word ok:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (144,358) size 130x34
+  RenderBlock (positioned) {DIV} at (0,36) size 130x34 [border: (2px solid #FF0000)]
+    RenderBlock {DIV} at (2,2) size 126x48 [border: (2px solid #FF0000)]
+      RenderBlock {DIV} at (2,2) size 122x22 [border: (2px solid #008000)]
+        RenderText {#text} at (2,2) size 16x18
+          text run at (2,2) width 16: "ok"
+      RenderBlock {DIV} at (2,24) size 122x22 [border: (2px solid #FF0000)]
+        RenderText {#text} at (2,2) size 20x18
+          text run at (2,2) width 20: "fail"
+layer at (278,322) size 130x36
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x36
+    RenderText {#text} at (0,0) size 115x36
+      text run at (0,0) width 115: "18 green box with"
+      text run at (0,18) width 57: "word ok:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (278,358) size 130x34
+  RenderBlock (positioned) {DIV} at (0,36) size 130x34 [border: (2px solid #FF0000)]
+    RenderBlock {DIV} at (2,2) size 126x48 [border: (2px solid #FF0000)]
+      RenderBlock {DIV} at (2,2) size 122x22 [border: (2px solid #FF0000)]
+        RenderText {#text} at (2,2) size 20x18
+          text run at (2,2) width 20: "fail"
+      RenderBlock {DIV} at (2,24) size 122x22 [border: (2px solid #008000)]
+        RenderText {#text} at (2,2) size 16x18
+          text run at (2,2) width 16: "ok"
+layer at (412,322) size 130x36
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x36
+    RenderText {#text} at (0,0) size 115x36
+      text run at (0,0) width 115: "19 green box with"
+      text run at (0,18) width 57: "word ok:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (412,358) size 130x34
+  RenderBlock (positioned) {DIV} at (0,36) size 130x34 [border: (2px solid #FF0000)]
+    RenderBlock {DIV} at (2,2) size 126x26 [border: (2px solid #FF0000)]
+      RenderBlock {DIV} at (2,2) size 122x22 [border: (2px solid #FF0000)]
+        RenderText {#text} at (2,2) size 20x18
+          text run at (2,2) width 20: "fail"
+    RenderBlock {DIV} at (2,28) size 126x26 [border: (2px solid #FF0000)]
+      RenderBlock {DIV} at (2,2) size 122x22 [border: (2px solid #008000)]
+        RenderText {#text} at (2,2) size 16x18
+          text run at (2,2) width 16: "ok"
+layer at (546,322) size 130x18
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x18
+    RenderText {#text} at (0,0) size 87x18
+      text run at (0,0) width 87: "20 green box:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (546,340) size 130x34
+  RenderBlock (positioned) {DIV} at (0,18) size 130x34 [border: (2px solid #FF0000)]
+    RenderBlock {DIV} at (2,2) size 126x48 [border: (2px solid #008000)]
+      RenderBlock {DIV} at (2,2) size 122x22 [border: (2px solid #FF0000)]
+        RenderText {#text} at (2,2) size 16x18
+          text run at (2,2) width 16: "ok"
+      RenderBlock {DIV} at (2,24) size 122x22 [border: (2px solid #008000)]
+        RenderText {#text} at (2,2) size 16x18
+          text run at (2,2) width 16: "ok"
+layer at (10,426) size 130x36
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x36
+    RenderText {#text} at (0,0) size 124x36
+      text run at (0,0) width 124: "21 two green boxes"
+      text run at (0,18) width 89: "with word ok:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (10,462) size 130x34
+  RenderBlock (positioned) {DIV} at (0,36) size 130x34 [border: (2px solid #FF0000)]
+    RenderBlock {DIV} at (2,2) size 126x26 [border: (2px solid #FF0000)]
+      RenderBlock {DIV} at (2,2) size 122x22 [border: (2px solid #008000)]
+        RenderText {#text} at (2,2) size 16x18
+          text run at (2,2) width 16: "ok"
+    RenderBlock {DIV} at (2,28) size 126x26 [border: (2px solid #FF0000)]
+      RenderBlock {DIV} at (2,2) size 122x22 [border: (2px solid #008000)]
+        RenderText {#text} at (2,2) size 16x18
+          text run at (2,2) width 16: "ok"
+layer at (144,426) size 130x36
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x36
+    RenderText {#text} at (0,0) size 115x36
+      text run at (0,0) width 115: "22 green box with"
+      text run at (0,18) width 57: "word ok:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (144,462) size 130x34
+  RenderBlock (positioned) {DIV} at (0,36) size 130x34 [border: (2px solid #FF0000)]
+layer at (146,464) size 126x30
+  RenderBlock (positioned) {DIV} at (2,2) size 126x30 [border: (2px solid #008000)]
+    RenderText {#text} at (2,2) size 16x18
+      text run at (2,2) width 16: "ok"
+layer at (278,426) size 130x36
+  RenderBlock (relative positioned) {DIV} at (2,2) size 130x36
+    RenderText {#text} at (0,0) size 115x36
+      text run at (0,0) width 115: "23 green box with"
+      text run at (0,18) width 57: "word ok:"
+    RenderText {#text} at (0,0) size 0x0
+layer at (278,462) size 130x34
+  RenderBlock (positioned) zI: 1 {DIV} at (0,36) size 130x34 [border: (2px solid #FF0000)]
+layer at (280,464) size 126x30
+  RenderBlock (positioned) {DIV} at (2,2) size 126x30 [border: (2px solid #FF0000)]
+layer at (282,466) size 122x26
+  RenderBlock (positioned) {DIV} at (2,2) size 122x26 [border: (2px solid #008000)]
+    RenderText {#text} at (2,2) size 16x18
+      text run at (2,2) width 16: "ok"
diff --git a/LayoutTests/platform/mac-wk2/fast/layers/layer-visibility-sublayer-expected.txt b/LayoutTests/platform/mac-wk2/fast/layers/layer-visibility-sublayer-expected.txt
new file mode 100644 (file)
index 0000000..c91dad6
--- /dev/null
@@ -0,0 +1,81 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBR {BR} at (0,0) size 0x18
+      RenderBR {BR} at (0,18) size 0x18
+      RenderBR {BR} at (0,36) size 0x18
+      RenderBR {BR} at (0,54) size 0x18
+      RenderText {#text} at (0,72) size 180x18
+        text run at (0,72) width 180: "24 green box with word ok: "
+      RenderText {#text} at (0,0) size 0x0
+      RenderBR {BR} at (0,0) size 0x0
+      RenderBR {BR} at (0,90) size 0x18
+      RenderBR {BR} at (0,108) size 0x18
+      RenderBR {BR} at (0,126) size 0x18
+      RenderText {#text} at (0,144) size 180x18
+        text run at (0,144) width 180: "25 green box with word ok: "
+      RenderText {#text} at (0,0) size 0x0
+      RenderBR {BR} at (0,0) size 0x0
+      RenderBR {BR} at (0,162) size 0x18
+      RenderBR {BR} at (0,180) size 0x18
+      RenderBR {BR} at (0,198) size 0x18
+      RenderText {#text} at (0,216) size 180x18
+        text run at (0,216) width 180: "26 green box with word ok: "
+      RenderText {#text} at (0,0) size 0x0
+      RenderBR {BR} at (0,0) size 0x0
+      RenderBR {BR} at (0,234) size 0x18
+      RenderBR {BR} at (0,252) size 0x18
+      RenderBR {BR} at (0,270) size 0x18
+layer at (0,98) size 800x34
+  RenderBlock (positioned) {DIV} at (0,98) size 800x34 [border: (2px solid #FF0000)]
+    RenderBlock {DIV} at (2,2) size 796x4 [border: (2px solid #FF0000)]
+    RenderBlock {DIV} at (2,6) size 796x22 [border: (2px solid #008000)]
+      RenderText {#text} at (2,2) size 16x18
+        text run at (2,2) width 16: "ok"
+layer at (2,100) size 796x30
+  RenderBlock (positioned) {DIV} at (2,2) size 796x30 [border: (2px solid #FF0000)]
+    RenderInline {SPAN} at (0,0) size 27x18
+      RenderText {#text} at (2,2) size 27x18
+        text run at (2,2) width 27: "blah"
+    RenderText {#text} at (0,0) size 0x0
+layer at (2,100) size 796x30
+  RenderBlock (positioned) {DIV} at (2,2) size 796x30 [border: (2px solid #FF0000)]
+layer at (0,170) size 800x34
+  RenderBlock (positioned) {DIV} at (0,170) size 800x34 [border: (2px solid #FF0000)]
+    RenderBlock {DIV} at (2,2) size 796x4 [border: (2px solid #FF0000)]
+    RenderBlock {DIV} at (2,6) size 796x4 [border: (2px solid #FF0000)]
+    RenderBlock {DIV} at (2,10) size 796x22 [border: (2px solid #008000)]
+      RenderText {#text} at (2,2) size 16x18
+        text run at (2,2) width 16: "ok"
+layer at (2,172) size 796x30
+  RenderBlock (positioned) {DIV} at (2,2) size 796x30 [border: (2px solid #FF0000)]
+layer at (2,172) size 796x30
+  RenderBlock (positioned) {DIV} at (2,2) size 796x30 [border: (2px solid #FF0000)]
+    RenderInline {SPAN} at (0,0) size 27x18
+      RenderText {#text} at (2,2) size 27x18
+        text run at (2,2) width 27: "blah"
+    RenderText {#text} at (0,0) size 0x0
+layer at (0,242) size 800x34
+  RenderBlock (positioned) {DIV} at (0,242) size 800x34 [border: (2px solid #FF0000)]
+    RenderBlock {DIV} at (2,2) size 796x22 [border: (2px solid #FF0000)]
+      RenderBlock {DIV} at (2,2) size 792x18
+        RenderText {#text} at (0,0) size 27x18
+          text run at (0,0) width 27: "blah"
+    RenderBlock {DIV} at (2,24) size 796x4 [border: (2px solid #FF0000)]
+    RenderBlock {DIV} at (2,28) size 796x22 [border: (2px solid #008000)]
+      RenderText {#text} at (2,2) size 16x18
+        text run at (2,2) width 16: "ok"
+layer at (2,244) size 796x30
+  RenderBlock (positioned) {DIV} at (2,2) size 796x30 [border: (2px solid #FF0000)]
+    RenderInline {SPAN} at (0,0) size 27x18
+      RenderText {#text} at (2,2) size 27x18
+        text run at (2,2) width 27: "blah"
+    RenderText {#text} at (0,0) size 0x0
+layer at (2,244) size 796x30
+  RenderBlock (positioned) {DIV} at (2,2) size 796x30 [border: (2px solid #FF0000)]
+    RenderInline {SPAN} at (0,0) size 27x18
+      RenderText {#text} at (2,2) size 27x18
+        text run at (2,2) width 27: "blah"
+    RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac-wk2/fast/repaint/invisible-objects-expected.txt b/LayoutTests/platform/mac-wk2/fast/repaint/invisible-objects-expected.txt
new file mode 100644 (file)
index 0000000..6a23ccc
--- /dev/null
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+layer at (8,8) size 784x18
+  RenderBlock (relative positioned) {DIV} at (0,0) size 784x18
+    RenderInline {SPAN} at (0,0) size 67x18
+      RenderText {#text} at (0,0) size 67x18
+        text run at (0,0) width 67: "is invisible"
+    RenderText {#text} at (0,0) size 0x0
+layer at (8,26) size 784x100
+  RenderBlock (relative positioned) {DIV} at (0,18) size 784x100
+    RenderBlock {DIV} at (0,0) size 784x100
diff --git a/LayoutTests/platform/mac-wk2/fast/repaint/layer-hide-when-needs-layout-expected.txt b/LayoutTests/platform/mac-wk2/fast/repaint/layer-hide-when-needs-layout-expected.txt
new file mode 100644 (file)
index 0000000..dce124a
--- /dev/null
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+layer at (8,8) size 784x100
+  RenderBlock (relative positioned) {DIV} at (0,0) size 784x100
+    RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#008000]
+layer at (8,8) size 50x100
+  RenderBlock (positioned) {DIV} at (0,0) size 50x100 [bgcolor=#FF0000]
diff --git a/LayoutTests/platform/mac-wk2/fast/text/whitespace/028-expected.txt b/LayoutTests/platform/mac-wk2/fast/text/whitespace/028-expected.txt
new file mode 100644 (file)
index 0000000..a30a08a
--- /dev/null
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderText {#text} at (0,0) size 16x18
+        text run at (0,0) width 16: "A "
+      RenderText {#text} at (16,0) size 11x18
+        text run at (16,0) width 11: "C"
+layer at (24,8) size 11x18
+  RenderBlock (positioned) {SPAN} at (24,8) size 11x18
+    RenderText {#text} at (0,0) size 11x18
+      text run at (0,0) width 11: "B"
diff --git a/LayoutTests/platform/mac-wk2/tiled-drawing/window-server-snapshots-work-expected-mismatch.html b/LayoutTests/platform/mac-wk2/tiled-drawing/window-server-snapshots-work-expected-mismatch.html
new file mode 100644 (file)
index 0000000..90531a4
--- /dev/null
@@ -0,0 +1,2 @@
+<html>
+</html>
diff --git a/LayoutTests/platform/mac-wk2/tiled-drawing/window-server-snapshots-work.html b/LayoutTests/platform/mac-wk2/tiled-drawing/window-server-snapshots-work.html
new file mode 100644 (file)
index 0000000..f4039c5
--- /dev/null
@@ -0,0 +1,5 @@
+<html>
+<body style="background-color: black; color: white;">
+If this test passes (if WebKitTestRunner's snapshots are working correctly with tiled drawing), it will not match the pure-white mismatch expectation.
+</body>
+</html>
index d95fc8e..62d8a82 100644 (file)
@@ -1,3 +1,31 @@
+2013-10-02  Tim Horton  <timothy_horton@apple.com>
+
+        [mac] Stop using DrawingAreaImpl on PLATFORM(MAC) 
+        https://bugs.webkit.org/show_bug.cgi?id=121859
+        <rdar://problem/15069359>
+
+        Reviewed by Anders Carlsson.
+
+        Test: platform/mac-wk2/tiled-drawing/window-server-snapshots-work.html
+
+        * 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.
+
 2013-10-02  Benjamin Poulain  <benjamin@webkit.org>
 
         Clean up more <style scoped> from style resolution
index 7d60d03..01ad69e 100644 (file)
@@ -2078,17 +2078,23 @@ HostWindow* FrameView::hostWindow() const
     return 0;
 }
 
+void FrameView::addTrackedRepaintRect(const IntRect& r)
+{
+    if (!m_isTrackingRepaints || r.isEmpty())
+        return;
+
+    IntRect repaintRect = r;
+    repaintRect.move(-scrollOffset());
+    m_trackedRepaintRects.append(repaintRect);
+}
+
 const unsigned cRepaintRectUnionThreshold = 25;
 
 void FrameView::repaintContentRectangle(const IntRect& r, bool immediate)
 {
     ASSERT(!frame().ownerElement());
 
-    if (m_isTrackingRepaints) {
-        IntRect repaintRect = r;
-        repaintRect.move(-scrollOffset());
-        m_trackedRepaintRects.append(repaintRect);
-    }
+    addTrackedRepaintRect(r);
 
     double delay = m_deferringRepaints ? 0 : adjustedDeferredRepaintDelay();
     if ((m_deferringRepaints || m_deferredRepaintTimer.isActive() || delay) && !immediate) {
index 7c31824..bd2bc19 100644 (file)
@@ -435,6 +435,8 @@ public:
     void didAddWidgetToRenderTree(Widget&);
     void willRemoveWidgetFromRenderTree(Widget&);
 
+    void addTrackedRepaintRect(const IntRect&);
+
 protected:
     virtual bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect) OVERRIDE;
     virtual void scrollContentsSlowPath(const IntRect& updateRect) OVERRIDE;
index 3141f81..5b22698 100644 (file)
@@ -696,7 +696,7 @@ void GraphicsLayer::dumpProperties(TextStream& ts, int indent, LayerTreeAsTextBe
         ts << ")\n";
     }
 
-    if (behavior & LayerTreeAsTextIncludeRepaintRects && repaintRectMap().contains(this) && !repaintRectMap().get(this).isEmpty()) {
+    if (behavior & LayerTreeAsTextIncludeRepaintRects && repaintRectMap().contains(this) && !repaintRectMap().get(this).isEmpty() && m_client->shouldDumpPropertyForLayer(this, "repaintRects")) {
         writeIndent(ts, indent + 1);
         ts << "(repaint rects\n";
         for (size_t i = 0; i < repaintRectMap().get(this).size(); ++i) {
index 28a8953..d7143a5 100644 (file)
@@ -1904,6 +1904,10 @@ void RenderLayerBacking::setBlendMode(BlendMode)
 void RenderLayerBacking::setContentsNeedDisplay()
 {
     ASSERT(!paintsIntoCompositedAncestor());
+
+    FrameView& frameView = owningLayer()->renderer().view().frameView();
+    if (m_isMainFrameRenderViewLayer && frameView.isTrackingRepaints())
+        frameView.addTrackedRepaintRect(owningLayer()->absoluteBoundingBox());
     
     if (m_graphicsLayer && m_graphicsLayer->drawsContent())
         m_graphicsLayer->setNeedsDisplay();
@@ -1926,6 +1930,10 @@ void RenderLayerBacking::setContentsNeedDisplayInRect(const IntRect& r)
 {
     ASSERT(!paintsIntoCompositedAncestor());
 
+    FrameView& frameView = owningLayer()->renderer().view().frameView();
+    if (m_isMainFrameRenderViewLayer && frameView.isTrackingRepaints())
+        frameView.addTrackedRepaintRect(pixelSnappedIntRect(r));
+
     if (m_graphicsLayer && m_graphicsLayer->drawsContent()) {
         IntRect layerDirtyRect = r;
         layerDirtyRect.move(-m_graphicsLayer->offsetFromRenderer());
@@ -2106,6 +2114,11 @@ bool RenderLayerBacking::shouldDumpPropertyForLayer(const GraphicsLayer* layer,
         // Background color could be of interest to tests or other dumpers if it's non-white.
         if (!strcmp(propertyName, "backgroundColor") && layer->backgroundColor() == Color::white)
             return false;
+
+        // The root tile cache's repaints will show up at the top with FrameView's,
+        // so don't dump them twice.
+        if (!strcmp(propertyName, "repaintRects"))
+            return false;
     }
 
     return true;
index 231f388..ba1f6f1 100644 (file)
@@ -1,3 +1,55 @@
+2013-10-02  Tim Horton  <timothy_horton@apple.com>
+
+        [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.
+
 2013-10-02  Daniel Bates  <dabates@apple.com>
 
         Fix the Mac WebKit2 build following <http://trac.webkit.org/changeset/139241>
index 0bdae2f..fe9e884 100644 (file)
 namespace WebKit {
 
 enum DrawingAreaType {
-    DrawingAreaTypeImpl,
 #if PLATFORM(MAC)
     DrawingAreaTypeTiledCoreAnimation,
     DrawingAreaTypeRemoteLayerTree,
+#else
+    DrawingAreaTypeImpl,
 #endif
 };
 
index bbc9a4f..fd90826 100644 (file)
@@ -34,7 +34,6 @@
 #import "AttributedString.h"
 #import "ColorSpaceData.h"
 #import "DataReference.h"
-#import "DrawingAreaProxyImpl.h"
 #import "EditorState.h"
 #import "FindIndicator.h"
 #import "FindIndicatorWindow.h"
@@ -147,7 +146,6 @@ struct WKViewInterpretKeyEventsParameters {
 - (void)_postFakeMouseMovedEventForFlagsChangedEvent:(NSEvent *)flagsChangedEvent;
 - (void)_setDrawingAreaSize:(NSSize)size;
 - (void)_setPluginComplexTextInputState:(PluginComplexTextInputState)pluginComplexTextInputState;
-- (BOOL)_shouldUseTiledDrawingArea;
 
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
 - (void)_setIsWindowOccluded:(BOOL)isWindowOccluded;
@@ -2117,60 +2115,10 @@ static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOl
 }
 #endif
 
-static void drawPageBackground(CGContextRef context, WebPageProxy* page, const IntRect& rect)
-{
-    if (!page->drawsBackground())
-        return;
-
-    CGContextSaveGState(context);
-    CGContextSetBlendMode(context, kCGBlendModeCopy);
-
-    CGColorRef backgroundColor;
-    if (page->drawsTransparentBackground())
-        backgroundColor = CGColorGetConstantColor(kCGColorClear);
-    else
-        backgroundColor = CGColorGetConstantColor(kCGColorWhite);
-
-    CGContextSetFillColorWithColor(context, backgroundColor);
-    CGContextFillRect(context, rect);
-
-    CGContextRestoreGState(context);
-}
-
 - (void)drawRect:(NSRect)rect
 {
     LOG(View, "drawRect: x:%g, y:%g, width:%g, height:%g", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);
     _data->_page->endPrinting();
-
-    if ([self _shouldUseTiledDrawingArea]) {
-        // Nothing to do here.
-        return;
-    }
-
-    CGContextRef context = static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]);
-
-    if (DrawingAreaProxyImpl* drawingArea = static_cast<DrawingAreaProxyImpl*>(_data->_page->drawingArea())) {
-        const NSRect *rectsBeingDrawn;
-        NSInteger numRectsBeingDrawn;
-        [self getRectsBeingDrawn:&rectsBeingDrawn count:&numRectsBeingDrawn];
-        for (NSInteger i = 0; i < numRectsBeingDrawn; ++i) {
-            Region unpaintedRegion;
-            drawingArea->paint(context, enclosingIntRect(rectsBeingDrawn[i]), unpaintedRegion);
-
-            // If the window doesn't have a valid backing store, we need to fill the parts of the page that we
-            // didn't paint with the background color (white or clear), to avoid garbage in those areas.
-            if (!_data->_windowHasValidBackingStore || !drawingArea->hasReceivedFirstUpdate()) {
-                Vector<IntRect> unpaintedRects = unpaintedRegion.rects();
-                for (size_t i = 0; i < unpaintedRects.size(); ++i)
-                    drawPageBackground(context, _data->_page.get(), unpaintedRects[i]);
-
-                _data->_windowHasValidBackingStore = YES;
-            }
-        }
-    } else 
-        drawPageBackground(context, _data->_page.get(), enclosingIntRect(rect));
-
-    _data->_page->didDraw();
 }
 
 - (BOOL)isOpaque
@@ -2337,11 +2285,6 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
     _data->_resizeScrollOffset = NSZeroSize;
 }
 
-- (BOOL)_shouldUseTiledDrawingArea
-{
-    return NO;
-}
-
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
 - (void)quickLookWithEvent:(NSEvent *)event
 {
@@ -2367,14 +2310,10 @@ static void drawPageBackground(CGContextRef context, WebPageProxy* page, const I
 
 - (std::unique_ptr<WebKit::DrawingAreaProxy>)_createDrawingAreaProxy
 {
-    if ([self _shouldUseTiledDrawingArea]) {
-        if (getenv("WK_USE_REMOTE_LAYER_TREE_DRAWING_AREA"))
-            return std::make_unique<RemoteLayerTreeDrawingAreaProxy>(_data->_page.get());
-
-        return std::make_unique<TiledCoreAnimationDrawingAreaProxy>(_data->_page.get());
-    }
+    if (getenv("WK_USE_REMOTE_LAYER_TREE_DRAWING_AREA"))
+        return std::make_unique<RemoteLayerTreeDrawingAreaProxy>(_data->_page.get());
 
-    return std::make_unique<DrawingAreaProxyImpl>(_data->_page.get());
+    return std::make_unique<TiledCoreAnimationDrawingAreaProxy>(_data->_page.get());
 }
 
 - (BOOL)_isFocused
@@ -3088,12 +3027,10 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
     
     [self _registerDraggedTypes];
 
-    if ([self _shouldUseTiledDrawingArea]) {
-        self.wantsLayer = YES;
+    self.wantsLayer = YES;
 
-        // Explicitly set the layer contents placement so AppKit will make sure that our layer has masksToBounds set to YES.
-        self.layerContentsPlacement = NSViewLayerContentsPlacementTopLeft;
-    }
+    // Explicitly set the layer contents placement so AppKit will make sure that our layer has masksToBounds set to YES.
+    self.layerContentsPlacement = NSViewLayerContentsPlacementTopLeft;
 
     WebContext::statistics().wkViewCount++;
 
@@ -3106,7 +3043,7 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
 - (BOOL)wantsUpdateLayer
 {
-    return [self _shouldUseTiledDrawingArea];
+    return YES;
 }
 
 - (void)updateLayer
index d2a3bd4..579db8b 100644 (file)
 #include <WebCore/IntRect.h>
 #include <wtf/Noncopyable.h>
 
-#if PLATFORM(MAC)
-#include <wtf/RetainPtr.h>
-#endif
-
 #if PLATFORM(QT)
 #include <QtGui/QPainter>
 #include <QtGui/QPixmap>
@@ -59,9 +55,7 @@ public:
     const WebCore::IntSize& size() const { return m_size; }
     float deviceScaleFactor() const { return m_deviceScaleFactor; }
 
-#if PLATFORM(MAC)
-    typedef CGContextRef PlatformGraphicsContext;
-#elif PLATFORM(QT)
+#if PLATFORM(QT)
     typedef QPainter* PlatformGraphicsContext;
 #elif USE(CAIRO)
     typedef cairo_t* PlatformGraphicsContext;
@@ -78,22 +72,7 @@ private:
     float m_deviceScaleFactor;
     WebPageProxy* m_webPageProxy;
 
-#if PLATFORM(MAC)
-    CGContextRef backingStoreContext();
-
-    void performWithScrolledRectTransform(const WebCore::IntRect&, void (^)(const WebCore::IntRect&, const WebCore::IntSize&));
-    void resetScrolledRect();
-
-    RetainPtr<CGLayerRef> m_cgLayer;
-    RetainPtr<CGContextRef> m_bitmapContext;
-
-    // The rectange that was scrolled most recently.
-    WebCore::IntRect m_scrolledRect;
-
-    // Contents of m_scrolledRect are offset by this amount (and wrapped around) with respect to
-    // their original location.
-    WebCore::IntSize m_scrolledRectOffset;
-#elif PLATFORM(QT)
+#if PLATFORM(QT)
     QPixmap m_pixmap;
 #elif USE(CAIRO)
     OwnPtr<WebCore::WidgetBackingStore> m_backingStore;
index 93b9f0b..211603e 100644 (file)
@@ -27,7 +27,6 @@
 #ifndef DrawingAreaProxy_h
 #define DrawingAreaProxy_h
 
-#include "BackingStore.h"
 #include "DrawingAreaInfo.h"
 #include "MessageReceiver.h"
 #include <WebCore/FloatPoint.h>
diff --git a/Source/WebKit2/UIProcess/mac/BackingStoreMac.mm b/Source/WebKit2/UIProcess/mac/BackingStoreMac.mm
deleted file mode 100644 (file)
index 7256f2e..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "BackingStore.h"
-
-#import "CGUtilities.h"
-#import "ShareableBitmap.h"
-#import "UpdateInfo.h"
-#import "WebPageProxy.h"
-#import <WebCore/GraphicsContext.h>
-#import <WebCore/Region.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-void BackingStore::performWithScrolledRectTransform(const IntRect& rect, void (^block)(const IntRect&, const IntSize&))
-{
-    if (m_scrolledRect.isEmpty() || m_scrolledRectOffset.isZero() || !m_scrolledRect.intersects(rect)) {
-        block(rect, IntSize());
-        return;
-    }
-
-    // The part of rect that's outside the scrolled rect is not translated.
-    Region untranslatedRegion = rect;
-    untranslatedRegion.subtract(m_scrolledRect);
-    Vector<IntRect> untranslatedRects = untranslatedRegion.rects();
-    for (size_t i = 0; i < untranslatedRects.size(); ++i)
-        block(untranslatedRects[i], IntSize());
-
-    // The part of rect that intersects the scrolled rect comprises up to four parts, each subject
-    // to a different translation (all translations are equivalent modulo the dimensions of the
-    // scrolled rect to the scroll offset).
-    IntRect intersection = rect;
-    intersection.intersect(m_scrolledRect);
-
-    IntRect scrolledRect = m_scrolledRect;
-    IntSize offset = m_scrolledRectOffset;
-    scrolledRect.move(-offset);
-
-    IntRect part = intersection;
-    part.intersect(scrolledRect);
-    if (!part.isEmpty())
-        block(part, offset);
-
-    part = intersection;
-    offset += IntSize(0, -m_scrolledRect.height());
-    scrolledRect.move(IntSize(0, m_scrolledRect.height()));
-    part.intersect(scrolledRect);
-    if (!part.isEmpty())
-        block(part, offset);
-
-    part = intersection;
-    offset += IntSize(-m_scrolledRect.width(), 0);
-    scrolledRect.move(IntSize(m_scrolledRect.width(), 0));
-    part.intersect(scrolledRect);
-    if (!part.isEmpty())
-        block(part, offset);
-
-    part = intersection;
-    offset += IntSize(0, m_scrolledRect.height());
-    scrolledRect.move(IntSize(0, -m_scrolledRect.height()));
-    part.intersect(scrolledRect);
-    if (!part.isEmpty())
-        block(part, offset);
-}
-
-void BackingStore::resetScrolledRect()
-{
-    ASSERT(!m_scrolledRect.isEmpty());
-
-    if (m_scrolledRectOffset.isZero()) {
-        m_scrolledRect = IntRect();
-        return;
-    }
-
-    IntSize scaledSize = m_scrolledRect.size();
-    scaledSize.scale(m_deviceScaleFactor);
-
-    RetainPtr<CGColorSpaceRef> colorSpace = adoptCF(CGColorSpaceCreateDeviceRGB());
-    RetainPtr<CGContextRef> context = adoptCF(CGBitmapContextCreate(0, scaledSize.width(), scaledSize.height(), 8, scaledSize.width() * 4, colorSpace.get(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host));
-
-    CGContextScaleCTM(context.get(), m_deviceScaleFactor, m_deviceScaleFactor);
-
-    CGContextScaleCTM(context.get(), 1, -1);
-    CGContextTranslateCTM(context.get(), -m_scrolledRect.x(), -m_scrolledRect.maxY());
-    paint(context.get(), m_scrolledRect);
-
-    IntRect sourceRect(IntPoint(), m_scrolledRect.size());
-    paintBitmapContext(backingStoreContext(), context.get(), m_deviceScaleFactor, m_scrolledRect.location(), sourceRect);
-
-    m_scrolledRect = IntRect();
-    m_scrolledRectOffset = IntSize();
-}
-
-void BackingStore::paint(PlatformGraphicsContext context, const IntRect& rect)
-{
-    // FIXME: This is defined outside the block to work around bugs in llvm-gcc 4.2.
-    __block CGRect source;
-    performWithScrolledRectTransform(rect, ^(const IntRect& part, const IntSize& offset) {
-        if (m_cgLayer) {
-            CGContextSaveGState(context);
-            CGContextClipToRect(context, part);
-
-            CGContextScaleCTM(context, 1, -1);
-            CGContextDrawLayerAtPoint(context, CGPointMake(-offset.width(), offset.height() - m_size.height()), m_cgLayer.get());
-
-            CGContextRestoreGState(context);
-            return;
-        }
-
-        ASSERT(m_bitmapContext);
-        source = part;
-        source.origin.x += offset.width();
-        source.origin.y += offset.height();
-        paintBitmapContext(context, m_bitmapContext.get(), m_deviceScaleFactor, part.location(), source);
-    });
-}
-
-CGContextRef BackingStore::backingStoreContext()
-{
-    if (m_cgLayer)
-        return CGLayerGetContext(m_cgLayer.get());
-
-    // Try to create a layer.
-    if (CGContextRef containingWindowContext = m_webPageProxy->containingWindowGraphicsContext()) {
-        m_cgLayer = adoptCF(CGLayerCreateWithContext(containingWindowContext, m_size, 0));
-        CGContextRef layerContext = CGLayerGetContext(m_cgLayer.get());
-        
-        CGContextSetBlendMode(layerContext, kCGBlendModeCopy);
-
-        // We want the origin to be in the top left corner so flip the backing store context.
-        CGContextTranslateCTM(layerContext, 0, m_size.height());
-        CGContextScaleCTM(layerContext, 1, -1);
-
-        if (m_bitmapContext) {
-            // Paint the contents of the bitmap into the layer context.
-            paintBitmapContext(layerContext, m_bitmapContext.get(), m_deviceScaleFactor, CGPointZero, CGRectMake(0, 0, m_size.width(), m_size.height()));
-            m_bitmapContext = nullptr;
-        }
-
-        return layerContext;
-    }
-
-    if (!m_bitmapContext) {
-        RetainPtr<CGColorSpaceRef> colorSpace = adoptCF(CGColorSpaceCreateDeviceRGB());
-
-        IntSize scaledSize(m_size);
-        scaledSize.scale(m_deviceScaleFactor);
-        m_bitmapContext = adoptCF(CGBitmapContextCreate(0, scaledSize.width(), scaledSize.height(), 8, scaledSize.width() * 4, colorSpace.get(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host));
-
-        CGContextSetBlendMode(m_bitmapContext.get(), kCGBlendModeCopy);
-
-        CGContextScaleCTM(m_bitmapContext.get(), m_deviceScaleFactor, m_deviceScaleFactor);
-
-        // We want the origin to be in the top left corner so flip the backing store context.
-        CGContextTranslateCTM(m_bitmapContext.get(), 0, m_size.height());
-        CGContextScaleCTM(m_bitmapContext.get(), 1, -1);
-    }
-
-    return m_bitmapContext.get();
-}
-
-void BackingStore::incorporateUpdate(ShareableBitmap* bitmap, const UpdateInfo& updateInfo)
-{
-    CGContextRef context = backingStoreContext();
-
-    scroll(updateInfo.scrollRect, updateInfo.scrollOffset);
-
-    IntPoint updateRectLocation = updateInfo.updateRectBounds.location();
-
-    GraphicsContext ctx(context);
-    __block GraphicsContext* graphicsContext = &ctx;
-
-    // Paint all update rects.
-    for (size_t i = 0; i < updateInfo.updateRects.size(); ++i) {
-        IntRect updateRect = updateInfo.updateRects[i];
-        IntRect srcRect = updateRect;
-        // FIXME: This is defined outside the block to work around bugs in llvm-gcc 4.2.
-        __block IntRect srcPart;
-        performWithScrolledRectTransform(srcRect, ^(const IntRect& part, const IntSize& offset) {
-            srcPart = part;
-            srcPart.move(-updateRectLocation.x(), -updateRectLocation.y());
-            bitmap->paint(*graphicsContext, updateInfo.deviceScaleFactor, part.location() + offset, srcPart);
-        });
-    }
-}
-
-void BackingStore::scroll(const IntRect& scrollRect, const IntSize& scrollOffset)
-{
-    if (scrollOffset.isZero())
-        return;
-
-    ASSERT(!scrollRect.isEmpty());
-
-    if (!m_scrolledRect.isEmpty() && m_scrolledRect != scrollRect)
-        resetScrolledRect();
-
-    m_scrolledRect = scrollRect;
-
-    int width = (m_scrolledRectOffset.width() - scrollOffset.width()) % m_scrolledRect.width();
-    if (width < 0)
-        width += m_scrolledRect.width();
-    m_scrolledRectOffset.setWidth(width);
-
-    int height = (m_scrolledRectOffset.height() - scrollOffset.height()) % m_scrolledRect.height();
-    if (height < 0)
-        height += m_scrolledRect.height();
-    m_scrolledRectOffset.setHeight(height);
-}
-
-} // namespace WebKit
index cb36224..7a292de 100644 (file)
                1A5E4DA412D3BD3D0099A2BB /* TextCheckerState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5E4DA312D3BD3D0099A2BB /* TextCheckerState.h */; };
                1A6420E412DCE2FF00CAAE2C /* ShareableBitmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6420E212DCE2FF00CAAE2C /* ShareableBitmap.cpp */; };
                1A6420E512DCE2FF00CAAE2C /* ShareableBitmap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6420E312DCE2FF00CAAE2C /* ShareableBitmap.h */; };
-               1A64218612DCF49200CAAE2C /* DrawingAreaProxyImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A64218412DCF49200CAAE2C /* DrawingAreaProxyImpl.h */; };
-               1A64218712DCF49200CAAE2C /* DrawingAreaProxyImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A64218512DCF49200CAAE2C /* DrawingAreaProxyImpl.cpp */; };
-               1A6421F612DCFBAB00CAAE2C /* DrawingAreaImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6421F412DCFBAB00CAAE2C /* DrawingAreaImpl.h */; };
-               1A6421F712DCFBAB00CAAE2C /* DrawingAreaImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6421F512DCFBAB00CAAE2C /* DrawingAreaImpl.cpp */; };
                1A64229912DD029200CAAE2C /* DrawingAreaMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A64229712DD029200CAAE2C /* DrawingAreaMessageReceiver.cpp */; };
                1A64229A12DD029200CAAE2C /* DrawingAreaMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A64229812DD029200CAAE2C /* DrawingAreaMessages.h */; };
                1A64230812DD09EB00CAAE2C /* DrawingAreaProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A64230612DD09EB00CAAE2C /* DrawingAreaProxyMessageReceiver.cpp */; };
                1A64230912DD09EB00CAAE2C /* DrawingAreaProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A64230712DD09EB00CAAE2C /* DrawingAreaProxyMessages.h */; };
                1A64245E12DE29A100CAAE2C /* UpdateInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A64245C12DE29A100CAAE2C /* UpdateInfo.h */; };
                1A64245F12DE29A100CAAE2C /* UpdateInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A64245D12DE29A100CAAE2C /* UpdateInfo.cpp */; };
-               1A64256812DE42EC00CAAE2C /* BackingStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A64256612DE42EC00CAAE2C /* BackingStore.h */; };
-               1A64256912DE42EC00CAAE2C /* BackingStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A64256712DE42EC00CAAE2C /* BackingStore.cpp */; };
-               1A64292D12DE5F9800CAAE2C /* BackingStoreMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A64292C12DE5F9800CAAE2C /* BackingStoreMac.mm */; };
                1A6506D2175015E700174518 /* MessageSender.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6506D1175015E700174518 /* MessageSender.cpp */; };
                1A6F9F9011E13EFC00DB1371 /* CommandLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */; };
                1A6F9FB711E1408500DB1371 /* CommandLineMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6F9FB611E1408500DB1371 /* CommandLineMac.cpp */; };
                1A91010B1268C8CA001842F5 /* FindIndicatorWindow.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A9101091268C8CA001842F5 /* FindIndicatorWindow.mm */; };
                1A92DC1112F8BA460017AF65 /* LayerTreeContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A92DC1012F8BA460017AF65 /* LayerTreeContext.h */; };
                1A92DC1312F8BAB90017AF65 /* LayerTreeContextMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A92DC1212F8BAB90017AF65 /* LayerTreeContextMac.mm */; };
-               1A97E07616A5F9E0000BC9E5 /* LayerTreeHostMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A97E07316A5F578000BC9E5 /* LayerTreeHostMac.h */; };
-               1A97E07716A5F9E0000BC9E5 /* LayerTreeHostMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A97E07416A5F578000BC9E5 /* LayerTreeHostMac.mm */; };
                1A9FBA8D13FF04E600DEED67 /* PluginComplexTextInputState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9FBA8C13FF04E600DEED67 /* PluginComplexTextInputState.h */; };
                1AA2E51D12E4C05E00BC4966 /* CGUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA2E51B12E4C05E00BC4966 /* CGUtilities.h */; };
                1AA2E51E12E4C05E00BC4966 /* CGUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA2E51C12E4C05E00BC4966 /* CGUtilities.cpp */; };
                1A5E4DA312D3BD3D0099A2BB /* TextCheckerState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextCheckerState.h; sourceTree = "<group>"; };
                1A6420E212DCE2FF00CAAE2C /* ShareableBitmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShareableBitmap.cpp; sourceTree = "<group>"; };
                1A6420E312DCE2FF00CAAE2C /* ShareableBitmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShareableBitmap.h; sourceTree = "<group>"; };
-               1A64218412DCF49200CAAE2C /* DrawingAreaProxyImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingAreaProxyImpl.h; sourceTree = "<group>"; };
-               1A64218512DCF49200CAAE2C /* DrawingAreaProxyImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DrawingAreaProxyImpl.cpp; sourceTree = "<group>"; };
-               1A6421F412DCFBAB00CAAE2C /* DrawingAreaImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingAreaImpl.h; sourceTree = "<group>"; };
-               1A6421F512DCFBAB00CAAE2C /* DrawingAreaImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DrawingAreaImpl.cpp; sourceTree = "<group>"; };
                1A64228A12DD024700CAAE2C /* DrawingArea.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DrawingArea.messages.in; sourceTree = "<group>"; };
                1A64229712DD029200CAAE2C /* DrawingAreaMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DrawingAreaMessageReceiver.cpp; sourceTree = "<group>"; };
                1A64229812DD029200CAAE2C /* DrawingAreaMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingAreaMessages.h; sourceTree = "<group>"; };
                1A64230712DD09EB00CAAE2C /* DrawingAreaProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingAreaProxyMessages.h; sourceTree = "<group>"; };
                1A64245C12DE29A100CAAE2C /* UpdateInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UpdateInfo.h; sourceTree = "<group>"; };
                1A64245D12DE29A100CAAE2C /* UpdateInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UpdateInfo.cpp; sourceTree = "<group>"; };
-               1A64256612DE42EC00CAAE2C /* BackingStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BackingStore.h; sourceTree = "<group>"; };
-               1A64256712DE42EC00CAAE2C /* BackingStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BackingStore.cpp; sourceTree = "<group>"; };
-               1A64292C12DE5F9800CAAE2C /* BackingStoreMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BackingStoreMac.mm; sourceTree = "<group>"; };
                1A6506D1175015E700174518 /* MessageSender.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MessageSender.cpp; sourceTree = "<group>"; };
                1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommandLine.h; sourceTree = "<group>"; };
                1A6F9FB611E1408500DB1371 /* CommandLineMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CommandLineMac.cpp; sourceTree = "<group>"; };
                1A9101091268C8CA001842F5 /* FindIndicatorWindow.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FindIndicatorWindow.mm; sourceTree = "<group>"; };
                1A92DC1012F8BA460017AF65 /* LayerTreeContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayerTreeContext.h; sourceTree = "<group>"; };
                1A92DC1212F8BAB90017AF65 /* LayerTreeContextMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LayerTreeContextMac.mm; sourceTree = "<group>"; };
-               1A97E07316A5F578000BC9E5 /* LayerTreeHostMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayerTreeHostMac.h; sourceTree = "<group>"; };
-               1A97E07416A5F578000BC9E5 /* LayerTreeHostMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LayerTreeHostMac.mm; sourceTree = "<group>"; };
                1A9FBA8C13FF04E600DEED67 /* PluginComplexTextInputState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginComplexTextInputState.h; sourceTree = "<group>"; };
                1AA1C79A100E7FC50078DEBC /* WebCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
                1AA1C7DE100E846E0078DEBC /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
                                BC8452A51162C80900CAB9B5 /* DrawingArea.cpp */,
                                BC8452A61162C80900CAB9B5 /* DrawingArea.h */,
                                1A64228A12DD024700CAAE2C /* DrawingArea.messages.in */,
-                               1A6421F512DCFBAB00CAAE2C /* DrawingAreaImpl.cpp */,
-                               1A6421F412DCFBAB00CAAE2C /* DrawingAreaImpl.h */,
                                93FC679F12D3CC7400A60610 /* EncoderAdapter.cpp */,
                                93FC67A012D3CC7400A60610 /* EncoderAdapter.h */,
                                1AA575F81496B52600A4EE06 /* EventDispatcher.cpp */,
                                31A2EC401489973700810D71 /* Notifications */,
                                1AEFCC0511D01F34008219D3 /* Plugins */,
                                1A44B95816B73F8C00B7BBD8 /* Storage */,
-                               1A64256712DE42EC00CAAE2C /* BackingStore.cpp */,
-                               1A64256612DE42EC00CAAE2C /* BackingStore.h */,
                                BC2652121182608100243E12 /* DrawingAreaProxy.cpp */,
                                BC2652131182608100243E12 /* DrawingAreaProxy.h */,
                                1A6422FC12DD08FE00CAAE2C /* DrawingAreaProxy.messages.in */,
-                               1A64218512DCF49200CAAE2C /* DrawingAreaProxyImpl.cpp */,
-                               1A64218412DCF49200CAAE2C /* DrawingAreaProxyImpl.h */,
                                1A910070126675C4001842F5 /* FindIndicator.cpp */,
                                1A91006F126675C3001842F5 /* FindIndicator.h */,
                                BC17753E118BABF0007D9E9A /* GenericCallback.h */,
                BC963D6C113DD19500574BE2 /* mac */ = {
                        isa = PBXGroup;
                        children = (
-                               1A97E07316A5F578000BC9E5 /* LayerTreeHostMac.h */,
-                               1A97E07416A5F578000BC9E5 /* LayerTreeHostMac.mm */,
                                7C6D37FA172F555F009D2847 /* PageBannerMac.mm */,
                                1AB16AEC164B41E400290D62 /* RemoteGraphicsLayer.h */,
                                1AB16AEB164B41E400290D62 /* RemoteGraphicsLayer.mm */,
                BCCF085C113F3B7500C650C5 /* mac */ = {
                        isa = PBXGroup;
                        children = (
-                               1A64292C12DE5F9800CAAE2C /* BackingStoreMac.mm */,
                                B878B613133428DC006888E9 /* CorrectionPanel.h */,
                                B878B614133428DC006888E9 /* CorrectionPanel.mm */,
                                1AB16AE01648656D00290D62 /* RemoteLayerTreeDrawingAreaProxy.h */,
                                512F589912A8838800629530 /* AuthenticationDecisionListener.h in Headers */,
                                518E8EF916B2091C00E91429 /* AuthenticationManager.h in Headers */,
                                512F58A312A883AD00629530 /* AuthenticationManagerMessages.h in Headers */,
-                               1A64256812DE42EC00CAAE2C /* BackingStore.h in Headers */,
                                E170877116D6CFE500F99226 /* BlobRegistrationData.h in Headers */,
                                E170876C16D6CA6900F99226 /* BlobRegistryProxy.h in Headers */,
                                4F601432155C5AA2001FBDE0 /* BlockingResponseMap.h in Headers */,
                                1AB7D61A1288B9D900CFD08C /* DownloadProxyMessages.h in Headers */,
                                C517388112DF8F4F00EE3F47 /* DragControllerAction.h in Headers */,
                                BC8452A81162C80900CAB9B5 /* DrawingArea.h in Headers */,
-                               1A6421F612DCFBAB00CAAE2C /* DrawingAreaImpl.h in Headers */,
                                0FB659231208B4DB0044816C /* DrawingAreaInfo.h in Headers */,
                                1A64229A12DD029200CAAE2C /* DrawingAreaMessages.h in Headers */,
                                BC2652171182608100243E12 /* DrawingAreaProxy.h in Headers */,
-                               1A64218612DCF49200CAAE2C /* DrawingAreaProxyImpl.h in Headers */,
                                1A64230912DD09EB00CAAE2C /* DrawingAreaProxyMessages.h in Headers */,
                                5DA6ED0A1490606900B41D12 /* DynamicLinkerEnvironmentExtractor.h in Headers */,
                                1AA41AB512C02EC4002BE67B /* EditorState.h in Headers */,
                                BCE0937814FB128C001138D9 /* LayerHostingContext.h in Headers */,
                                1A92DC1112F8BA460017AF65 /* LayerTreeContext.h in Headers */,
                                1A186EEA12EF7618008E5F37 /* LayerTreeHost.h in Headers */,
-                               1A97E07616A5F9E0000BC9E5 /* LayerTreeHostMac.h in Headers */,
                                1A1D8BA21731A36300141DA4 /* LocalStorageDatabase.h in Headers */,
                                1A8C728D1738477C000A6554 /* LocalStorageDatabaseTracker.h in Headers */,
                                51A7F2F3125BF820008AEB1D /* Logging.h in Headers */,
                                518E8EF816B2091C00E91429 /* AuthenticationManager.cpp in Sources */,
                                518E8EFB16B2091C00E91429 /* AuthenticationManager.mac.mm in Sources */,
                                512F58A212A883AD00629530 /* AuthenticationManagerMessageReceiver.cpp in Sources */,
-                               1A64256912DE42EC00CAAE2C /* BackingStore.cpp in Sources */,
-                               1A64292D12DE5F9800CAAE2C /* BackingStoreMac.mm in Sources */,
                                E170877016D6CFE500F99226 /* BlobRegistrationData.cpp in Sources */,
                                E170876B16D6CA6900F99226 /* BlobRegistryProxy.cpp in Sources */,
                                BCF18638167D071E00A1A85A /* CacheModel.cpp in Sources */,
                                1AD25E95167AB08100EA9BCD /* DownloadProxyMap.cpp in Sources */,
                                1AB7D6191288B9D900CFD08C /* DownloadProxyMessageReceiver.cpp in Sources */,
                                BC8452A71162C80900CAB9B5 /* DrawingArea.cpp in Sources */,
-                               1A6421F712DCFBAB00CAAE2C /* DrawingAreaImpl.cpp in Sources */,
                                1A64229912DD029200CAAE2C /* DrawingAreaMessageReceiver.cpp in Sources */,
                                BC2652161182608100243E12 /* DrawingAreaProxy.cpp in Sources */,
-                               1A64218712DCF49200CAAE2C /* DrawingAreaProxyImpl.cpp in Sources */,
                                1A64230812DD09EB00CAAE2C /* DrawingAreaProxyMessageReceiver.cpp in Sources */,
                                5DA6ED0B1490606900B41D12 /* DynamicLinkerEnvironmentExtractor.mm in Sources */,
                                8CFECE941490F140002AAA32 /* EditorState.cpp in Sources */,
                                BCE0937714FB128C001138D9 /* LayerHostingContext.mm in Sources */,
                                1A92DC1312F8BAB90017AF65 /* LayerTreeContextMac.mm in Sources */,
                                1A186EEB12EF7618008E5F37 /* LayerTreeHost.cpp in Sources */,
-                               1A97E07716A5F9E0000BC9E5 /* LayerTreeHostMac.mm in Sources */,
                                1A1D8BA11731A36300141DA4 /* LocalStorageDatabase.cpp in Sources */,
                                1A8C728C1738477C000A6554 /* LocalStorageDatabaseTracker.cpp in Sources */,
                                51A7F2F5125BF8D4008AEB1D /* Logging.cpp in Sources */,
index 9eff462..186ef46 100644 (file)
 #include "DrawingArea.h"
 
 // Subclasses
-#include "DrawingAreaImpl.h"
-
 #if PLATFORM(MAC)
 #include "RemoteLayerTreeDrawingArea.h"
 #include "TiledCoreAnimationDrawingArea.h"
+#else
+#include "DrawingAreaImpl.h"
 #endif
 
 #include "WebPageCreationParameters.h"
@@ -41,13 +41,14 @@ namespace WebKit {
 std::unique_ptr<DrawingArea> DrawingArea::create(WebPage* webPage, const WebPageCreationParameters& parameters)
 {
     switch (parameters.drawingAreaType) {
-    case DrawingAreaTypeImpl:
-        return std::make_unique<DrawingAreaImpl>(webPage, parameters);
 #if PLATFORM(MAC)
     case DrawingAreaTypeTiledCoreAnimation:
         return std::make_unique<TiledCoreAnimationDrawingArea>(webPage, parameters);
     case DrawingAreaTypeRemoteLayerTree:
         return std::make_unique<RemoteLayerTreeDrawingArea>(webPage, parameters);
+#else
+    case DrawingAreaTypeImpl:
+        return DrawingAreaImpl::create(webPage, parameters);
 #endif
     }
 
index d025023..972181b 100644 (file)
@@ -255,20 +255,7 @@ void DrawingAreaImpl::setPaintingEnabled(bool paintingEnabled)
 
 void DrawingAreaImpl::updatePreferences(const WebPreferencesStore& store)
 {
-#if PLATFORM(MAC)
-    // Soon we want pages with fixed positioned elements to be able to be scrolled by the ScrollingCoordinator.
-    // As a part of that work, we have to composite fixed position elements, and we have to allow those
-    // elements to create a stacking context.
-    m_webPage->corePage()->settings().setAcceleratedCompositingForFixedPositionEnabled(true);
-    m_webPage->corePage()->settings().setFixedPositionCreatesStackingContext(true);
-
-    // <rdar://problem/10697417>: It is necessary to force compositing when accelerate drawing
-    // is enabled on Mac so that scrollbars are always in their own layers.
-    if (m_webPage->corePage()->settings().acceleratedDrawingEnabled())
-        m_webPage->corePage()->settings().setForceCompositingMode(LayerTreeHost::supportsAcceleratedCompositing());
-    else
-#endif
-        m_webPage->corePage()->settings().setForceCompositingMode(store.getBoolValueForKey(WebPreferencesKey::forceCompositingModeKey()) && LayerTreeHost::supportsAcceleratedCompositing());
+    m_webPage->corePage()->settings().setForceCompositingMode(store.getBoolValueForKey(WebPreferencesKey::forceCompositingModeKey()) && LayerTreeHost::supportsAcceleratedCompositing());
 }
 
 void DrawingAreaImpl::layerHostDidFlushLayers()
@@ -478,12 +465,7 @@ void DrawingAreaImpl::resumePainting()
     // FIXME: We shouldn't always repaint everything here.
     setNeedsDisplay();
 
-#if PLATFORM(MAC)
-    if (m_webPage->windowIsVisible())
-        m_webPage->corePage()->resumeScriptedAnimations();
-#else
     m_webPage->corePage()->resumeScriptedAnimations();
-#endif
 }
 
 void DrawingAreaImpl::enterAcceleratedCompositingMode(GraphicsLayer* graphicsLayer)
@@ -716,21 +698,4 @@ void DrawingAreaImpl::didReceiveCoordinatedLayerTreeHostMessage(CoreIPC::Connect
 }
 #endif
 
-#if PLATFORM(MAC)
-void DrawingAreaImpl::setLayerHostingMode(uint32_t opaqueLayerHostingMode)
-{
-    LayerHostingMode layerHostingMode = static_cast<LayerHostingMode>(opaqueLayerHostingMode);
-    m_webPage->setLayerHostingMode(layerHostingMode);
-
-    if (!m_layerTreeHost)
-        return;
-
-    LayerTreeContext oldLayerTreeContext = m_layerTreeHost->layerTreeContext();
-    m_layerTreeHost->setLayerHostingMode(layerHostingMode);
-
-    if (m_layerTreeHost->layerTreeContext() != oldLayerTreeContext)
-        m_webPage->send(Messages::DrawingAreaProxy::UpdateAcceleratedCompositingMode(m_backingStoreStateID, m_layerTreeHost->layerTreeContext()));
-}
-#endif
-
 } // namespace WebKit
index 058fac8..758f11b 100644 (file)
@@ -73,10 +73,6 @@ private:
     virtual void scheduleCompositingLayerFlush() OVERRIDE;
 #endif
 
-#if PLATFORM(MAC)
-    virtual void setLayerHostingMode(uint32_t) OVERRIDE;
-#endif
-
 #if USE(COORDINATED_GRAPHICS)
     virtual void didReceiveCoordinatedLayerTreeHostMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&);
 #endif
index a4a1039..593a1ca 100644 (file)
 #include "config.h"
 #include "LayerTreeHost.h"
 
-#if PLATFORM(MAC)
-#include "LayerTreeHostMac.h"
-#endif
-
 #if USE(COORDINATED_GRAPHICS)
 #include "CoordinatedLayerTreeHost.h"
 #endif
@@ -44,9 +40,7 @@ namespace WebKit {
 
 PassRefPtr<LayerTreeHost> LayerTreeHost::create(WebPage* webPage)
 {
-#if PLATFORM(MAC)
-    return LayerTreeHostMac::create(webPage);
-#elif USE(COORDINATED_GRAPHICS)
+#if USE(COORDINATED_GRAPHICS)
     return CoordinatedLayerTreeHost::create(webPage);
 #elif PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
     return LayerTreeHostGtk::create(webPage);
diff --git a/Source/WebKit2/WebProcess/WebPage/mac/LayerTreeHostMac.h b/Source/WebKit2/WebProcess/WebPage/mac/LayerTreeHostMac.h
deleted file mode 100644 (file)
index a62eebc..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef LayerTreeHostMac_h
-#define LayerTreeHostMac_h
-
-#include "LayerTreeHost.h"
-#include <WebCore/GraphicsLayerClient.h>
-#include <WebCore/LayerFlushScheduler.h>
-#include <WebCore/LayerFlushSchedulerClient.h>
-#include <wtf/HashMap.h>
-
-namespace WebKit {
-
-class LayerHostingContext;
-class PageOverlay;
-
-class LayerTreeHostMac : public LayerTreeHost, private WebCore::GraphicsLayerClient, private WebCore::LayerFlushSchedulerClient {
-public:
-    static PassRefPtr<LayerTreeHostMac> create(WebPage*);
-    virtual ~LayerTreeHostMac();
-
-private:
-    explicit LayerTreeHostMac(WebPage*);
-
-    // LayerTreeHost.
-    virtual const LayerTreeContext& layerTreeContext() OVERRIDE;
-    virtual void scheduleLayerFlush() OVERRIDE;
-    virtual void setLayerFlushSchedulingEnabled(bool) OVERRIDE;
-    virtual void setShouldNotifyAfterNextScheduledLayerFlush(bool) OVERRIDE;
-    virtual void setRootCompositingLayer(WebCore::GraphicsLayer*) OVERRIDE;
-    virtual void invalidate() OVERRIDE;
-    virtual void setNonCompositedContentsNeedDisplay() OVERRIDE;
-    virtual void setNonCompositedContentsNeedDisplayInRect(const WebCore::IntRect&) OVERRIDE;
-    virtual void scrollNonCompositedContents(const WebCore::IntRect& scrollRect) OVERRIDE;
-    virtual void forceRepaint() OVERRIDE;
-    virtual void sizeDidChange(const WebCore::IntSize& newSize) OVERRIDE;
-    virtual void deviceOrPageScaleFactorChanged() OVERRIDE;
-    virtual void pageBackgroundTransparencyChanged() OVERRIDE;
-
-    virtual void didInstallPageOverlay(PageOverlay*) OVERRIDE;
-    virtual void didUninstallPageOverlay(PageOverlay*) OVERRIDE;
-    virtual void setPageOverlayNeedsDisplay(PageOverlay*, const WebCore::IntRect&) OVERRIDE;
-    virtual void setPageOverlayOpacity(PageOverlay*, float) OVERRIDE;
-
-    virtual void pauseRendering() OVERRIDE;
-    virtual void resumeRendering() OVERRIDE;
-
-    virtual void setLayerHostingMode(LayerHostingMode) OVERRIDE;
-
-    // GraphicsLayerClient
-    virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time) OVERRIDE;
-    virtual void notifyFlushRequired(const WebCore::GraphicsLayer*) OVERRIDE;
-    virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect) OVERRIDE;
-    virtual float deviceScaleFactor() const OVERRIDE;
-    virtual void didCommitChangesForLayer(const WebCore::GraphicsLayer*) const OVERRIDE { }
-
-    // LayerFlushSchedulerClient
-    virtual bool flushLayers();
-
-    void initialize();
-    void performScheduledLayerFlush();
-    bool flushPendingLayerChanges();
-
-    void createPageOverlayLayer(PageOverlay*);
-    void destroyPageOverlayLayer(PageOverlay*);
-
-    bool m_isValid;
-    bool m_notifyAfterScheduledLayerFlush;
-
-    LayerTreeContext m_layerTreeContext;
-
-    std::unique_ptr<WebCore::GraphicsLayer> m_rootLayer;
-    std::unique_ptr<WebCore::GraphicsLayer> m_nonCompositedContentLayer;
-    typedef HashMap<PageOverlay*, std::unique_ptr<WebCore::GraphicsLayer>> PageOverlayLayerMap;
-    PageOverlayLayerMap m_pageOverlayLayers;
-
-    std::unique_ptr<LayerHostingContext> m_layerHostingContext;
-    WebCore::LayerFlushScheduler m_layerFlushScheduler;
-};
-
-} // namespace WebKit
-
-#endif // LayerTreeHostMac_h
diff --git a/Source/WebKit2/WebProcess/WebPage/mac/LayerTreeHostMac.mm b/Source/WebKit2/WebProcess/WebPage/mac/LayerTreeHostMac.mm
deleted file mode 100644 (file)
index 3b786f0..0000000
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "LayerTreeHostMac.h"
-
-#import "DrawingAreaImpl.h"
-#import "LayerHostingContext.h"
-#import "WebPage.h"
-#import "WebProcess.h"
-#import <QuartzCore/CATransaction.h>
-#import <WebCore/FrameView.h>
-#import <WebCore/GraphicsLayerCA.h>
-#import <WebCore/MainFrame.h>
-#import <WebCore/PlatformCALayer.h>
-#import <WebCore/Settings.h>
-
-using namespace WebCore;
-
-@interface CATransaction (Details)
-+ (void)synchronize;
-@end
-
-namespace WebKit {
-
-PassRefPtr<LayerTreeHostMac> LayerTreeHostMac::create(WebPage* webPage)
-{
-    RefPtr<LayerTreeHostMac> host = adoptRef(new LayerTreeHostMac(webPage));
-    host->initialize();
-    return host.release();
-}
-
-LayerTreeHostMac::LayerTreeHostMac(WebPage* webPage)
-    : LayerTreeHost(webPage)
-    , m_isValid(true)
-    , m_notifyAfterScheduledLayerFlush(false)
-    , m_layerFlushScheduler(this)
-{
-}
-
-LayerTreeHostMac::~LayerTreeHostMac()
-{
-    ASSERT(!m_isValid);
-    ASSERT(!m_rootLayer);
-    ASSERT(!m_layerHostingContext);
-}
-
-const LayerTreeContext& LayerTreeHostMac::layerTreeContext()
-{
-    return m_layerTreeContext;
-}
-
-void LayerTreeHostMac::scheduleLayerFlush()
-{
-    m_layerFlushScheduler.schedule();
-}
-
-void LayerTreeHostMac::setLayerFlushSchedulingEnabled(bool layerFlushingEnabled)
-{
-    if (layerFlushingEnabled)
-        m_layerFlushScheduler.resume();
-    else
-        m_layerFlushScheduler.suspend();
-}
-
-void LayerTreeHostMac::setShouldNotifyAfterNextScheduledLayerFlush(bool notifyAfterScheduledLayerFlush)
-{
-    m_notifyAfterScheduledLayerFlush = notifyAfterScheduledLayerFlush;
-}
-
-void LayerTreeHostMac::setRootCompositingLayer(GraphicsLayer* graphicsLayer)
-{
-    m_nonCompositedContentLayer->removeAllChildren();
-
-    // Add the accelerated layer tree hierarchy.
-    if (graphicsLayer)
-        m_nonCompositedContentLayer->addChild(graphicsLayer);
-}
-
-void LayerTreeHostMac::invalidate()
-{
-    ASSERT(m_isValid);
-
-    m_isValid = false;
-
-    m_rootLayer = nullptr;
-
-    m_layerHostingContext->invalidate();
-    m_layerHostingContext = nullptr;
-    m_layerFlushScheduler.invalidate();
-}
-
-void LayerTreeHostMac::setNonCompositedContentsNeedDisplay()
-{
-    m_nonCompositedContentLayer->setNeedsDisplay();
-
-    PageOverlayLayerMap::iterator end = m_pageOverlayLayers.end();
-    for (PageOverlayLayerMap::iterator it = m_pageOverlayLayers.begin(); it != end; ++it)
-        it->value->setNeedsDisplay();
-
-    scheduleLayerFlush();
-}
-
-void LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect(const IntRect& rect)
-{
-    m_nonCompositedContentLayer->setNeedsDisplayInRect(rect);
-
-    PageOverlayLayerMap::iterator end = m_pageOverlayLayers.end();
-    for (PageOverlayLayerMap::iterator it = m_pageOverlayLayers.begin(); it != end; ++it)
-        it->value->setNeedsDisplayInRect(rect);
-
-    scheduleLayerFlush();
-}
-
-void LayerTreeHostMac::scrollNonCompositedContents(const IntRect& scrollRect)
-{
-    setNonCompositedContentsNeedDisplayInRect(scrollRect);
-}
-
-void LayerTreeHostMac::forceRepaint()
-{
-    scheduleLayerFlush();
-    flushPendingLayerChanges();
-
-    [CATransaction flush];
-    [CATransaction synchronize];
-}
-
-void LayerTreeHostMac::sizeDidChange(const IntSize& newSize)
-{
-    m_rootLayer->setSize(newSize);
-
-    // If the newSize exposes new areas of the non-composited content a setNeedsDisplay is needed
-    // for those newly exposed areas.
-    FloatSize oldSize = m_nonCompositedContentLayer->size();
-    m_nonCompositedContentLayer->setSize(newSize);
-
-    if (newSize.width() > oldSize.width()) {
-        float height = std::min(static_cast<float>(newSize.height()), oldSize.height());
-        m_nonCompositedContentLayer->setNeedsDisplayInRect(FloatRect(oldSize.width(), 0, newSize.width() - oldSize.width(), height));
-    }
-
-    if (newSize.height() > oldSize.height())
-        m_nonCompositedContentLayer->setNeedsDisplayInRect(FloatRect(0, oldSize.height(), newSize.width(), newSize.height() - oldSize.height()));
-
-    PageOverlayLayerMap::iterator end = m_pageOverlayLayers.end();
-    for (PageOverlayLayerMap::iterator it = m_pageOverlayLayers.begin(); it != end; ++it)
-        it->value->setSize(newSize);
-
-    scheduleLayerFlush();
-    flushPendingLayerChanges();
-
-    [CATransaction flush];
-    [CATransaction synchronize];
-}
-
-void LayerTreeHostMac::deviceOrPageScaleFactorChanged()
-{
-    // Other layers learn of the scale factor change via WebPage::setDeviceScaleFactor.
-    m_nonCompositedContentLayer->deviceOrPageScaleFactorChanged();
-}
-
-void LayerTreeHostMac::pageBackgroundTransparencyChanged()
-{
-    m_nonCompositedContentLayer->setContentsOpaque(m_webPage->drawsBackground() && !m_webPage->drawsTransparentBackground());
-}
-
-void LayerTreeHostMac::didInstallPageOverlay(PageOverlay* pageOverlay)
-{
-    createPageOverlayLayer(pageOverlay);
-    scheduleLayerFlush();
-}
-
-void LayerTreeHostMac::didUninstallPageOverlay(PageOverlay* pageOverlay)
-{
-    destroyPageOverlayLayer(pageOverlay);
-    scheduleLayerFlush();
-}
-
-void LayerTreeHostMac::setPageOverlayNeedsDisplay(PageOverlay* pageOverlay, const IntRect& rect)
-{
-    GraphicsLayer* layer = m_pageOverlayLayers.get(pageOverlay);
-
-    if (!layer)
-        return;
-
-    layer->setNeedsDisplayInRect(rect);
-    scheduleLayerFlush();
-}
-
-void LayerTreeHostMac::setPageOverlayOpacity(PageOverlay* pageOverlay, float opacity)
-{
-    GraphicsLayer* layer = m_pageOverlayLayers.get(pageOverlay);
-
-    if (!layer)
-        return;
-
-    layer->setOpacity(opacity);
-    scheduleLayerFlush();
-}
-
-void LayerTreeHostMac::pauseRendering()
-{
-    CALayer* root = m_rootLayer->platformLayer();
-    [root setValue:(id)kCFBooleanTrue forKey:@"NSCAViewRenderPaused"];
-    [[NSNotificationCenter defaultCenter] postNotificationName:@"NSCAViewRenderDidPauseNotification" object:nil userInfo:[NSDictionary dictionaryWithObject:root forKey:@"layer"]];
-}
-
-void LayerTreeHostMac::resumeRendering()
-{
-    CALayer* root = m_rootLayer->platformLayer();
-    [root setValue:(id)kCFBooleanFalse forKey:@"NSCAViewRenderPaused"];
-    [[NSNotificationCenter defaultCenter] postNotificationName:@"NSCAViewRenderDidResumeNotification" object:nil userInfo:[NSDictionary dictionaryWithObject:root forKey:@"layer"]];
-}
-
-void LayerTreeHostMac::setLayerHostingMode(LayerHostingMode layerHostingMode)
-{
-    if (layerHostingMode == m_layerHostingContext->layerHostingMode())
-        return;
-
-    // The mode has changed.
-
-    // First, invalidate the old hosting context.
-    m_layerHostingContext->invalidate();
-    m_layerHostingContext = nullptr;
-
-    // Create a new context and set it up.
-    switch (layerHostingMode) {
-    case LayerHostingModeDefault:
-        m_layerHostingContext = LayerHostingContext::createForPort(WebProcess::shared().compositingRenderServerPort());
-        break;
-#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
-    case LayerHostingModeInWindowServer:
-        m_layerHostingContext = LayerHostingContext::createForWindowServer();        
-        break;
-#endif
-    }
-
-    m_layerHostingContext->setRootLayer(m_rootLayer->platformLayer());
-    m_layerTreeContext.contextID = m_layerHostingContext->contextID();
-
-    scheduleLayerFlush();
-}
-
-void LayerTreeHostMac::notifyAnimationStarted(const WebCore::GraphicsLayer*, double time)
-{
-}
-
-void LayerTreeHostMac::notifyFlushRequired(const WebCore::GraphicsLayer*)
-{
-}
-
-void LayerTreeHostMac::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& graphicsContext, GraphicsLayerPaintingPhase, const IntRect& clipRect)
-{
-    if (graphicsLayer == m_nonCompositedContentLayer.get()) {
-        m_webPage->drawRect(graphicsContext, clipRect);
-        return;
-    }
-
-    for (auto& pageOverlayLayer : m_pageOverlayLayers) {
-        if (pageOverlayLayer.value.get() == graphicsLayer) {
-            m_webPage->drawPageOverlay(pageOverlayLayer.key, graphicsContext, clipRect);
-            break;
-        }
-    }
-}
-
-float LayerTreeHostMac::deviceScaleFactor() const
-{
-    return m_webPage->corePage()->deviceScaleFactor();
-}
-
-bool LayerTreeHostMac::flushLayers()
-{
-    performScheduledLayerFlush();
-    return true;
-}
-
-void LayerTreeHostMac::initialize()
-{
-    // Create a root layer.
-    m_rootLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
-#ifndef NDEBUG
-    m_rootLayer->setName("LayerTreeHost root layer");
-#endif
-    m_rootLayer->setDrawsContent(false);
-    m_rootLayer->setSize(m_webPage->size());
-    static_cast<GraphicsLayerCA*>(m_rootLayer.get())->platformCALayer()->setGeometryFlipped(true);
-
-    m_nonCompositedContentLayer = GraphicsLayer::create(graphicsLayerFactory(), this);
-    static_cast<GraphicsLayerCA*>(m_nonCompositedContentLayer.get())->setAllowTiledLayer(false);
-#ifndef NDEBUG
-    m_nonCompositedContentLayer->setName("LayerTreeHost non-composited content");
-#endif
-    m_nonCompositedContentLayer->setDrawsContent(true);
-    m_nonCompositedContentLayer->setContentsOpaque(m_webPage->drawsBackground() && !m_webPage->drawsTransparentBackground());
-    m_nonCompositedContentLayer->setSize(m_webPage->size());
-    if (m_webPage->corePage()->settings().acceleratedDrawingEnabled())
-        m_nonCompositedContentLayer->setAcceleratesDrawing(true);
-
-    m_rootLayer->addChild(m_nonCompositedContentLayer.get());
-
-    if (m_webPage->hasPageOverlay()) {
-        PageOverlayList& pageOverlays = m_webPage->pageOverlays();
-        PageOverlayList::iterator end = pageOverlays.end();
-        for (PageOverlayList::iterator it = pageOverlays.begin(); it != end; ++it)
-            createPageOverlayLayer(it->get());
-    }
-
-    switch (m_webPage->layerHostingMode()) {
-        case LayerHostingModeDefault:
-            m_layerHostingContext = LayerHostingContext::createForPort(WebProcess::shared().compositingRenderServerPort());
-            break;
-#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
-        case LayerHostingModeInWindowServer:
-            m_layerHostingContext = LayerHostingContext::createForWindowServer();
-            break;
-#endif
-    }
-
-    m_layerHostingContext->setRootLayer(m_rootLayer->platformLayer());
-    m_layerTreeContext.contextID = m_layerHostingContext->contextID();
-
-    setLayerFlushSchedulingEnabled(!m_webPage->drawingArea() || !m_webPage->drawingArea()->layerTreeStateIsFrozen());
-    scheduleLayerFlush();
-}
-
-void LayerTreeHostMac::performScheduledLayerFlush()
-{
-    {
-        Ref<LayerTreeHostMac> protect(*this);
-        m_webPage->layoutIfNeeded();
-
-        if (!m_isValid)
-            return;
-    }
-
-    if (!flushPendingLayerChanges())
-        return;
-
-    if (m_notifyAfterScheduledLayerFlush) {
-        // Let the drawing area know that we've done a flush of the layer changes.
-        static_cast<DrawingAreaImpl*>(m_webPage->drawingArea())->layerHostDidFlushLayers();
-        m_notifyAfterScheduledLayerFlush = false;
-    }
-}
-
-bool LayerTreeHostMac::flushPendingLayerChanges()
-{
-    if (m_layerFlushScheduler.isSuspended())
-        return false;
-
-    m_rootLayer->flushCompositingStateForThisLayerOnly();
-    m_nonCompositedContentLayer->flushCompositingStateForThisLayerOnly();
-
-    PageOverlayLayerMap::iterator end = m_pageOverlayLayers.end();
-    for (PageOverlayLayerMap::iterator it = m_pageOverlayLayers.begin(); it != end; ++it)
-        it->value->flushCompositingStateForThisLayerOnly();
-
-    return m_webPage->corePage()->mainFrame().view()->flushCompositingStateIncludingSubframes();
-}
-
-void LayerTreeHostMac::createPageOverlayLayer(PageOverlay* pageOverlay)
-{
-    std::unique_ptr<GraphicsLayer> layer = GraphicsLayer::create(graphicsLayerFactory(), this);
-#ifndef NDEBUG
-    layer->setName("LayerTreeHost page overlay content");
-#endif
-
-    layer->setAcceleratesDrawing(m_webPage->corePage()->settings().acceleratedDrawingEnabled());
-    layer->setDrawsContent(true);
-    layer->setSize(m_webPage->size());
-    layer->setShowDebugBorder(m_webPage->corePage()->settings().showDebugBorders());
-    layer->setShowRepaintCounter(m_webPage->corePage()->settings().showRepaintCounter());
-
-    m_rootLayer->addChild(layer.get());
-
-    m_pageOverlayLayers.add(pageOverlay, std::move(layer));
-}
-
-void LayerTreeHostMac::destroyPageOverlayLayer(PageOverlay* pageOverlay)
-{
-    std::unique_ptr<GraphicsLayer> layer = m_pageOverlayLayers.take(pageOverlay);
-    ASSERT(layer);
-
-    layer->removeFromParent();
-}
-
-} // namespace WebKit
index caef4bb..701c27f 100644 (file)
@@ -1,3 +1,25 @@
+2013-10-02  Tim Horton  <timothy_horton@apple.com>
+
+        [mac] Stop using DrawingAreaImpl on PLATFORM(MAC) 
+        https://bugs.webkit.org/show_bug.cgi?id=121859
+        <rdar://problem/15069359>
+
+        Reviewed by Anders Carlsson.
+
+        * 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.
+
 2013-10-02  Anders Carlsson  <andersca@apple.com>
 
         Move AHEM____.TTF from qt/fonts/ to fonts/.
index 7229a84..b6121d3 100644 (file)
@@ -150,19 +150,19 @@ static bool shouldOpenWebInspector(const char* pathOrURL)
 #endif
 
 #if PLATFORM(MAC)
-static bool shouldUseTiledDrawing(const char* pathOrURL)
+static bool shouldUseThreadedScrolling(const char* pathOrURL)
 {
     return strstr(pathOrURL, "tiled-drawing/") || strstr(pathOrURL, "tiled-drawing\\");
 }
 #endif
 
-static void updateTiledDrawingForCurrentTest(const char* pathOrURL)
+static void updateThreadedScrollingForCurrentTest(const char* pathOrURL)
 {
 #if PLATFORM(MAC)
     WKRetainPtr<WKMutableDictionaryRef> viewOptions = adoptWK(WKMutableDictionaryCreate());
-    WKRetainPtr<WKStringRef> useTiledDrawingKey = adoptWK(WKStringCreateWithUTF8CString("TiledDrawing"));
-    WKRetainPtr<WKBooleanRef> useTiledDrawingValue = adoptWK(WKBooleanCreate(shouldUseTiledDrawing(pathOrURL)));
-    WKDictionaryAddItem(viewOptions.get(), useTiledDrawingKey.get(), useTiledDrawingValue.get());
+    WKRetainPtr<WKStringRef> useThreadedScrollingKey = adoptWK(WKStringCreateWithUTF8CString("ThreadedScrolling"));
+    WKRetainPtr<WKBooleanRef> useThreadedScrollingValue = adoptWK(WKBooleanCreate(shouldUseThreadedScrolling(pathOrURL)));
+    WKDictionaryAddItem(viewOptions.get(), useThreadedScrollingKey.get(), useThreadedScrollingValue.get());
 
     TestController::shared().ensureViewSupportsOptions(viewOptions.get());
 #else
@@ -201,7 +201,7 @@ void TestInvocation::invoke()
     TestController::TimeoutDuration timeoutToUse = TestController::LongTimeout;
     sizeWebViewForCurrentTest(m_pathOrURL.c_str());
     updateLayoutType(m_pathOrURL.c_str());
-    updateTiledDrawingForCurrentTest(m_pathOrURL.c_str());
+    updateThreadedScrollingForCurrentTest(m_pathOrURL.c_str());
 
     m_textOutput.clear();
 
index aeb8244..f3a914e 100644 (file)
 
 using namespace WTR;
 
+enum {
+    _NSBackingStoreUnbuffered = 3
+};
+
 @interface WebKitTestRunnerWindow : NSWindow {
     PlatformWebView* _platformWebView;
     NSPoint _fakeOrigin;
@@ -43,29 +47,24 @@ using namespace WTR;
 @end
 
 @interface TestRunnerWKView : WKView {
-    BOOL _useTiledDrawing;
+    BOOL _useThreadedScrolling;
 }
 
-- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)context pageGroupRef:(WKPageGroupRef)pageGroup relatedToPage:(WKPageRef)relatedPage useTiledDrawing:(BOOL)useTiledDrawing;
+- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)context pageGroupRef:(WKPageGroupRef)pageGroup relatedToPage:(WKPageRef)relatedPage useThreadedScrolling:(BOOL)useThreadedScrolling;
 
-@property (nonatomic, assign) BOOL useTiledDrawing;
+@property (nonatomic, assign) BOOL useThreadedScrolling;
 @end
 
 @implementation TestRunnerWKView
 
-@synthesize useTiledDrawing = _useTiledDrawing;
+@synthesize useThreadedScrolling = _useThreadedScrolling;
 
-- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)context pageGroupRef:(WKPageGroupRef)pageGroup relatedToPage:(WKPageRef)relatedPage useTiledDrawing:(BOOL)useTiledDrawing
+- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)context pageGroupRef:(WKPageGroupRef)pageGroup relatedToPage:(WKPageRef)relatedPage useThreadedScrolling:(BOOL)useThreadedScrolling
 {
-    _useTiledDrawing = useTiledDrawing;
+    _useThreadedScrolling = useThreadedScrolling;
     return [super initWithFrame:frame contextRef:context pageGroupRef:pageGroup relatedToPage:relatedPage];
 }
 
-- (BOOL)_shouldUseTiledDrawingArea
-{
-    return _useTiledDrawing;
-}
-
 - (void)dragImage:(NSImage *)anImage at:(NSPoint)viewLocation offset:(NSSize)initialOffset event:(NSEvent *)event pasteboard:(NSPasteboard *)pboard source:(id)sourceObj slideBack:(BOOL)slideFlag
 {
     RetainPtr<WebKitTestRunnerDraggingInfo> draggingInfo = adoptNS([[WebKitTestRunnerDraggingInfo alloc] initWithImage:anImage offset:initialOffset pasteboard:pboard source:sourceObj]);
@@ -119,20 +118,20 @@ PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGro
     : m_windowIsKey(true)
     , m_options(options)
 {
-    WKRetainPtr<WKStringRef> useTiledDrawingKey(AdoptWK, WKStringCreateWithUTF8CString("TiledDrawing"));
-    WKTypeRef useTiledDrawingValue = options ? WKDictionaryGetItemForKey(options, useTiledDrawingKey.get()) : NULL;
-    bool useTiledDrawing = useTiledDrawingValue && WKBooleanGetValue(static_cast<WKBooleanRef>(useTiledDrawingValue));
+    WKRetainPtr<WKStringRef> useThreadedScrollingKey(AdoptWK, WKStringCreateWithUTF8CString("ThreadedScrolling"));
+    WKTypeRef useThreadedScrollingValue = options ? WKDictionaryGetItemForKey(options, useThreadedScrollingKey.get()) : NULL;
+    bool useThreadedScrolling = useThreadedScrollingValue && WKBooleanGetValue(static_cast<WKBooleanRef>(useThreadedScrollingValue));
 
     // The tiled drawing specific tests also depend on threaded scrolling.
     WKPreferencesRef preferences = WKPageGroupGetPreferences(pageGroupRef);
-    WKPreferencesSetThreadedScrollingEnabled(preferences, useTiledDrawing);
+    WKPreferencesSetThreadedScrollingEnabled(preferences, useThreadedScrolling);
 
     NSRect rect = NSMakeRect(0, 0, TestController::viewWidth, TestController::viewHeight);
-    m_view = [[TestRunnerWKView alloc] initWithFrame:rect contextRef:contextRef pageGroupRef:pageGroupRef relatedToPage:relatedPage useTiledDrawing:useTiledDrawing];
+    m_view = [[TestRunnerWKView alloc] initWithFrame:rect contextRef:contextRef pageGroupRef:pageGroupRef relatedToPage:relatedPage useThreadedScrolling:useThreadedScrolling];
     [m_view setWindowOcclusionDetectionEnabled:NO];
 
     NSRect windowRect = NSOffsetRect(rect, -10000, [(NSScreen *)[[NSScreen screens] objectAtIndex:0] frame].size.height - rect.size.height + 10000);
-    m_window = [[WebKitTestRunnerWindow alloc] initWithContentRect:windowRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES];
+    m_window = [[WebKitTestRunnerWindow alloc] initWithContentRect:windowRect styleMask:NSBorderlessWindowMask backing:_NSBackingStoreUnbuffered defer:YES];
     m_window.platformWebView = this;
     [m_window setColorSpace:[[NSScreen mainScreen] colorSpace]];
     [m_window setCollectionBehavior:NSWindowCollectionBehaviorStationary];
@@ -230,11 +229,11 @@ WKRetainPtr<WKImageRef> PlatformWebView::windowSnapshotImage()
 
 bool PlatformWebView::viewSupportsOptions(WKDictionaryRef options) const
 {
-    WKRetainPtr<WKStringRef> useTiledDrawingKey(AdoptWK, WKStringCreateWithUTF8CString("TiledDrawing"));
-    WKTypeRef useTiledDrawingValue = WKDictionaryGetItemForKey(options, useTiledDrawingKey.get());
-    bool useTiledDrawing = useTiledDrawingValue && WKBooleanGetValue(static_cast<WKBooleanRef>(useTiledDrawingValue));
+    WKRetainPtr<WKStringRef> useThreadedScrollingKey(AdoptWK, WKStringCreateWithUTF8CString("ThreadedScrolling"));
+    WKTypeRef useThreadedScrollingValue = WKDictionaryGetItemForKey(options, useThreadedScrollingKey.get());
+    bool useThreadedScrolling = useThreadedScrollingValue && WKBooleanGetValue(static_cast<WKBooleanRef>(useThreadedScrollingValue));
 
-    return useTiledDrawing == [(TestRunnerWKView *)m_view useTiledDrawing];
+    return useThreadedScrolling == [(TestRunnerWKView *)m_view useThreadedScrolling];
 }
 
 } // namespace WTR