mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Allow style inheritance through slots
When a subtree is projected through a slot, its root now inherits style from the slot's parent, rather than the parent of the unprojected root. This fixes a ton of subtle issues, and is very noticeable on Reddit.
This commit is contained in:
committed by
Andreas Kling
parent
ba62679a7a
commit
9208a54b0b
Notes:
github-actions[bot]
2025-08-16 19:04:51 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/9208a54b0bf Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5873
@@ -27,6 +27,7 @@ public:
|
||||
GC::Ptr<Layout::NodeWithStyle const> layout_node() const { return const_cast<AbstractElement*>(this)->layout_node(); }
|
||||
|
||||
GC::Ptr<Element const> parent_element() const;
|
||||
GC::Ptr<Element const> element_to_inherit_style_from() const;
|
||||
Optional<AbstractElement> previous_in_tree_order() { return walk_layout_tree(WalkMethod::Previous); }
|
||||
Optional<AbstractElement> previous_sibling_in_tree_order() { return walk_layout_tree(WalkMethod::PreviousSibling); }
|
||||
bool is_before(AbstractElement const&) const;
|
||||
|
||||
Reference in New Issue
Block a user