Commit 4fe211a9 authored by Chris Harrelson's avatar Chris Harrelson Committed by Commit Bot

Look recursively for composited scrollers, not just stopping

at the enclosing scrolling ancestor.

Bug: 903067
Change-Id: Ice5deb0047862fa72a47e34b1f54f6a6955ae56c
Reviewed-on: https://chromium-review.googlesource.com/c/1336784Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608382}
parent c4f56158
<table style="width: 700px; background: white;">
<td style="position: relative">
test
</td>
</table>
<!doctype HTML>
<style>
::-webkit-scrollbar {
display: none;
}
</style>
<div style="position: fixed; overflow: auto;">
<div style="height: 700px; position: fixed; overflow: auto;">
<div style="height: 900px; position: relative;">
<div style="width: 400px; overflow: auto;">
<table style="width: 700px; background: white;">
<td style="position: relative">
test
</td>
</table>
</div>
</div>
</div>
</div>
......@@ -272,11 +272,18 @@ void CompositingRequirementsUpdater::UpdateRecursive(
CompositingReasons reasons_to_composite = CompositingReason::kNone;
CompositingReasons direct_reasons = CompositingReason::kNone;
bool has_non_root_composited_scrolling_ancestor =
layer->AncestorScrollingLayer() &&
layer->AncestorScrollingLayer()->GetScrollableArea() &&
layer->AncestorScrollingLayer()->NeedsCompositedScrolling() &&
!layer->AncestorScrollingLayer()->IsRootLayer();
bool has_non_root_composited_scrolling_ancestor = false;
const PaintLayer* ancestor_scrolling_layer = layer->AncestorScrollingLayer();
while (ancestor_scrolling_layer &&
ancestor_scrolling_layer->GetScrollableArea()) {
if (ancestor_scrolling_layer->NeedsCompositedScrolling() &&
!ancestor_scrolling_layer->IsRootLayer()) {
has_non_root_composited_scrolling_ancestor = true;
break;
}
ancestor_scrolling_layer =
ancestor_scrolling_layer->AncestorScrollingLayer();
}
bool use_clipped_bounding_rect = !has_non_root_composited_scrolling_ancestor;
......
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