[DL] Don't immediately update the locked element frame rect.

This patch ensures that we do layout in a pending frame rect, which is
only put in place for children of the locked element during layout.

After the promise is resolved, we put the pending frame rect as the
active one and ensure that we relayout the previously locked box itself.

This means that if the promise resolution, for example, removed the
element as is the case in

Then we never commit what was a pending layout and never see a flash
of laid out content.

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

Bug: 907613, 882663
Change-Id: I7d03ae73ea4cb96c17ce8bb4162718155c2072be
Reviewed-on: https://chromium-review.googlesource.com/c/1358969
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614373}
7 files changed