Changeset 281913 in webkit


Ignore:
Timestamp:
Sep 2, 2021, 2:11:58 AM (4 years ago)
Author:
commit-queue@webkit.org
Message:

Absolutely positioned and negative z-index div with canvas child gets drawn with wrong stacking order
https://bugs.webkit.org/show_bug.cgi?id=217154

Patch by Rob Buis <rbuis@igalia.com> on 2021-09-02
Reviewed by Simon Fraser.

Source/WebCore:

Keep overlap map accurate.

Test: compositing/subtree-div-overlaps-multiple-negative-z-divs.html

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::computeCompositingRequirements):

LayoutTests:

Add test based on bug report test case.

  • compositing/subtree-div-overlaps-multiple-negative-z-divs-expected.html: Added.
  • compositing/subtree-div-overlaps-multiple-negative-z-divs.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r281908 r281913  
     12021-09-02  Rob Buis  <rbuis@igalia.com>
     2
     3        Absolutely positioned and negative z-index div with canvas child gets drawn with wrong stacking order
     4        https://bugs.webkit.org/show_bug.cgi?id=217154
     5
     6        Reviewed by Simon Fraser.
     7
     8        Add test based on bug report test case.
     9
     10        * compositing/subtree-div-overlaps-multiple-negative-z-divs-expected.html: Added.
     11        * compositing/subtree-div-overlaps-multiple-negative-z-divs.html: Added.
     12
    1132021-09-01  Sonia Singla  <ssingla@igalia.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r281910 r281913  
     12021-09-02  Rob Buis  <rbuis@igalia.com>
     2
     3        Absolutely positioned and negative z-index div with canvas child gets drawn with wrong stacking order
     4        https://bugs.webkit.org/show_bug.cgi?id=217154
     5
     6        Reviewed by Simon Fraser.
     7
     8        Keep overlap map accurate.
     9
     10        Test: compositing/subtree-div-overlaps-multiple-negative-z-divs.html
     11
     12        * rendering/RenderLayerCompositor.cpp:
     13        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
     14
    1152021-09-02  Mark Lam  <mark.lam@apple.com>
    216
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r281283 r281913  
    10991099    bool descendantsAddedToOverlap = currentState.hasNonRootCompositedAncestor();
    11001100
     1101    unsigned newlyCompositedChildLayerCount = 0;
    11011102    for (auto* childLayer : layer.negativeZOrderLayers()) {
    11021103        computeCompositingRequirements(&layer, *childLayer, overlapMap, currentState, backingSharingState, anyDescendantHas3DTransform);
     
    11041105        // If we have to make a layer for this child, make one now so we can have a contents layer
    11051106        // (since we need to ensure that the -ve z-order child renders underneath our contents).
    1106         if (!willBeComposited && currentState.subtreeIsCompositing) {
    1107             layer.setIndirectCompositingReason(IndirectCompositingReason::BackgroundLayer);
    1108             layerWillComposite();
    1109         }
     1107        if (!willBeComposited && currentState.subtreeIsCompositing)
     1108            ++newlyCompositedChildLayerCount;
     1109    }
     1110    while (newlyCompositedChildLayerCount--) {
     1111        layer.setIndirectCompositingReason(IndirectCompositingReason::BackgroundLayer);
     1112        layerWillComposite();
    11101113    }
    11111114
Note: See TracChangeset for help on using the changeset viewer.