1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 12:07:35 +00:00
serenity/Libraries/LibHTML/Layout/ComputedStyle.h
Andreas Kling 7bc9310170 LibHTML: Add a Frame class and use it for document layout width
Each HtmlView now has a main_frame(), which represents the main frame
of the web page. Frame inherits from TreeNode<Frame>, which will allow
us to someday implement a Frame tree (to support the <frame> element.)
2019-10-04 15:50:04 +02:00

32 lines
686 B
C++

#pragma once
#include <LibDraw/Size.h>
#include <LibHTML/CSS/LengthBox.h>
class ComputedStyle {
public:
ComputedStyle();
~ComputedStyle();
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;
};