[LayoutNG] Close hole that let NG flex algorithm run without its flag

We could run NGFlexLayoutAlgorithm for nodes that weren't
LayoutNGFlexibleBox when they had display:flex. We'd been assuming that
all display:flex elements would get a LayoutNGFlexibleBox node, but not
so -- the <details> element always gets a BlockFlow no matter what its
display value is.

That should also probably be changed, but needs an intent to ship and
risks compat issues, so just fix the LayoutNG crash for now.

Bug: 862797
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Ibc42e76f9ea312b6458ca7f7798b8ca6ba69cfdd
Reviewed-on: https://chromium-review.googlesource.com/1139401
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575724}
2 files changed