mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 13:17:34 +00:00
LibWeb: Move border-painting code out of Box
The logic here is needed by InlineNode too. Moving it into a `paint_all_borders()` function makes it available to them both, as well as anyone else who wants it. :^)
This commit is contained in:
parent
eb07668589
commit
e1f3fb0146
3 changed files with 147 additions and 130 deletions
|
@ -25,6 +25,13 @@ enum class BorderEdge {
|
|||
Bottom,
|
||||
Left,
|
||||
};
|
||||
void paint_border(PaintContext&, BorderEdge, const Gfx::FloatRect&, const CSS::ComputedValues&);
|
||||
struct BordersData {
|
||||
CSS::BorderData top;
|
||||
CSS::BorderData right;
|
||||
CSS::BorderData bottom;
|
||||
CSS::BorderData left;
|
||||
};
|
||||
void paint_border(PaintContext& context, BorderEdge edge, Gfx::FloatRect const& rect, BorderRadiusData const& border_radius_data, BordersData const& borders_data);
|
||||
void paint_all_borders(PaintContext& context, Gfx::FloatRect const& bordered_rect, BorderRadiusData const& border_radius_data, BordersData const&);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue