Make DefinitelyNewFormattingContext return true for SVG foreignObject
An SVG foreignObject element currently always forces legacy layout [1]. Additionally, when such an element has visible overflow, DefinitelyNewFormattingContext returns a false negative, causing all the siblings of the SVG root to also fallback to legacy layout. However, SVG foreignObject elements always establish a new formatting context since they are treated as absolutely-positioned [2]. This CL fixes the bug by making DefinitelyNewFormattingContext always return true for an SVG foreignObject element. The fix is verified using a MathML test copied from integration-4.html, the one used for MathML-in-foreignObject support [1], with the assumption that MathML will never be implemented for legacy layout. Bug: 989920, 6606 [1] crbug.com/989916 [2] https://svgwg.org/svg2-draft/embedded.html#Placement Change-Id: I7f7cde90da728f1b1959728d39fed2e2070888f9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2400378Reviewed-by:Morten Stenshorne <mstensho@chromium.org> Commit-Queue: Frédéric Wang <fwang@igalia.com> Cr-Commit-Position: refs/heads/master@{#805363}
Showing
Please register or sign in to comment