More fixes related to visual overflow of legacy inline elements

r727590 introduced a regression regarding visual overflow
of inline elements (inline legacy objects don't know
how to recompute their visual overflow).

An initial fix landed in r736422 but it was not good enough,
we used IsInLayoutNGInlineFormattingContext() to check
if it was a LayoutNG object, but that can be true even with
legacy objects in some situations.
The fix now is to use IsLayoutNGObject() instead.

Apart from that we're moving from IsInline() to !IsLayoutBlock()
(as it was on the old code) because we don't need to relayout
things like "inline-block" as legacy blocks already know
how to recompute the visual overflow.

BUG=1048092,1043927
TEST=ParameterizedLayoutInlineTest.VisualOverflowRecalcLegacyLayoutPositionRelative

Change-Id: I71d0fcc4b7827b94c7e14a8bc4aa5808741c644f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2046983
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Manuel Rego <rego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#740231}
2 files changed