Fix preferred logical widths of orthogonal writing modes
To compute preferred logical widths of elements with orthogonal writing
modes, this patch keeps track of all orthogonal writing mode roots in
documents, and layout them before computing preferred widths.
OrthogonalWritingModeRootList keeps a list of orthogonal writing mode
roots in FrameView, and layout them in the depth order. Part of
LayoutSubtreeRootList was extracted to DepthOrderedLayoutObjectList to
share the code.
LayoutBox adds or removes themselves to/from the list as needed in
insertedIntoTree(), willBeRemovedFromTree(), and styleDidChange().
FrameView::performLayout() layouts them in the deepest-first order
before computing preferred widths, so that orthogonal children are
!needsLayout() and have logicalHeight() available when preferred logical
widths are needed.
This patch makes the previous partial fix for shrink-to-fit
inline-block[1] unnecessary, so the code and flags added in the patch
are removed.
[1]
https://codereview.chromium.org/1121173002/
BUG=
550963,
473429
Committed:
https://crrev.com/3d7b19bbee5aac29c8efa9df62f08264c478041b
Cr-Commit-Position: refs/heads/master@{#373144}