1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:38:11 +00:00

LibWeb: Move position and text-align to LayoutStyle

This commit is contained in:
Andreas Kling 2020-06-24 14:34:40 +02:00
parent 6f28f08096
commit 959464fce4
6 changed files with 25 additions and 37 deletions

View file

@ -35,7 +35,7 @@ namespace Web {
void LineBox::add_fragment(const LayoutNode& layout_node, int start, int length, int width, int height)
{
bool text_align_is_justify = layout_node.text_align() == CSS::TextAlign::Justify;
bool text_align_is_justify = layout_node.style().text_align() == CSS::TextAlign::Justify;
if (!text_align_is_justify && !m_fragments.is_empty() && &m_fragments.last().layout_node() == &layout_node) {
// The fragment we're adding is from the last LayoutNode on the line.
// Expand the last fragment instead of adding a new one with the same LayoutNode.