• Philip Rogers's avatar
    Reland "Fix background painting on scrolling contents layer with foregrounds" · bea4d986
    Philip Rogers authored
    This reverts commit e06da142.
    
    Reason for revert: Was not the root cause of test failures.
    
    Original change's description:
    > Revert "Fix background painting on scrolling contents layer with foregrounds"
    > 
    > This reverts commit 7834ee21.
    > 
    > Reason for revert: Suspected as causing failing tests in 874162
    > 
    > Original change's description:
    > > Fix background painting on scrolling contents layer with foregrounds
    > > 
    > > This patch removes a negative z-index children check from
    > > PaintLayer::GetBackgroundPaintLocation. This lets backgrounds paint in
    > > the scrolling contents layer in the presence of negative z-index
    > > children, fixing the painting of background-attachment: local. This
    > > patch also removes a DCHECK that was hit when a foreground layer and
    > > kBackgroundPaintInScrollingContents coexisted. This DCHECK[1] could be
    > > hit for root layers without the functional change in this patch. As the
    > > test in this patch shows, kBackgroundPaintInScrollingContents and
    > > foreground layers work together, so this patch makes non-root-layers use
    > > both, and removes the DCHECK.
    > > 
    > > What are foreground layers? A foreground layer is created if a stacked
    > > PaintLayer has composited negative z-index children that should wedge
    > > between the layer's background and the layer's contents. The foreground
    > > layer will have the normal-flow contents in this case. See the comment
    > > above foreground_layer_ in composited_layer_mapping.h.
    > > 
    > > [1] DCHECK originally added in: https://crrev.com/9a2cdc8d96d. Reading
    > > the comments, I think the DCHECK was intended to ensure the background
    > > would not be painted into the foreground layer.
    > > 
    > > Bug: 861948
    > > Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
    > > Change-Id: I7409cbe9ac61fed444856df342d0707d6babab09
    > > Reviewed-on: https://chromium-review.googlesource.com/1173532
    > > Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
    > > Commit-Queue: Philip Rogers <pdr@chromium.org>
    > > Cr-Commit-Position: refs/heads/master@{#584802}
    > 
    > TBR=pdr@chromium.org,chrishtr@chromium.org
    > 
    > Change-Id: Ifd22a963dbd5ce288dfb31ab1e8ac41ebe63062d
    > No-Presubmit: true
    > No-Tree-Checks: true
    > No-Try: true
    > Bug: 861948
    > Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
    > Reviewed-on: https://chromium-review.googlesource.com/1184109
    > Reviewed-by: Philip Rogers <pdr@chromium.org>
    > Commit-Queue: Philip Rogers <pdr@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#584895}
    
    TBR=pdr@chromium.org,chrishtr@chromium.org
    
    Change-Id: I569313a9d5e1dd0b79e541cc3e3ae8816c4c3e05
    No-Presubmit: true
    No-Tree-Checks: true
    No-Try: true
    Bug: 861948
    Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
    Reviewed-on: https://chromium-review.googlesource.com/1184181Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
    Commit-Queue: Philip Rogers <pdr@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#584911}
    bea4d986
scrolling-background-with-negative-z-child-expected.html 377 Bytes