DL: Optimize PositionAndLayoutOnceIfNeeded() for display locking.

In display locking, we don't process subtrees of locked elements. In
PositionAndLayoutOnceIfNeeded, we can use this information to skip
recursing into layout code, which would abort child layout anyway.

This takes the referenced bug case from 250ms per unlock to 110ms per
unlock.

R=mstensho@chromium.org, ikilpatrick@chromium.org

Bug: 958804
Change-Id: Ied76301cb006894f3160f8243c58f9a753ed8fd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1596837
Commit-Queue: vmpstr <vmpstr@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657251}
1 file changed