[Webkit-unassigned] [Bug 243940] REGRESSION(252825 at main): wpt /css/CSS2/visudet/inline-block-baseline-011.xht & inline-block-baseline-014.xht
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Aug 16 09:11:49 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=243940
--- Comment #4 from zalan <zalan at apple.com> ---
Not forcing integral rounding fixes the issue (see below). So while 252825 at main looks like the regression point, it never worked in IFC either, it was just covered by the directional rounding bug -which got corrected in 252825 at main.
The actual cause of this bug is the explicit rounding we need to do in IFC to match legacy line layout behavior.
diff --git a/Source/WebCore/layout/formattingContexts/inline/InlineLevelBox.h b/Source/WebCore/layout/formattingContexts/inline/InlineLevelBox.h
index 0ac8876b9a15..16420dd6b53c 100644
--- a/Source/WebCore/layout/formattingContexts/inline/InlineLevelBox.h
+++ b/Source/WebCore/layout/formattingContexts/inline/InlineLevelBox.h
@@ -123,11 +123,11 @@ private:
// FIXME: Remove legacy rounding.
void setLogicalWidth(InlineLayoutUnit logicalWidth) { m_logicalRect.setWidth(logicalWidth); }
- void setLogicalHeight(InlineLayoutUnit logicalHeight) { m_logicalRect.setHeight(roundToInt(logicalHeight)); }
- void setLogicalTop(InlineLayoutUnit logicalTop) { m_logicalRect.setTop(logicalTop >= 0 ? roundToInt(logicalTop) : -roundToInt(-logicalTop)); }
- void setAscent(InlineLayoutUnit ascent) { m_ascent = roundToInt(ascent); }
- void setDescent(InlineLayoutUnit descent) { m_descent = roundToInt(descent); }
- void setLayoutBounds(const LayoutBounds& layoutBounds) { m_layoutBounds = { InlineLayoutUnit(roundToInt(layoutBounds.ascent)), InlineLayoutUnit(roundToInt(layoutBounds.descent)) }; }
+ void setLogicalHeight(InlineLayoutUnit logicalHeight) { m_logicalRect.setHeight(logicalHeight); }
+ void setLogicalTop(InlineLayoutUnit logicalTop) { m_logicalRect.setTop(logicalTop); }
+ void setAscent(InlineLayoutUnit ascent) { m_ascent = ascent; }
+ void setDescent(InlineLayoutUnit descent) { m_descent = descent; }
+ void setLayoutBounds(const LayoutBounds& layoutBounds) { m_layoutBounds = { InlineLayoutUnit(layoutBounds.ascent), InlineLayoutUnit(layoutBounds.descent) }; }
void setIsFirstBox() { m_isFirstWithinLayoutBox = true; }
void setIsLastBox() { m_isLastWithinLayoutBox = true; }
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220816/376933dd/attachment-0001.htm>
More information about the webkit-unassigned
mailing list