Need to reposition an out-of-flow object *before* re-paginating it.

https://codereview.chromium.org/1343163005 removed code that was actually
needed. Instead of simply reverting the necessary parts, I rewrote them.
The old code called updateLogicalHeight() before layout, when all it wanted to
do was set the logical top. This made me a bit uneasy, because that could in
theory prevent the height change from being detected during layout() (and
LayoutBlockFlow::layoutBlockFlow() would for instance fail to set
|relayoutChildren| before calling layoutPositionedObjects()). Furthermore, it
used to check if the child establishes a writing mode root, and update the
logical *width* instead of height in that case. That's unnecessary and
potentially harmful (preventing the width change from being detected during
layout()). If the child establishes a new writing mode, it becomes opaque as
far as pagination is concerned, so no need to handle this.

BUG=544783
R=leviw@chromium.org

Review URL: https://codereview.chromium.org/1415623002

Cr-Commit-Position: refs/heads/master@{#354815}
3 files changed