Changeset 268644 in webkit


Ignore:
Timestamp:
Oct 17, 2020 7:36:12 AM (4 years ago)
Author:
Alan Bujtas
Message:

[LFC][Integration] Atomic inline level box run height includes the vertical margin
https://bugs.webkit.org/show_bug.cgi?id=217873

Reviewed by Antti Koivisto.

RenderBox::setLocation takes the border box location. Let's not include the margin before value.
(Atomic inline level box runs include the margin box per spec, see https://www.w3.org/TR/css-inline-3/#line-layout)

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::constructContent):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r268643 r268644  
     12020-10-17  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][Integration] Atomic inline level box run height includes the vertical margin
     4        https://bugs.webkit.org/show_bug.cgi?id=217873
     5
     6        Reviewed by Antti Koivisto.
     7
     8        RenderBox::setLocation takes the border box location. Let's not include the margin before value.
     9        (Atomic inline level box runs include the margin box per spec, see https://www.w3.org/TR/css-inline-3/#line-layout)
     10
     11        * layout/integration/LayoutIntegrationLineLayout.cpp:
     12        (WebCore::LayoutIntegration::LineLayout::constructContent):
     13
    1142020-10-17  Zalan Bujtas  <zalan@apple.com>
    215
  • trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp

    r268641 r268644  
    167167            if (layoutBox.isReplacedBox()) {
    168168                auto& renderer = downcast<RenderBox>(*rendererForLayoutBox(layoutBox));
    169                 const_cast<RenderBox&>(renderer).setLocation(flooredLayoutPoint(runRect.location()));
     169                auto borderBoxLocation = FloatPoint { runRect.x(), runRect.y() + m_layoutState.geometryForBox(layoutBox).marginBefore() };
     170                const_cast<RenderBox&>(renderer).setLocation(flooredLayoutPoint(borderBoxLocation));
    170171            }
    171172        }
Note: See TracChangeset for help on using the changeset viewer.