mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 18:00:16 +00:00
LibWeb: Store overflow data in the FormattingState
This commit is contained in:
parent
92266d2247
commit
2615728d6b
Notes:
sideshowbarker
2024-07-17 18:25:43 +09:00
Author: https://github.com/awesomekling
Commit: 2615728d6b
4 changed files with 15 additions and 14 deletions
|
@ -8,8 +8,8 @@
|
|||
|
||||
#include <AK/HashMap.h>
|
||||
#include <LibGfx/Point.h>
|
||||
#include <LibWeb/Layout/Box.h>
|
||||
#include <LibWeb/Layout/LineBox.h>
|
||||
#include <LibWeb/Layout/Node.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
|
@ -53,6 +53,15 @@ struct FormattingState {
|
|||
|
||||
float border_box_width() const { return border_box_left() + content_width + border_box_right(); }
|
||||
float border_box_height() const { return border_box_top() + content_height + border_box_bottom(); }
|
||||
|
||||
OwnPtr<Layout::Box::OverflowData> overflow_data;
|
||||
|
||||
Layout::Box::OverflowData& ensure_overflow_data()
|
||||
{
|
||||
if (!overflow_data)
|
||||
overflow_data = make<Layout::Box::OverflowData>();
|
||||
return *overflow_data;
|
||||
}
|
||||
};
|
||||
|
||||
void commit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue