mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:48:14 +00:00
LibHTML: Rename ComputedStyle to BoxModelMetrics
There was nothing left in ComputedStyle except the box model metrics, so this patch gives it a more representative name. Note that style information is fetched directly from StyleProperties, which is basically the CSS property name/value pairs that apply to an element.
This commit is contained in:
parent
7bc9310170
commit
9c0e9a1a20
7 changed files with 44 additions and 44 deletions
32
Libraries/LibHTML/Layout/BoxModelMetrics.h
Normal file
32
Libraries/LibHTML/Layout/BoxModelMetrics.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibDraw/Size.h>
|
||||
#include <LibHTML/CSS/LengthBox.h>
|
||||
|
||||
class BoxModelMetrics {
|
||||
public:
|
||||
BoxModelMetrics();
|
||||
~BoxModelMetrics();
|
||||
|
||||
LengthBox& margin() { return m_margin; }
|
||||
LengthBox& padding() { return m_padding; }
|
||||
LengthBox& border() { return m_border; }
|
||||
|
||||
const LengthBox& margin() const { return m_margin; }
|
||||
const LengthBox& padding() const { return m_padding; }
|
||||
const LengthBox& border() const { return m_border; }
|
||||
|
||||
struct PixelBox {
|
||||
int top;
|
||||
int right;
|
||||
int bottom;
|
||||
int left;
|
||||
};
|
||||
|
||||
PixelBox full_margin() const;
|
||||
|
||||
private:
|
||||
LengthBox m_margin;
|
||||
LengthBox m_padding;
|
||||
LengthBox m_border;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue