2020-01-18 05:38:21 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 05:38:21 -03:00
|
|
|
*/
|
|
|
|
|
|
2019-06-16 08:44:09 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
2020-02-06 08:04:00 -03:00
|
|
|
#include <LibGfx/Size.h>
|
2019-06-16 08:44:09 -03:00
|
|
|
|
2020-11-22 11:53:01 -03:00
|
|
|
namespace Web::Layout {
|
2020-03-07 06:27:02 -03:00
|
|
|
|
2020-06-24 06:22:34 -03:00
|
|
|
struct PixelBox {
|
2020-12-12 17:02:06 -03:00
|
|
|
float top { 0 };
|
|
|
|
|
float right { 0 };
|
|
|
|
|
float bottom { 0 };
|
|
|
|
|
float left { 0 };
|
2020-06-24 06:22:34 -03:00
|
|
|
};
|
2019-06-16 08:44:09 -03:00
|
|
|
|
2020-06-24 06:22:34 -03:00
|
|
|
struct BoxModelMetrics {
|
|
|
|
|
public:
|
2020-12-12 17:02:06 -03:00
|
|
|
PixelBox margin;
|
|
|
|
|
PixelBox padding;
|
|
|
|
|
PixelBox border;
|
|
|
|
|
PixelBox offset;
|
2019-09-25 06:00:50 -03:00
|
|
|
|
2020-12-12 17:02:06 -03:00
|
|
|
PixelBox margin_box() const;
|
|
|
|
|
PixelBox padding_box() const;
|
|
|
|
|
PixelBox border_box() const;
|
2019-06-16 08:44:09 -03:00
|
|
|
};
|
2020-03-07 06:27:02 -03:00
|
|
|
|
|
|
|
|
}
|