Commit 6fd45a36 authored by smcgruer's avatar smcgruer Committed by Commit Bot

Promote fixed: position elements with composited descendants even if they don't scroll

This is effectively a partial revert of
9b503962 done manually to avoid
reverting de4c1142 which is necessary
for sticky elements.

Bug=742213
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2977273002
Cr-Commit-Position: refs/heads/master@{#487281}
parent 559b70de
......@@ -194,8 +194,11 @@ static CompositingReasons SubtreeReasonsForCompositing(
// We ignore LCD text here because we are required to composite
// scroll-dependant fixed position elements with composited descendants for
// correctness - even if we lose LCD.
//
// TODO(smcgruer): Only composite fixed if needed (http://crbug.com/742213)
const bool ignore_lcd_text = true;
if (compositing_reason_finder.RequiresCompositingForScrollDependentPosition(
if (layer->GetLayoutObject().Style()->GetPosition() == EPosition::kFixed ||
compositing_reason_finder.RequiresCompositingForScrollDependentPosition(
layer, ignore_lcd_text)) {
subtree_reasons |=
kCompositingReasonPositionFixedOrStickyWithCompositedDescendants;
......
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