Changeset 293647 in webkit
- Timestamp:
- Apr 30, 2022 9:30:46 AM (2 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r293646 r293647 1 2022-04-30 Alan Bujtas <zalan@apple.com> 2 3 Only stretch the percent height <body> when it is the document element's child 4 https://bugs.webkit.org/show_bug.cgi?id=239932 5 <rdar://92257660> 6 7 Reviewed by Antti Koivisto. 8 9 This IE quirk should only be applied to when the body is actually the document element's child (stretching case). 10 11 * rendering/RenderBox.cpp: 12 (WebCore::RenderBox::computeLogicalHeight const): 13 * rendering/RenderBox.h: 14 (WebCore::RenderBox::parentBox const): 15 1 16 2022-04-30 Alan Bujtas <zalan@apple.com> 2 17 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r293209 r293647 3204 3204 } 3205 3205 3206 // WinIE quirk: The <html> block always fills the entire canvas in quirks mode. 3207 // <html> block in quirks mode. 3206 // WinIE quirk: The <html> block always fills the entire canvas in quirks mode. The <body> always fills the 3207 // <html> block in quirks mode. Only apply this quirk if the block is normal flow and no height 3208 3208 // is specified. When we're printing, we also need this quirk if the body or root has a percentage 3209 3209 // height since we don't set a height in RenderView when we're printing. So without this quirk, the 3210 3210 // height has nothing to be a percentage of, and it ends up being 0. That is bad. 3211 bool paginatedContentNeedsBaseHeight = document().printing() && h.isPercentOrCalculated() 3212 && (isDocumentElementRenderer() || (isBody() && document().documentElement()->renderer()->style().logicalHeight().isPercentOrCalculated())) && !isInline(); 3213 if (stretchesToViewport() || paginatedContentNeedsBaseHeight) { 3211 auto paginatedContentNeedsBaseHeight = [&] { 3212 if (!document().printing() || !h.isPercentOrCalculated() || isInline()) 3213 return false; 3214 if (isDocumentElementRenderer()) 3215 return true; 3216 auto* documentElementRenderer = document().documentElement()->renderer(); 3217 return isBody() && parent() == documentElementRenderer && documentElementRenderer->style().logicalHeight().isPercentOrCalculated(); 3218 }; 3219 if (stretchesToViewport() || paginatedContentNeedsBaseHeight()) { 3214 3220 LayoutUnit margins = collapsedMarginBefore() + collapsedMarginAfter(); 3215 3221 LayoutUnit visibleHeight = view().pageOrViewLogicalHeight();
Note: See TracChangeset
for help on using the changeset viewer.