diff --git a/Libraries/LibWeb/Painting/MarkerPaintable.cpp b/Libraries/LibWeb/Painting/MarkerPaintable.cpp index b17053edc46..5eb0680f6ef 100644 --- a/Libraries/LibWeb/Painting/MarkerPaintable.cpp +++ b/Libraries/LibWeb/Painting/MarkerPaintable.cpp @@ -32,6 +32,9 @@ constexpr float sin_60_deg = 0.866025403f; void MarkerPaintable::paint(PaintContext& context, PaintPhase phase) const { + if (!is_visible()) + return; + if (phase == PaintPhase::Overlay) PaintableBox::paint(context, phase); if (phase != PaintPhase::Foreground) diff --git a/Libraries/LibWeb/Painting/SVGForeignObjectPaintable.cpp b/Libraries/LibWeb/Painting/SVGForeignObjectPaintable.cpp index 5e92358ac1a..ea0fadf5a69 100644 --- a/Libraries/LibWeb/Painting/SVGForeignObjectPaintable.cpp +++ b/Libraries/LibWeb/Painting/SVGForeignObjectPaintable.cpp @@ -33,6 +33,9 @@ TraversalDecision SVGForeignObjectPaintable::hit_test(CSSPixelPoint position, Hi void SVGForeignObjectPaintable::paint(PaintContext& context, PaintPhase phase) const { + if (!is_visible()) + return; + PaintableWithLines::paint(context, phase); } diff --git a/Tests/LibWeb/Ref/expected/css/hidden-list-item-markers-ref.html b/Tests/LibWeb/Ref/expected/css/hidden-list-item-markers-ref.html new file mode 100644 index 00000000000..6670f1bde1e --- /dev/null +++ b/Tests/LibWeb/Ref/expected/css/hidden-list-item-markers-ref.html @@ -0,0 +1,2 @@ + +There should be nothing visible below. diff --git a/Tests/LibWeb/Ref/input/css/hidden-list-item-markers.html b/Tests/LibWeb/Ref/input/css/hidden-list-item-markers.html new file mode 100644 index 00000000000..97beef174ac --- /dev/null +++ b/Tests/LibWeb/Ref/input/css/hidden-list-item-markers.html @@ -0,0 +1,25 @@ + + + +There should be nothing visible below. +