Commit d3ce83ab authored by Philip Rogers's avatar Philip Rogers Committed by Commit Bot

Remove kScrollChildWithCompositedDescendants

This was added in https://crbug.com/470640 which predated the cc scroll
tree.

Change-Id: If47c0665f90b16f5b134d81d2388c1349af77cd0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2102628Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750309}
parent 358ce30e
...@@ -163,9 +163,6 @@ CompositingLayerAssigner::GetReasonsPreventingSquashing( ...@@ -163,9 +163,6 @@ CompositingLayerAssigner::GetReasonsPreventingSquashing(
if (layer->ScrollsWithRespectTo(&squashing_layer)) if (layer->ScrollsWithRespectTo(&squashing_layer))
return SquashingDisallowedReason::kScrollsWithRespectToSquashingLayer; return SquashingDisallowedReason::kScrollsWithRespectToSquashingLayer;
if (layer->ScrollParent() && layer->HasCompositingDescendant())
return SquashingDisallowedReason::kScrollChildWithCompositedDescendants;
if (layer->OpacityAncestor() != squashing_layer.OpacityAncestor()) if (layer->OpacityAncestor() != squashing_layer.OpacityAncestor())
return SquashingDisallowedReason::kOpacityAncestorMismatch; return SquashingDisallowedReason::kOpacityAncestorMismatch;
......
...@@ -56,10 +56,6 @@ constexpr SquashingDisallowedReasonStringMap ...@@ -56,10 +56,6 @@ constexpr SquashingDisallowedReasonStringMap
"squashingNearestFixedPositionMismatch", "squashingNearestFixedPositionMismatch",
"Cannot be squashed because this layer has a different nearest fixed " "Cannot be squashed because this layer has a different nearest fixed "
"position layer than the squashing layer"}, "position layer than the squashing layer"},
{SquashingDisallowedReason::kScrollChildWithCompositedDescendants,
"scrollChildWithCompositedDescendants",
"Squashing a scroll child with composited descendants is not "
"supported."},
{SquashingDisallowedReason::kSquashingLayerIsAnimating, {SquashingDisallowedReason::kSquashingLayerIsAnimating,
"squashingLayerIsAnimating", "squashingLayerIsAnimating",
"Cannot squash into a layer that is animating."}, "Cannot squash into a layer that is animating."},
......
...@@ -24,7 +24,6 @@ using SquashingDisallowedReasons = unsigned; ...@@ -24,7 +24,6 @@ using SquashingDisallowedReasons = unsigned;
V(SquashingLayoutEmbeddedContentIsDisallowed) \ V(SquashingLayoutEmbeddedContentIsDisallowed) \
V(SquashingBlendingIsDisallowed) \ V(SquashingBlendingIsDisallowed) \
V(NearestFixedPositionMismatch) \ V(NearestFixedPositionMismatch) \
V(ScrollChildWithCompositedDescendants) \
V(SquashingLayerIsAnimating) \ V(SquashingLayerIsAnimating) \
V(RenderingContextMismatch) \ V(RenderingContextMismatch) \
V(FragmentedContent) \ V(FragmentedContent) \
......
...@@ -29,9 +29,6 @@ virtual/web-components-v0-disabled/* [ Skip ] ...@@ -29,9 +29,6 @@ virtual/web-components-v0-disabled/* [ Skip ]
# Can't rebaseline because the file path is too long. # Can't rebaseline because the file path is too long.
virtual/compositor_threaded_scrollbar_scrolling/paint/invalidation/scroll/sticky/invalidate-after-composited-scroll-with-sticky.html [ Skip ] virtual/compositor_threaded_scrollbar_scrolling/paint/invalidation/scroll/sticky/invalidate-after-composited-scroll-with-sticky.html [ Skip ]
# This test doesn't apply to CompositeAfterPaint.
compositing/squashing/do-not-squash-scroll-child-with-composited-descendants.html [ Skip ]
# Fail before CompositeAfterPaint but pass with it. # Fail before CompositeAfterPaint but pass with it.
crbug.com/802915 css3/blending/isolation-should-include-non-local-background.html [ Pass ] crbug.com/802915 css3/blending/isolation-should-include-non-local-background.html [ Pass ]
crbug.com/918155 virtual/prefer_compositing_to_lcd_text/scrollbars/overlay-scrollbar-over-child-layer-nested-2.html [ Pass ] crbug.com/918155 virtual/prefer_compositing_to_lcd_text/scrollbars/overlay-scrollbar-over-child-layer-nested-2.html [ Pass ]
......
Verifies that scroll children with composited descendants do not squash.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS successfullyParsed is true
TEST COMPLETE
PASS scrollChildDoesNotSquash(layers) is true
<!DOCTYPE HTML>
<style>
#scroller {
width: 200px;
height: 200px;
border: 1px solid black;
overflow: scroll;
}
.scrolled {
width: 100px;
height: 100px;
background: papayawhip;
border: 1px solid black;
margin: 10px;
position: relative;
}
#fixed {
width: 80px;
height: 80px;
background: blue;
will-change: transform;
position: fixed;
top: 0px;
left: 0px;
}
#composited {
width: 20px;
height: 20px;
background: green;
position: relative;
will-change: transform;
}
#unsquashed {
z-index: 1;
}
</style>
<div id="scroller">
<div id="fixed"></div>
<div class="scrolled"></div>
<div class="scrolled"></div>
<div id="unsquashed" class="scrolled">
<div id="composited"></div>
</div>
</div>
<script src='../../resources/js-test.js'></script>
<script>
description('Verifies that scroll children with composited descendants' +
' do not squash.');
if (window.internals)
internals.settings.setPreferCompositingToLCDTextEnabled(true);
function scrollChildDoesNotSquash(layers) {
var foundParent = false;
var foundChild = false;
layers["layers"].forEach(function(layer) {
// If the child's bounds are 20x20, we're the scroll child with the
// composited descendant. We should not have squashed and therefore our
// bounds should remain 102x102 (100x100 plus the 1px border).
if (layer.bounds && layer.bounds[0] == 20 && layer.bounds[1] == 20)
foundChild = true;
if (layer.bounds && layer.bounds[0] == 102 && layer.bounds[1] == 102)
foundParent = true;
});
return foundParent && foundChild;
}
onload = function() {
if (!window.internals)
return;
layers = JSON.parse(internals.layerTreeAsText(document));
shouldBe('scrollChildDoesNotSquash(layers)', 'true');
};
</script>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment