• commit-queue@webkit.org's avatar
    [CSS Regions] Fix positioning composited layers when the region has overflow:hidden · 4affaa08
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=124042
    
    Patch by Mihai Maerean <mmaerean@adobe.com> on 2014-01-23
    Reviewed by Mihnea Ovidenie.
    
    Source/WebCore:
    
    If there's a clipping GraphicsLayer on the hierarchy, substract its offset, since it's its
    parent that positions us.
    
    Tests: compositing/regions/position-layer-inside-region-overflow-hidden.html
           compositing/regions/position-layer-inside-overflow-hidden.html
           compositing/regions/position-layers-inside-region-overflow-hidden.html
           compositing/regions/position-layers-inside-regions-overflow-hidden.html
    
    * rendering/RenderLayerBacking.cpp:
    (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread): The position
    must also be correct when the region has box-shadow that inflates the region's layer. The
    composited layers from the flow thread should be rendered in the same position whether the
    associated region has clipping or not.
    Using the position of the clipping layer instead of the location of the clipbox makes it
    also work with box-shadow that inflates the region's graphics layer.
    
    LayoutTests:
    
    * compositing/regions/position-layer-inside-region-overflow-hidden.html: Added.
    * compositing/regions/position-layer-inside-region-overflow-hidden-expected.html: Added.
    * compositing/regions/position-layer-inside-overflow-hidden.html: Added.
    * compositing/regions/position-layer-inside-overflow-hidden-expected.html: Added.
    * compositing/regions/position-layers-inside-region-overflow-hidden.html: Added.
    * compositing/regions/position-layers-inside-region-overflow-hidden-expected.html: Added.
    * compositing/regions/position-layers-inside-regions-overflow-hidden.html: Added.
    * compositing/regions/position-layers-inside-regions-overflow-hidden-expected.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    4affaa08