Changeset 275494 in webkit
- Timestamp:
- Apr 6, 2021 1:37:33 AM (3 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r275488 r275494 1 2021-04-06 Rob Buis <rbuis@igalia.com> 2 3 Move synthesizedBaselineFromBorderBox to RenderBox 4 https://bugs.webkit.org/show_bug.cgi?id=224186 5 6 Reviewed by Javier Fernandez. 7 8 Move synthesizedBaselineFromBorderBox to RenderBox since there are 9 various call sites using it. 10 11 * rendering/RenderBlockFlow.cpp: 12 (WebCore::RenderBlockFlow::inlineBlockBaseline const): 13 * rendering/RenderBox.cpp: 14 (WebCore::synthesizedBaselineFromBorderBox): 15 * rendering/RenderBox.h: 16 * rendering/RenderFlexibleBox.cpp: 17 (WebCore::synthesizedBaselineFromBorderBox): Deleted. 18 * rendering/RenderGrid.cpp: 19 (WebCore::synthesizedBaselineFromBorderBox): Deleted. 20 1 21 2021-04-05 Simon Fraser <simon.fraser@apple.com> 2 22 -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r275413 r275494 3142 3142 } 3143 3143 // Note that here we only take the left and bottom into consideration. Our caller takes the right and top into consideration. 3144 float boxHeight = lineDirection == HorizontalLine ? height() + m_marginBox.bottom() : width() + m_marginBox.left();3144 float boxHeight = synthesizedBaselineFromBorderBox(*this, lineDirection) + (lineDirection == HorizontalLine ? m_marginBox.bottom() : m_marginBox.left()); 3145 3145 float lastBaseline = 0; 3146 3146 if (!childrenInline()) { -
trunk/Source/WebCore/rendering/RenderBox.cpp
r275462 r275494 5238 5238 } 5239 5239 5240 LayoutUnit synthesizedBaselineFromBorderBox(const RenderBox& box, LineDirectionMode direction) 5241 { 5242 return direction == HorizontalLine ? box.height() : box.width(); 5243 } 5244 5240 5245 } // namespace WebCore -
trunk/Source/WebCore/rendering/RenderBox.h
r275462 r275494 852 852 } 853 853 854 LayoutUnit synthesizedBaselineFromBorderBox(const RenderBox&, LineDirectionMode); 855 854 856 } // namespace WebCore 855 857 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r275413 r275494 143 143 maxLogicalWidth += scrollbarWidth; 144 144 minLogicalWidth += scrollbarWidth; 145 }146 147 static LayoutUnit synthesizedBaselineFromBorderBox(const RenderBox& box, LineDirectionMode direction)148 {149 return direction == HorizontalLine ? box.size().height() : box.size().width();150 145 } 151 146 -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r275413 r275494 1231 1231 child.setMarginAfter(availableAlignmentSpace, &parentStyle); 1232 1232 } 1233 }1234 1235 // FIXME: This logic could be refactored somehow and defined in RenderBox.1236 static LayoutUnit synthesizedBaselineFromBorderBox(const RenderBox& box, LineDirectionMode direction)1237 {1238 return (direction == HorizontalLine ? box.size().height() : box.size().width()).toInt();1239 1233 } 1240 1234
Note: See TracChangeset
for help on using the changeset viewer.