Skip to content
  • simon.fraser@apple.com's avatar
    Page content missing when flipping from an empty layer to a tiled layer · ca3e5e1e
    simon.fraser@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=113977
    <rdar://problem/13444219>
    
    Source/WebCore:
    
    Reviewed by Tim Horton.
    
    Some articles on USA Today were missing content on load, when a large GraphicsLayer
    which did not draw content needed to draw content (and become tiled in the process).
    
    The bug was an ordering dependency in GraphicsLayerCA::commitLayerChangesBeforeSublayers().
    swapFromOrToTiledLayer() sets some dirty flags, but for some properties which have
    already been committed in the current flush cycle.
    
    Fix by moving the swapFromOrToTiledLayer() to the top of the commit, which is
    safe since it only consults GraphicsLayer properties, not CALayer properties.
    
    Test: compositing/tiling/empty-to-tiled.html
    
    * platform/graphics/ca/GraphicsLayerCA.cpp:
    (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
    (WebCore::GraphicsLayerCA::updateGeometry):
    (WebCore::GraphicsLayerCA::updateLayerDrawsContent):
    (WebCore::GraphicsLayerCA::updateContentsScale):
    * platform/graphics/ca/GraphicsLayerCA.h:
    (GraphicsLayerCA):
    
    LayoutTests:
    
    Reviewed by Tim Horton.
    
    Ref test that adds visible content to a larger layer.
    
    * compositing/tiling/empty-to-tiled-expected.html: Added.
    * compositing/tiling/empty-to-tiled.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    ca3e5e1e