diff --git a/LayoutTests/fast/multicol/legend-in-column-outline-auto-crash-expected.txt b/LayoutTests/fast/multicol/legend-in-column-outline-auto-crash-expected.txt new file mode 100644 index 000000000000..2f695e8cd611 --- /dev/null +++ b/LayoutTests/fast/multicol/legend-in-column-outline-auto-crash-expected.txt @@ -0,0 +1 @@ +Test passes if there is no crash. diff --git a/LayoutTests/fast/multicol/legend-in-column-outline-auto-crash.html b/LayoutTests/fast/multicol/legend-in-column-outline-auto-crash.html new file mode 100644 index 000000000000..0e77c14f9b10 --- /dev/null +++ b/LayoutTests/fast/multicol/legend-in-column-outline-auto-crash.html @@ -0,0 +1,17 @@ + + + +
+
+ foo +
+
diff --git a/Source/WebCore/rendering/RenderObject.cpp b/Source/WebCore/rendering/RenderObject.cpp index 87b689aad721..89fd6948984d 100644 --- a/Source/WebCore/rendering/RenderObject.cpp +++ b/Source/WebCore/rendering/RenderObject.cpp @@ -918,7 +918,7 @@ void RenderObject::propagateRepaintToParentWithOutlineAutoIfNeeded(const RenderL // Issue repaint on the renderer with outline: auto. for (const auto* renderer = this; renderer; renderer = renderer->parent()) { const auto* originalRenderer = renderer; - if (is(renderer->previousSibling())) { + if (is(renderer->previousSibling()) && !renderer->isLegend()) { auto previousMultiColumnSet = downcast(renderer->previousSibling()); auto enclosingMultiColumnFlow = previousMultiColumnSet->multiColumnFlow(); auto& previousMultiColumnSetBox = downcast(*renderer);