mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-06 02:55:49 +03:00
LibWeb: Remove unnecessary check for 0-sized fragments in InlineNode
We should no longer be generating empty fragments at the start and end of an InlineNode, so we can drop this check.
This commit is contained in:
parent
3ad08a932c
commit
d30cbf5d72
Notes:
sideshowbarker
2024-07-17 19:44:51 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/d30cbf5d726
@ -101,10 +101,6 @@ void InlineNode::for_each_fragment(Callback callback)
|
||||
containing_block()->for_each_fragment([&](auto& fragment) {
|
||||
if (!is_inclusive_ancestor_of(fragment.layout_node()))
|
||||
return IterationDecision::Continue;
|
||||
// FIXME: This skips the 0-width fragments at the start and end of the InlineNode.
|
||||
// A better solution would be to not generate them in the first place.
|
||||
if (fragment.width() == 0 || fragment.height() == 0)
|
||||
return IterationDecision::Continue;
|
||||
return callback(fragment);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user