Skip to content
  • dino@apple.com's avatar
    Force elements with perspective or preserve-3d to disallow direct composited backgrounds · b0b80c04
    dino@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=119462
    <rdar://problem/14607548>
    
    Reviewed by Simon Fraser.
    
    Source/WebCore:
    
    Bug 119461 (http://wkb.ug/119461) describes how a directly composited
    background color can intersect with its children. It's not clear exactly
    what the best way to fix that is, but for the moment we should disallow
    any element that has perspective or a preserve-3d transform style from
    getting a directly composited background.
    
    Test: compositing/background-color/no-composited-background-color-when-perspective.html
    
    * rendering/RenderLayerBacking.cpp:
    (WebCore::hasPerspectiveOrPreserves3D): New static helper.
    (WebCore::supportsDirectBoxDecorationsComposition): Return false if the above function is true.
    
    LayoutTests:
    
    * compositing/background-color/no-composited-background-color-when-perspective-expected.html: Added.
    * compositing/background-color/no-composited-background-color-when-perspective.html: Added.
    * compositing/geometry/preserve-3d-switching-expected.txt: Rebaselined.
    * compositing/overflow-trumps-transform-style-expected.txt: Rebaselined.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    b0b80c04