1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:27:43 +00:00

LibWeb: Convert InlineLevelIterator/LineBox/LineBuilder to new px units

This commit is contained in:
Sam Atkins 2022-11-04 17:19:11 +00:00 committed by Linus Groh
parent 700ba0007f
commit 76047d1932
8 changed files with 74 additions and 74 deletions

View file

@ -121,7 +121,7 @@ void InlineLevelIterator::skip_to_next()
compute_next();
}
Optional<InlineLevelIterator::Item> InlineLevelIterator::next(float available_width)
Optional<InlineLevelIterator::Item> InlineLevelIterator::next(CSSPixels available_width)
{
if (!m_current_node)
return {};
@ -144,7 +144,7 @@ Optional<InlineLevelIterator::Item> InlineLevelIterator::next(float available_wi
m_text_node_context->is_last_chunk = true;
auto& chunk = chunk_opt.value();
float chunk_width = text_node.font().width(chunk.view) + text_node.font().glyph_spacing();
CSSPixels chunk_width = text_node.font().width(chunk.view) + text_node.font().glyph_spacing();
if (m_text_node_context->do_respect_linebreaks && chunk.has_breaking_newline) {
return Item {