summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Painting/SVGGraphicsPaintable.h
diff options
context:
space:
mode:
authorAliaksandr Kalenik <kalenik.aliaksandr@gmail.com>2022-11-12 00:07:43 +0300
committerAndreas Kling <kling@serenityos.org>2022-11-15 22:53:47 +0100
commitf3d57e11571b0f2fc1ca5923a9cfd43db390f92c (patch)
tree9a41859f2829218e1e113808695eca6c652dba09 /Userland/Libraries/LibWeb/Painting/SVGGraphicsPaintable.h
parentc1401b37c4bab2a9742594f96cbc6eaee48d7288 (diff)
downloadserenity-f3d57e11571b0f2fc1ca5923a9cfd43db390f92c.zip
LibWeb: Clip hidden overflow by absolute rect of containing block
Since handling overflow: hidden in PaintableBox::before_children_paint while following paint traversal order can't result in correctly computed clip rectangle for elements that create their own stacking context (because before_children_paint is called only for parent but overflow: hidden can be set somewhere deeper but not in direct ancestor), here introduced new function PaintableBox::clip_rect() that computes clip rectangle by looking into containing block. should_clip_overflow flag that disables clip for absolutely positioned elements in before_children_paint and after_children_paint is removed because after changing clip rectangle to be computed from not parent but containing block it is not needed anymore (absolutely positioned item is clipped if it's containing block has hidden overflow)
Diffstat (limited to 'Userland/Libraries/LibWeb/Painting/SVGGraphicsPaintable.h')
-rw-r--r--Userland/Libraries/LibWeb/Painting/SVGGraphicsPaintable.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Painting/SVGGraphicsPaintable.h b/Userland/Libraries/LibWeb/Painting/SVGGraphicsPaintable.h
index 39877db81b..56b1a2e488 100644
--- a/Userland/Libraries/LibWeb/Painting/SVGGraphicsPaintable.h
+++ b/Userland/Libraries/LibWeb/Painting/SVGGraphicsPaintable.h
@@ -13,7 +13,7 @@ namespace Web::Painting {
class SVGGraphicsPaintable : public SVGPaintable {
public:
- virtual void before_children_paint(PaintContext&, PaintPhase, ShouldClipOverflow) const override;
+ virtual void before_children_paint(PaintContext&, PaintPhase) const override;
Layout::SVGGraphicsBox const& layout_box() const;