mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-19 15:58:56 +00:00
LibWeb: Apply CSS clip
property to an element as well as its children
d06d4eb
made the `clip` property apply to children of an absolute-
positioned element, but caused it not to be applied to the element the
property was applied to directly.
To fix this, apply the clip in new `before_paint()` and `after_paint()`
functions. Doing so keeps painter state from leaking from `paint()`,
but still allows subclasses of `PaintableBox` clip their contents
correctly without repeating the application of the clip rectangle.
This commit is contained in:
parent
2e45306d42
commit
9d4a1ac2b3
Notes:
sideshowbarker
2024-07-17 03:00:02 +09:00
Author: https://github.com/Zaggy1024
Commit: 9d4a1ac2b3
Pull-request: https://github.com/SerenityOS/serenity/pull/20881
Reviewed-by: https://github.com/kalenikaliaksandr ✅
4 changed files with 47 additions and 9 deletions
|
@ -109,6 +109,9 @@ public:
|
|||
return TraversalDecision::Continue;
|
||||
}
|
||||
|
||||
virtual void before_paint(PaintContext&, PaintPhase) const { }
|
||||
virtual void after_paint(PaintContext&, PaintPhase) const { }
|
||||
|
||||
virtual void paint(PaintContext&, PaintPhase) const { }
|
||||
|
||||
virtual void before_children_paint(PaintContext&, PaintPhase) const { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue