Commit fe02d573 authored by Manuel Rego Casasnovas's avatar Manuel Rego Casasnovas Committed by Commit Bot

Stop marking containers if overflow recalc flag is present

Basically we can avoid marking all the ancestors
in LayoutObject::MarkContainerChainForOverflowRecalcIfNeeded()
if the overflow recalc flags are already set.

BUG=941180

Change-Id: Ic8480a8d7a9fd7a2b7f35ff9ffb4ae10742098e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2028228Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: Manuel Rego <rego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#738875}
parent 8f2f4243
......@@ -2011,9 +2011,18 @@ void LayoutObject::MarkContainerChainForOverflowRecalcIfNeeded(
? object->Parent()
: object->Container();
if (object) {
if (mark_container_chain_layout_overflow_recalc)
bool no_changes = true;
if (mark_container_chain_layout_overflow_recalc &&
!object->SelfNeedsLayoutOverflowRecalc()) {
object->SetChildNeedsLayoutOverflowRecalc();
object->MarkSelfPaintingLayerForVisualOverflowRecalc();
no_changes = false;
}
if (!object->SelfPaintingLayerNeedsVisualOverflowRecalc()) {
object->MarkSelfPaintingLayerForVisualOverflowRecalc();
no_changes = false;
}
if (no_changes)
return;
}
} while (object);
......
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