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.


Change-Id: I71d0fcc4b7827b94c7e14a8bc4aa5808741c644f
Reviewed-by: Koji Ishii <>
Commit-Queue: Manuel Rego <>
Cr-Commit-Position: refs/heads/master@{#740231}
2 files changed