mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 08:39:22 +00:00
LibWeb: Don't accidentally create a layout node for display: none
This commit is contained in:
parent
7a600e60bc
commit
004d1305c8
Notes:
github-actions[bot]
2025-04-30 10:27:21 +00:00
Author: https://github.com/Gingeh
Commit: 004d1305c8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4529
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 3 additions and 0 deletions
|
@ -529,6 +529,9 @@ GC::Ptr<Layout::Node> Element::create_layout_node(GC::Ref<CSS::ComputedPropertie
|
|||
|
||||
GC::Ptr<Layout::NodeWithStyle> Element::create_layout_node_for_display_type(DOM::Document& document, CSS::Display const& display, GC::Ref<CSS::ComputedProperties> style, Element* element)
|
||||
{
|
||||
if (display.is_none())
|
||||
return {};
|
||||
|
||||
if (display.is_table_inside() || display.is_table_row_group() || display.is_table_header_group() || display.is_table_footer_group() || display.is_table_row())
|
||||
return document.heap().allocate<Layout::Box>(document, element, move(style));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue