Skip to content
  • simon.fraser@apple.com's avatar
    compositing/geometry/bounds-ignores-hidden-dynamic.html has incorrect initial rendering · bd93c753
    simon.fraser@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=119825
    
    Source/WebCore:
    
    Reviewed by Tim Horton.
    
    r137526 and some earlier commits attempted to avoid unconditionally
    repainting layers when their size changes, because this was causing
    TiledBacking layers to repaint when the document size changed.
    
    However, the approach required that we have good information about
    whether size changes require a repaint, which in some cases is hard
    to determine, especially when RenderLayer changes affect our
    decisions about which layers are composited.
    
    Fix by pushing the decision about whether to repaint on size change
    into GraphicsLayer. The default is to repaint on size change,
    but GraphicsLayer provides a function that can be overridden to
    modify this behavior; GraphicsLayerCA does so to avoid repaints
    when layers with TiledBackings get resized.
    
    Test: compositing/repaint/repaint-on-layer-grouping-change.html
    
    * WebCore.exp.in: WebKit2 needs GraphicsLayer::setSize, which is no longer inline.
    * platform/graphics/GraphicsLayer.cpp:
    (WebCore::GraphicsLayer::setOffsetFromRenderer):
    (WebCore::GraphicsLayer::setSize):
    * platform/graphics/GraphicsLayer.h:
    (WebCore::GraphicsLayer::shouldRepaintOnSizeChange):
    * platform/graphics/ca/GraphicsLayerCA.cpp:
    (WebCore::GraphicsLayerCA::shouldRepaintOnSizeChange):
    * platform/graphics/ca/GraphicsLayerCA.h:
    * rendering/RenderLayerBacking.h: No longer need m_boundsConstrainedByClipping
    * rendering/RenderLayerBacking.cpp:
    (WebCore::RenderLayerBacking::RenderLayerBacking):
    (WebCore::RenderLayerBacking::updateCompositedBounds):
    (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): setSize takes
    care of repainting for us now, so we can remove all the conditional code.
    
    LayoutTests:
    
    Reviewed by Tim Horton.
    
    Test that dumps repaint rects on layers after visibility changes affect
    the layer hierarchy.
    
    * compositing/repaint/repaint-on-layer-grouping-change-expected.txt: Added.
    * compositing/repaint/repaint-on-layer-grouping-change.html: Added.
    * compositing/repaint/resize-repaint-expected.txt: Update result.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    bd93c753
ChangeLog 1.73 MiB