Avoid unnecessary relayout of floats when not paginated.

Made a mistake when excluding floats from being considered for pagination
relayout skipping, by ALWAYS marking them for layout, EVEN WHEN NOT PAGINATED.
Make sure that we check that we're paginated first. No need to slow down layout
when not paginated.

Broke the logic for determining whether we need layout or not into a separate
method, so that we don't need a quarter of a dozen calls to
setChildNeedsLayout(). The logic is now reversed; rather than checking if we
don't need layout, we check if we DO need layout. Tried to make the code a bit
clearer, and document what goes on at each step.

Review-Url: https://codereview.chromium.org/2459293004
Cr-Commit-Position: refs/heads/master@{#429051}
2 files changed