GraphicsLayer::client() should return a reference.
https://bugs.webkit.org/show_bug.cgi?id=126372

Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2014-05-07
Reviewed by Simon Fraser.

GraphicsLayers always have a GraphicsLayerClient attached,
so make client() a reference and remove some unnecessary branches.
The author of the changes in the mac port is Andreas Kling <akling@apple.com>.

Source/WebCore:
* WebCore.exp.in:
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::GraphicsLayer):
(WebCore::GraphicsLayer::willBeDestroyed):
(WebCore::GraphicsLayer::paintGraphicsLayerContents):
(WebCore::GraphicsLayer::addRepaintRect):
(WebCore::dumpChildren):
(WebCore::GraphicsLayer::dumpProperties):
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::client):
(WebCore::GraphicsLayer::pageScaleFactor):
(WebCore::GraphicsLayer::deviceScaleFactor):
* platform/graphics/GraphicsLayerFactory.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayer::create):
(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::initialize):
(WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
(WebCore::GraphicsLayerCA::computePositionRelativeToBase):
(WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
(WebCore::GraphicsLayerCA::computeVisibleRect):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::platformCALayerContentsScaleMultiplierForNewTiles):
(WebCore::GraphicsLayerCA::platformCALayerShouldAggressivelyRetainTiles):
(WebCore::GraphicsLayerCA::platformCALayerShouldTemporarilyRetainTileCohorts):
(WebCore::GraphicsLayerCA::updateContentsOpaque):
(WebCore::GraphicsLayerCA::updateContentsScale):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
(WebCore::GraphicsLayerCA::noteLayerPropertyChanged):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayer::create):
(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::notifyChange):
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::createRootLayer):
(WebCore::CompositingCoordinator::createGraphicsLayer):
* platform/graphics/texmap/coordinated/CompositingCoordinator.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::notifyFlushRequired):
(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
(WebCore::CoordinatedGraphicsLayer::animationStartedTimerFired):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createGraphicsLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):

Source/WebKit/win:
* WebView.cpp:
(WebView::setAcceleratedCompositing):

Source/WebKit2:
* WebProcess/WebPage/PageOverlayController.cpp:
(WebKit::PageOverlayController::initialize):
(WebKit::PageOverlayController::installPageOverlay):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize):
(WebKit::LayerTreeHostGtk::createPageOverlayLayer):
* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::createGraphicsLayer):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168423 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: Animated GIF inside compositing layer never resumes animation when scrolled back into view
https://bugs.webkit.org/show_bug.cgi?id=132608

Reviewed by Simon Fraser.


Source/WebCore: 
Test: fast/repaint/animation-after-layer-scroll.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):
        
    Check if any animations need to be restarted after layer scroll.

LayoutTests: 
* fast/repaint/animation-after-layer-scroll-expected.txt: Added.
* fast/repaint/animation-after-layer-scroll.html: Added.



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