Changeset 275594 in webkit
- Timestamp:
- Apr 7, 2021 2:03:08 AM (3 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r275593 r275594 1 2021-04-07 Rob Buis <rbuis@igalia.com> 2 3 Make synthesizedBaselineFromContentBox return LayoutUnit 4 https://bugs.webkit.org/show_bug.cgi?id=224234 5 6 Reviewed by Javier Fernandez. 7 8 Make synthesizedBaselineFromContentBox return LayoutUnit. This 9 makes it consistent with synthesizedBaselineFromBorderBox. 10 11 * rendering/RenderButton.cpp: 12 (WebCore::synthesizedBaselineFromContentBox): 13 (WebCore::RenderButton::baselinePosition const): 14 1 15 2021-04-07 Alejandro G. Castro <alex@igalia.com> 2 16 -
trunk/Source/WebCore/rendering/RenderButton.cpp
r275413 r275594 144 144 } 145 145 146 static int synthesizedBaselineFromContentBox(const RenderBox& box, LineDirectionMode direction)146 static LayoutUnit synthesizedBaselineFromContentBox(const RenderBox& box, LineDirectionMode direction) 147 147 { 148 148 return direction == HorizontalLine ? box.borderTop() + box.paddingTop() + box.contentHeight() : box.borderRight() + box.paddingRight() + box.contentWidth(); … … 153 153 // We cannot rely on RenderFlexibleBox::baselinePosition() because of flexboxes have some special behavior 154 154 // regarding baselines that shouldn't apply to buttons. 155 int baseline = firstLineBaseline().valueOr(synthesizedBaselineFromContentBox(*this, direction));156 int marginAscent = direction == HorizontalLine ? marginTop() : marginRight();155 LayoutUnit baseline = firstLineBaseline().valueOr(synthesizedBaselineFromContentBox(*this, direction)); 156 LayoutUnit marginAscent = direction == HorizontalLine ? marginTop() : marginRight(); 157 157 return baseline + marginAscent; 158 158 }
Note: See TracChangeset
for help on using the changeset viewer.