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

LibWeb: Extract border-radius normalization code from Box

This is going to be needed by InlineNodes too!

`BorderPainting.{h,cpp}` might not be the best place for it, but it
works for now.
This commit is contained in:
Sam Atkins 2021-09-19 17:46:28 +01:00 committed by Andreas Kling
parent b88641e44b
commit aaf12929d5
4 changed files with 39 additions and 29 deletions

View file

@ -10,6 +10,7 @@
#include <LibGfx/Rect.h>
#include <LibWeb/Layout/LineBox.h>
#include <LibWeb/Layout/Node.h>
#include <LibWeb/Painting/BorderPainting.h>
#include <LibWeb/Painting/StackingContext.h>
namespace Web::Layout {
@ -125,14 +126,7 @@ public:
virtual float width_of_logical_containing_block() const;
struct BorderRadiusData {
float top_left { 0 };
float top_right { 0 };
float bottom_right { 0 };
float bottom_left { 0 };
};
BorderRadiusData normalized_border_radius_data();
Painting::BorderRadiusData normalized_border_radius_data();
protected:
Box(DOM::Document& document, DOM::Node* node, NonnullRefPtr<CSS::StyleProperties> style)