mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 04:22:28 +00:00
LibWeb: Don't crash in IFC if very first chunk is collapsible whitespace
This commit is contained in:
parent
b732edf61c
commit
f9e8f02451
Notes:
sideshowbarker
2024-07-17 16:39:04 +09:00
Author: https://github.com/awesomekling
Commit: f9e8f02451
1 changed files with 1 additions and 1 deletions
|
@ -232,7 +232,7 @@ void InlineFormattingContext::generate_line_boxes(LayoutMode layout_mode)
|
||||||
auto& item = item_opt.value();
|
auto& item = item_opt.value();
|
||||||
|
|
||||||
// Ignore collapsible whitespace chunks at the start of line, and if the last fragment already ends in whitespace.
|
// Ignore collapsible whitespace chunks at the start of line, and if the last fragment already ends in whitespace.
|
||||||
if (item.is_collapsible_whitespace && line_boxes.last().is_empty_or_ends_in_whitespace())
|
if (item.is_collapsible_whitespace && (line_boxes.is_empty() || line_boxes.last().is_empty_or_ends_in_whitespace()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch (item.type) {
|
switch (item.type) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue