Title: [294299] branches/safari-613-branch/Source/WebCore
- Revision
- 294299
- Author
- alanc...@apple.com
- Date
- 2022-05-16 23:10:49 -0700 (Mon, 16 May 2022)
Log Message
Cherry-pick r293647. rdar://problem/92257660
Only stretch the percent height <body> when it is the document element's child
https://bugs.webkit.org/show_bug.cgi?id=239932
<rdar://92257660>
Reviewed by Antti Koivisto.
This IE quirk should only be applied to when the body is actually the document element's child (stretching case).
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalHeight const):
* rendering/RenderBox.h:
(WebCore::RenderBox::parentBox const):
Canonical link: https://commits.webkit.org/250151@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (294298 => 294299)
--- branches/safari-613-branch/Source/WebCore/ChangeLog 2022-05-17 06:10:46 UTC (rev 294298)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog 2022-05-17 06:10:49 UTC (rev 294299)
@@ -1,5 +1,40 @@
2022-05-16 Alan Coon <alanc...@apple.com>
+ Cherry-pick r293647. rdar://problem/92257660
+
+ Only stretch the percent height <body> when it is the document element's child
+ https://bugs.webkit.org/show_bug.cgi?id=239932
+ <rdar://92257660>
+
+ Reviewed by Antti Koivisto.
+
+ This IE quirk should only be applied to when the body is actually the document element's child (stretching case).
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::computeLogicalHeight const):
+ * rendering/RenderBox.h:
+ (WebCore::RenderBox::parentBox const):
+
+ Canonical link: https://commits.webkit.org/250151@main
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-04-30 Alan Bujtas <za...@apple.com>
+
+ Only stretch the percent height <body> when it is the document element's child
+ https://bugs.webkit.org/show_bug.cgi?id=239932
+ <rdar://92257660>
+
+ Reviewed by Antti Koivisto.
+
+ This IE quirk should only be applied to when the body is actually the document element's child (stretching case).
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::computeLogicalHeight const):
+ * rendering/RenderBox.h:
+ (WebCore::RenderBox::parentBox const):
+
+2022-05-16 Alan Coon <alanc...@apple.com>
+
Cherry-pick r293264. rdar://problem/92130849
Web Inspector: Regression(r287684) Resources from the memory cache show empty content in Network, Sources, and Search tabs
Modified: branches/safari-613-branch/Source/WebCore/rendering/RenderBox.cpp (294298 => 294299)
--- branches/safari-613-branch/Source/WebCore/rendering/RenderBox.cpp 2022-05-17 06:10:46 UTC (rev 294298)
+++ branches/safari-613-branch/Source/WebCore/rendering/RenderBox.cpp 2022-05-17 06:10:49 UTC (rev 294299)
@@ -3176,14 +3176,20 @@
}
}
- // WinIE quirk: The <html> block always fills the entire canvas in quirks mode. The <body> always fills the
- // <html> block in quirks mode. Only apply this quirk if the block is normal flow and no height
+ // WinIE quirk: The <html> block always fills the entire canvas in quirks mode. The <body> always fills the
+ // <html> block in quirks mode. Only apply this quirk if the block is normal flow and no height
// is specified. When we're printing, we also need this quirk if the body or root has a percentage
// height since we don't set a height in RenderView when we're printing. So without this quirk, the
// height has nothing to be a percentage of, and it ends up being 0. That is bad.
- bool paginatedContentNeedsBaseHeight = document().printing() && h.isPercentOrCalculated()
- && (isDocumentElementRenderer() || (isBody() && document().documentElement()->renderer()->style().logicalHeight().isPercentOrCalculated())) && !isInline();
- if (stretchesToViewport() || paginatedContentNeedsBaseHeight) {
+ auto paginatedContentNeedsBaseHeight = [&] {
+ if (!document().printing() || !h.isPercentOrCalculated() || isInline())
+ return false;
+ if (isDocumentElementRenderer())
+ return true;
+ auto* documentElementRenderer = document().documentElement()->renderer();
+ return isBody() && parent() == documentElementRenderer && documentElementRenderer->style().logicalHeight().isPercentOrCalculated();
+ };
+ if (stretchesToViewport() || paginatedContentNeedsBaseHeight()) {
LayoutUnit margins = collapsedMarginBefore() + collapsedMarginAfter();
LayoutUnit visibleHeight = view().pageOrViewLogicalHeight();
if (isDocumentElementRenderer())
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes