DL: Handle forced unlocks due to containment requirement

When we force unlock an element (because it doesn't have
style/layout containment) just after style recalc is finished
for that element, we might end up in a state where we still have
style/layout dirty descendants but the element is already unlocked and
style recalc had finished. This CL updates the descendant style recalc
blocking checks so that they can handle cases where the previously-locked
parent got unlocked suddenly.

Also we previously skip the containment checks when the child is dirty
or when we've blocked style recalc on its descendants, even though those
won't affect containment on the locked element itself. With this CL,
we will only skip containment checks when the element itself is dirty.

Bug: 955311,961567,940317
Change-Id: If8c4aa1befc187e3e05b1cfb9460885a87b4527e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1604389
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: vmpstr <vmpstr@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661555}
5 files changed