1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:47:37 +00:00

LibWeb: Support overflow: hidden with a border-radius

Note: With this change the border-radius is clipped if ethier the
overflow-x or overflow-y is hidden (it is a little unclear what
happens if just one is set, but it seems like most browsers
treat one set + border-radius the same as if overflow: hidden
was set).
This commit is contained in:
MacDue 2022-07-04 20:49:38 +01:00 committed by Andreas Kling
parent 2ceb143571
commit f283e0ddc5
2 changed files with 53 additions and 5 deletions

View file

@ -7,6 +7,7 @@
#pragma once
#include <LibWeb/Painting/BorderPainting.h>
#include <LibWeb/Painting/BorderRadiusCornerClipper.h>
#include <LibWeb/Painting/Paintable.h>
namespace Web::Painting {
@ -135,6 +136,9 @@ private:
OwnPtr<Painting::StackingContext> m_stacking_context;
Optional<Gfx::FloatRect> mutable m_absolute_rect;
mutable bool m_clipping_overflow { false };
Optional<BorderRadiusCornerClipper> mutable m_overflow_corner_radius_clipper;
};
class PaintableWithLines : public PaintableBox {