Commit 9ca72e1a authored by Stephen McGruer's avatar Stephen McGruer Committed by Commit Bot

Don't promote position: fixed elements with composited descendants if they don't scroll

This is a re-land of an old CL, which was reverted in https://codereview.chromium.org/2977273002
due to a WebView issue. We believe the underlying issue may have been resolved, so should try
re-landing this.

Bug: 715699
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I0da6ab6f55d0fb4ba0760378f182217e8c4546c1
Reviewed-on: https://chromium-review.googlesource.com/1112387Reviewed-by: default avatarRobert Flack <flackr@chromium.org>
Commit-Queue: Robert Flack <flackr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571143}
parent a22e020d
...@@ -189,11 +189,8 @@ static CompositingReasons SubtreeReasonsForCompositing( ...@@ -189,11 +189,8 @@ static CompositingReasons SubtreeReasonsForCompositing(
// We ignore LCD text here because we are required to composite // We ignore LCD text here because we are required to composite
// scroll-dependant fixed position elements with composited descendants for // scroll-dependant fixed position elements with composited descendants for
// correctness - even if we lose LCD. // correctness - even if we lose LCD.
//
// TODO(smcgruer): Only composite fixed if needed (http://crbug.com/742213)
const bool ignore_lcd_text = true; const bool ignore_lcd_text = true;
if (layer->GetLayoutObject().Style()->GetPosition() == EPosition::kFixed || if (compositing_reason_finder.RequiresCompositingForScrollDependentPosition(
compositing_reason_finder.RequiresCompositingForScrollDependentPosition(
layer, ignore_lcd_text)) { layer, ignore_lcd_text)) {
subtree_reasons |= subtree_reasons |=
CompositingReason::kPositionFixedOrStickyWithCompositedDescendants; CompositingReason::kPositionFixedOrStickyWithCompositedDescendants;
......
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