Changeset 149969 in webkit


Ignore:
Timestamp:
May 12, 2013 11:46:37 AM (11 years ago)
Author:
Simon Fraser
Message:

Dropdowns on http://www.exploratorium.edu don't show anything
https://bugs.webkit.org/show_bug.cgi?id=115991

Source/WebCore:

Reviewed by Dan Bernstein.

We can't optimize away the backing store of a layer by saying that
it paints into a composited ancestor if its composited bounds are not contained
by that ancestor.

Test: compositing/backing/no-backing-for-clip-overhang.html

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Pass in our
previously computed composited bounds relative to our composited ancestor,
and its composited bounds.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::requiresOwnBackingStore): If the ancestor's
composited bounds don't contain the layer's composited bounds, the layer
needs its own backing store.

  • rendering/RenderLayerCompositor.h:

LayoutTests:

Reviewed by Dan Bernstein.

Layer tree dump test with an overflow:hidden that projects outside its
ancestor, and is forced to composite by a composited child.

  • compositing/backing/no-backing-for-clip-overhang-expected.txt: Added.
  • compositing/backing/no-backing-for-clip-overhang.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r149956 r149969  
     12013-05-12  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Dropdowns on http://www.exploratorium.edu don't show anything
     4        https://bugs.webkit.org/show_bug.cgi?id=115991
     5
     6        Reviewed by Dan Bernstein.
     7       
     8        Layer tree dump test with an overflow:hidden that projects outside its
     9        ancestor, and is forced to composite by a composited child.
     10
     11        * compositing/backing/no-backing-for-clip-overhang-expected.txt: Added.
     12        * compositing/backing/no-backing-for-clip-overhang.html: Added.
     13
    1142013-05-12  Andreas Kling  <akling@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r149967 r149969  
     12013-05-12  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Dropdowns on http://www.exploratorium.edu don't show anything
     4        https://bugs.webkit.org/show_bug.cgi?id=115991
     5
     6        Reviewed by Dan Bernstein.
     7       
     8        We can't optimize away the backing store of a layer by saying that
     9        it paints into a composited ancestor if its composited bounds are not contained
     10        by that ancestor.
     11
     12        Test: compositing/backing/no-backing-for-clip-overhang.html
     13
     14        * rendering/RenderLayerBacking.cpp:
     15        (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Pass in our
     16        previously computed composited bounds relative to our composited ancestor,
     17        and its composited bounds.
     18        * rendering/RenderLayerCompositor.cpp:
     19        (WebCore::RenderLayerCompositor::requiresOwnBackingStore): If the ancestor's
     20        composited bounds don't contain the layer's composited bounds, the layer
     21        needs its own backing store.
     22        * rendering/RenderLayerCompositor.h:
     23
    1242013-05-12  Commit Queue  <commit-queue@webkit.org>
    225
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r149949 r149969  
    859859
    860860    // If this layer was created just for clipping or to apply perspective, it doesn't need its own backing store.
    861     setRequiresOwnBackingStore(compositor()->requiresOwnBackingStore(m_owningLayer, compAncestor));
     861    setRequiresOwnBackingStore(compositor()->requiresOwnBackingStore(m_owningLayer, compAncestor, relativeCompositingBounds, ancestorCompositingBounds));
    862862
    863863    bool didUpdateContentsRect = false;
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r149950 r149969  
    17521752}
    17531753
    1754 bool RenderLayerCompositor::requiresOwnBackingStore(const RenderLayer* layer, const RenderLayer* compositingAncestorLayer) const
     1754bool RenderLayerCompositor::requiresOwnBackingStore(const RenderLayer* layer, const RenderLayer* compositingAncestorLayer, const IntRect& layerCompositedBoundsInAncestor, const IntRect& ancestorCompositedBounds) const
    17551755{
    17561756    RenderObject* renderer = layer->renderer();
     
    17881788            || reason == RenderLayer::IndirectCompositingForPreserve3D; // preserve-3d has to create backing store to ensure that 3d-transformed elements intersect.
    17891789    }
     1790
     1791    if (!ancestorCompositedBounds.contains(layerCompositedBoundsInAncestor))
     1792        return true;
     1793
    17901794    return false;
    17911795}
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.h

    r149691 r149969  
    180180
    181181    // Returns true if the given layer needs it own backing store.
    182     bool requiresOwnBackingStore(const RenderLayer*, const RenderLayer* compositingAncestorLayer) const;
     182    bool requiresOwnBackingStore(const RenderLayer*, const RenderLayer* compositingAncestorLayer, const IntRect& layerCompositedBoundsInAncestor, const IntRect& ancestorCompositedBounds) const;
    183183
    184184    RenderLayer* rootRenderLayer() const;
Note: See TracChangeset for help on using the changeset viewer.