mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibWeb: Store final box model metrics in paint tree, not layout tree
This was a weird case of layout results being stored in the layout tree instead of in the paint tree like everything else.
This commit is contained in:
parent
71cb04d8cb
commit
fb020a3c8f
Notes:
github-actions[bot]
2025-02-17 17:29:27 +00:00
Author: https://github.com/awesomekling
Commit: fb020a3c8f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3603
Reviewed-by: https://github.com/gmta ✅
8 changed files with 65 additions and 58 deletions
32
Libraries/LibWeb/Painting/BoxModelMetrics.h
Normal file
32
Libraries/LibWeb/Painting/BoxModelMetrics.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2025, Andreas Kling <andreas@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/PixelUnits.h>
|
||||
|
||||
namespace Web::Painting {
|
||||
|
||||
struct PixelBox {
|
||||
CSSPixels top { 0 };
|
||||
CSSPixels right { 0 };
|
||||
CSSPixels bottom { 0 };
|
||||
CSSPixels left { 0 };
|
||||
};
|
||||
|
||||
struct BoxModelMetrics {
|
||||
public:
|
||||
PixelBox margin;
|
||||
PixelBox padding;
|
||||
PixelBox border;
|
||||
PixelBox inset;
|
||||
|
||||
PixelBox margin_box() const;
|
||||
PixelBox padding_box() const;
|
||||
PixelBox border_box() const;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue