[LayoutNG] Inline static position and OOFDescendant propagation

This patch computes static position in inline layout, and propagates
OOFDescendants up the fragment tree.

kojii: I've added NGInlineLayoutAlgorithm::CurrentDirection method. 
Rename suggestions welcome.

Interesting bits:

1) LayoutBlock::LayoutPositionedObject 
LayoutBlock::LayoutPositionedObject had to be modified because it would
relayout already positioned OOF. The way it decided relayout was 
needed was by positioning the element, and then comparing its position
to position it already had. NG and Legacy would disagree here by a
fraction of a pixel, and this would trigger relayout.

My fix skips this check if LayoutNGBlockFlow is a containing block.

2) Failing tests: there are 23 new failures, and 159 passes.

I've examined the failures. Will need help from inline team on 2a, 2b
and 2c.

2a) DCHECK inline_size < 0
animations/interpolation/letter-spacing-interpolation.html
animations/interpolation/word-spacing-interpolation.html
fast/inline/empty-inline-create-linebox.html
fast/text/text-large-negative-letter-spacing-with-opacity.html
fast/text/text-letter-spacing.html
fast/text/international/rtl-negative-letter-spacing.html
css2.1/t0803-c5502-imrgn-r-03-b-a.html
css2.1/t0804-c5507-ipadn-r-03-b-a.html

2b) bad static position. Block is being positioned by inline-layout-algorithm,
instead of block-layout-algorithm. Should start a new line
external/wpt/css/CSS2/normal-flow/block-non-replaced-width-001.xht
external/wpt/css/CSS2/normal-flow/inline-block-replaced-height-004.xht
external/wpt/css/CSS2/normal-flow/inline-block-replaced-height-005.xht
external/wpt/css/CSS2/normal-flow/inline-block-replaced-height-007.xht
external/wpt/css/CSS2/normal-flow/inline-replaced-height-004.xht
external/wpt/css/CSS2/normal-flow/inline-replaced-height-005.xht
external/wpt/css/CSS2/normal-flow/inline-replaced-height-007.xht
fast/css/sticky/sticky-vertically-overconstrained.html

2c) <span> has many <br>. NG includes <br> in line height, Legacy does not. FF
  does not at all
fast/replaced/absolute-position-percentage-height.html

2d) passes on reload. Content might not be laid out when document.onload() fires
Fully correct (like FF), unlike Legacy which fails 2 tests.
fast/box-sizing/replaced.html

2e) some relayout multicol weirdness
fast/multicol/dynamic/relayout-abspos-in-relpos-spanner.html
ietestcenter/css3/multicolumn/column-containing-block-001.htm
ietestcenter/css3/multicolumn/column-width-applies-to-008.htm
ietestcenter/css3/multicolumn/column-width-applies-to-014.htm

2f) unusual test: svg, shadow roots, i am not sure what is going on
svg/foreign-object-under-shadow-root-under-hidden.html



Bug: 740993
Change-Id: I0eab6ec0ee87bdb10c9a69df0e18f19bcaafef68
Reviewed-on: https://chromium-review.googlesource.com/738870
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513087}
6 files changed