mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 17:47:44 +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
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