[LayoutNG] Fix when 'vertical-align: top' is nested

The 'vertical-align: top' and 'bottom' require the size of
the ancestor line box and thus are put into pending queue
while applying the baseline shift.

When they are nested, processing all pending queue at the
root line box applies the shift multiple times. This patch
puts into the queue of the nearest ancestor that has 'top'
or 'bottom' if exists.

Bug: 877977
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I6541d138267a6e42658b601901b673352e625440
Reviewed-on: https://chromium-review.googlesource.com/1198887
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588042}
3 files changed