The code that attempts to force legacy layout for an entire BFC when a contenteditable element is encountered doesn't always work.
If we have something in the BFC that doesn't generate a layout box, but later on gets a child with a box, we'll fail to use legacy layout on that child. The reason is that we don't update the ForceLegacyLayout on the ComputedStyle for box-less nodes.
See attachment. It uses a display:contents element (which doesn't generate a box, but may have children that do). Later on, we add a regular block child. This one gets an NG object, while all the other objects in the BFC have legacy objects.
A similar problem occurs in shadow DOM. Slot elements don't generate layout boxes by default, but its children may. https://chromium-review.googlesource.com/c/chromium/src/+/1127027 adds DCHECKs that fail if we switch engines within a BFC, and then external/wpt/html/editing/focus/tabindex-focus-flag.html fails: https://test-results.appspot.com/data/layout_results/linux_layout_tests_layout_ng/7841/layout-test-results/results.html
|
Deleted:
tc.html
558 bytes
|
Comment 1 by bugdroid1@chromium.org
, Jul 31