mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:27:34 +00:00
LibWeb: Introduce struct to hold border radii and normalize once
The struct BorderRadiusData contains the four radii of the box. In case the specified borders are too large for the dimensions of the box, they get scaled down.
This commit is contained in:
parent
c31046d952
commit
7a566e54e5
2 changed files with 44 additions and 10 deletions
|
@ -121,6 +121,16 @@ public:
|
|||
|
||||
virtual float width_of_logical_containing_block() const;
|
||||
|
||||
struct BorderRadiusData {
|
||||
// FIXME: Use floats here
|
||||
int top_left { 0 };
|
||||
int top_right { 0 };
|
||||
int bottom_right { 0 };
|
||||
int bottom_left { 0 };
|
||||
};
|
||||
|
||||
BorderRadiusData normalized_border_radius_data();
|
||||
|
||||
protected:
|
||||
Box(DOM::Document& document, DOM::Node* node, NonnullRefPtr<CSS::StyleProperties> style)
|
||||
: NodeWithStyleAndBoxModelMetrics(document, node, move(style))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue