Use tile caches in place of CATiledLayer
https://bugs.webkit.org/show_bug.cgi?id=99806
<rdar://problem/6474145>

Reviewed by Tim Horton.

Have GraphicsLayerCA use TileCaches instead of CATiledLayer now for
layers that exceed the 2000px size threshold.

* platform/graphics/TiledBacking.h:
(TiledBacking): Have normal getter and setter for the visible rect.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): We need
to pass in an old visibleRect to commitLayerChangesBeforeSublayers(). Just use
our current visible rect, which result in no tile area work.
(WebCore::GraphicsLayerCA::computeVisibleRect): Make this const and have it
return the rect, for clarity.
(WebCore::GraphicsLayerCA::recursiveCommitChanges): Keep track of the old
visible rect, and use the change flags mechanism to ensure that we recompute
tile areas later.
When calling commitLayerChangesBeforeSublayers() on the mask layer, just pass
its own visible rect as the old visible rect.
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Pass in the
oldVisibleRect so that updateVisibleRect() can use this to see how the
visibleRect is changing.
(WebCore::GraphicsLayerCA::adjustTiledLayerVisibleRect): This member function
compares the old and new visible rects, and extends the tile coverage area
in directions where more content is being exposed. It takes care to avoid
"jitter" in the visible rect deltas causing edge tiles to get created then
destroyed by keeping any extra padding that already exists in a direction
where more content is being exposed.
(WebCore::GraphicsLayerCA::updateVisibleRect): Call adjustTiledLayerVisibleRect()
and use the result to update the TiledBacking's visibleRect.
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Create layers of type
LayerTypeTileCacheLayer instead of LayerTypeWebTiledLayer. Because tile
cache layers involve adding an extra layer to the hierarchy (the tile container),
we call updateSublayerList() when changing layer type.
* platform/graphics/ca/GraphicsLayerCA.h: New m_sizeAtLastVisibleRectUpdate member
that is used to prevent the adjustTiledLayerVisibleRect() logic being confused by
size changes.
(WebCore::GraphicsLayerCA::visibleRect):
* platform/graphics/ca/mac/TileCache.h: Have normal getter and setter for the visible rect.
* platform/graphics/ca/mac/TileCache.mm:
(WebCore::TileCache::setVisibleRect): Renamed to setVisibleRect().
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges): Avoid doing work
for pages in the page cache, for which the root layer is unattached.
(WebCore::RenderLayerCompositor::frameViewDidScroll): visibleRectChanged() was renamed
to setVisibleRect().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131940 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cairo][WTR] Implement the painting of repaint rectangles.
https://bugs.webkit.org/show_bug.cgi?id=99839

Reviewed by Martin Robinson.

Implement the required code to paint the gray overlay with
transparent regions for the repaint rectangles, as other ports
already do and as is already done in most WK1 ports.

* WebKitTestRunner/cairo/TestInvocationCairo.cpp:
(WTR::paintRepaintRectOverlay):
(WTR::TestInvocation::dumpPixelsAndCompareWithExpected):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131941 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r130699): 5 various fast/ tests started failing
https://bugs.webkit.org/show_bug.cgi?id=98729

Reviewed by Xan Lopez.

Source/WebCore:

Do not try to remove the URL fragment for data URLs. This will likely
just corrupt the URL.

No new tests. This unskips some previously failing tests.

* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::urlStringForSoup): Do nothing for data URLs.

LayoutTests:

Unskip some tests which are now passing.

* platform/gtk/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131942 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening, rebaselining deferred image tests for r131928.

* platform/chromium-mac/platform/chromium/virtual/deferred: Added.
* platform/chromium-mac/platform/chromium/virtual/deferred/fast: Added.
* platform/chromium-mac/platform/chromium/virtual/deferred/fast/images: Added.
* platform/chromium-mac/platform/chromium/virtual/deferred/fast/images/animated-gif-with-offsets-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/deferred/fast/images/favicon-as-image-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/deferred/fast/images/gray-scale-jpeg-with-color-profile-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/deferred/fast/images/image-map-anchor-children-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/deferred/fast/images/imagemap-case-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/deferred/fast/images/imagemap-circle-focus-ring-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/deferred/fast/images/imagemap-focus-ring-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/deferred/fast/images/imagemap-focus-ring-outline-color-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/deferred/fast/images/imagemap-focus-ring-outline-color-explicitly-inherited-from-map-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/deferred/fast/images/imagemap-focus-ring-outline-color-not-inherited-from-map-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/deferred/fast/images/imagemap-focus-ring-zero-outline-width-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/deferred/fast/images/imagemap-polygon-focus-ring-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/deferred/fast/images/jpeg-with-color-profile-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/deferred/fast/images/png-with-color-profile-expected.png: Added.
* platform/chromium-win/platform/chromium/virtual/deferred: Added.
* platform/chromium-win/platform/chromium/virtual/deferred/fast: Added.
* platform/chromium-win/platform/chromium/virtual/deferred/fast/images: Added.
* platform/chromium-win/platform/chromium/virtual/deferred/fast/images/gray-scale-jpeg-with-color-profile-expected.png: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] API to pass impl thread via WebLayerTreeView
https://bugs.webkit.org/show_bug.cgi?id=99863

Reviewed by James Robinson.

This adds an API to pass the compositor impl thread via WebView and
WebLayerTreeView. This is currently a no-op change, but in the future
this codepath will supercede WebCompositor. The goal is to avoid statics
in compositor initialization.

Source/Platform:

* chromium/public/WebCompositorSupport.h:
(WebKit::WebCompositorSupport::createLayerTreeView):
(WebCompositorSupport):
* chromium/public/WebLayerTreeView.h:
(WebKit):
(WebLayerTreeView):

Source/WebKit/chromium:

* public/WebView.h:
(WebKit):
(WebView):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::setCompositorImplThread):
(WebKit):
(WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
* src/WebViewImpl.h:
(WebViewImpl):
* tests/GraphicsLayerChromiumTest.cpp:
(WebKit::GraphicsLayerChromiumTest::GraphicsLayerChromiumTest):

Tools:

* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::createNewWindow):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131944 268f45cc-cd09-0410-ab3c-d52691b4dbfc