Skip to content
  • simon.fraser@apple.com's avatar
    Fix layer borders to cleaning appear and disappear on switching · e2605d52
    simon.fraser@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=101136
    
    Source/WebCore:
    
    Reviewed by Sam Weinig.
    
    GraphicsLayers decided whether to show layer borders based
    on a callback through the GraphicsLayerClient. This made it
    hard to manage state, resulting in a failure to cleanly
    hide layers when toggled off via the preference.
    
    Changed the layer border and repaint counter visibility to be bits
    stored on GraphicsLayer just like other properties, with getters
    and setters. RenderLayerBacking now updates these debug
    indicators when we update other compositing layer properties.
    
    In GraphicsLayerCA, avoid calling updateDebugIndicators() explicitly
    in several places by setting the change flag DebugIndicatorsChanged
    for properties whose values affect the appearance of the debug border.
    
    Removed the GraphicsLayerClient methods showDebugBorders() and
    showRepaintCounter() which are no longer required.
    
    * platform/graphics/GraphicsLayer.cpp:
    (WebCore::GraphicsLayer::GraphicsLayer):
    (WebCore::GraphicsLayer::updateDebugIndicators):
    * platform/graphics/GraphicsLayer.h:
    (WebCore::GraphicsLayer::setShowDebugBorder):
    (WebCore::GraphicsLayer::isShowingDebugBorder):
    (WebCore::GraphicsLayer::setShowRepaintCounter):
    (WebCore::GraphicsLayer::isShowingRepaintCounter):
    (WebCore::GraphicsLayer::repaintCount):
    (WebCore::GraphicsLayer::incrementRepaintCount):
    * platform/graphics/GraphicsLayerClient.h:
    * platform/graphics/ca/GraphicsLayerCA.cpp:
    (WebCore::GraphicsLayerCA::GraphicsLayerCA):
    (WebCore::GraphicsLayerCA::setMasksToBounds):
    (WebCore::GraphicsLayerCA::setDrawsContent):
    (WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
    (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
    (WebCore::GraphicsLayerCA::updateMasksToBounds):
    (WebCore::GraphicsLayerCA::updateLayerDrawsContent):
    (WebCore::GraphicsLayerCA::updateDebugBorder):
    (WebCore::GraphicsLayerCA::setShowDebugBorder):
    (WebCore::GraphicsLayerCA::setShowRepaintCounter):
    (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
    (WebCore::GraphicsLayerCA::setupContentsLayer):
    (WebCore::GraphicsLayerCA::cloneLayer):
    * platform/graphics/ca/GraphicsLayerCA.h:
    (GraphicsLayerCA):
    (WebCore::GraphicsLayerCA::platformCALayerShowDebugBorders):
    * rendering/RenderLayerBacking.cpp:
    (WebCore::RenderLayerBacking::updateDebugIndicators):
    * rendering/RenderLayerBacking.h:
    (RenderLayerBacking):
    * rendering/RenderLayerCompositor.cpp:
    (WebCore::RenderLayerCompositor::updateBacking):
    * rendering/RenderLayerCompositor.h:
    (RenderLayerCompositor):
    
    Source/WebKit/blackberry:
    
    Reviewed by Sam Weinig.
    
    Remove the GraphicsLayerClient methods showDebugBorders() and
    showRepaintCounter().
    
    * Api/WebOverlay_p.h:
    (WebOverlayPrivateWebKitThread):
    * Api/WebPage.cpp:
    (BlackBerry::WebKit::WebPagePrivate::notifyFlushRequired):
    * Api/WebPage_p.h:
    * WebKitSupport/DefaultTapHighlight.cpp:
    * WebKitSupport/DefaultTapHighlight.h:
    (DefaultTapHighlight):
    * WebKitSupport/InspectorOverlayBlackBerry.cpp:
    * WebKitSupport/InspectorOverlayBlackBerry.h:
    (InspectorOverlay):
    * WebKitSupport/SelectionOverlay.cpp:
    * WebKitSupport/SelectionOverlay.h:
    (SelectionOverlay):
    
    Source/WebKit/chromium:
    
    Reviewed by Sam Weinig.
    
    Remove the GraphicsLayerClient methods showDebugBorders() and
    showRepaintCounter().
    
    * src/NonCompositedContentHost.cpp:
    * src/NonCompositedContentHost.h:
    (NonCompositedContentHost):
    * src/PageOverlay.cpp:
    * tests/GraphicsLayerChromiumTest.cpp:
    * tests/ImageLayerChromiumTest.cpp:
    
    Source/WebKit/gtk:
    
    Reviewed by Sam Weinig.
    
    Remove the GraphicsLayerClient methods showDebugBorders() and
    showRepaintCounter().
    
    * WebCoreSupport/AcceleratedCompositingContext.h:
    (AcceleratedCompositingContext):
    * WebCoreSupport/AcceleratedCompositingContextCairo.cpp:
    * WebCoreSupport/AcceleratedCompositingContextClutter.cpp:
    * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
    
    Source/WebKit/win:
    
    Reviewed by Sam Weinig.
    
    Remove the GraphicsLayerClient methods showDebugBorders() and
    showRepaintCounter().
    
    * WebView.cpp:
    * WebView.h:
    
    Source/WebKit2:
    
    Reviewed by Sam Weinig.
    
    Remove the GraphicsLayerClient methods showDebugBorders() and
    showRepaintCounter().
    
    * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
    * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
    * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
    (LayerTreeCoordinator):
    * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
    * WebProcess/WebPage/ca/LayerTreeHostCA.h:
    (LayerTreeHostCA):
    * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
    * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
    (LayerTreeHostGtk):
    * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
    (TiledCoreAnimationDrawingArea):
    * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133517 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    e2605d52