Title: [251280] trunk/Source/WebCore
- Revision
- 251280
- Author
- [email protected]
- Date
- 2019-10-18 07:54:47 -0700 (Fri, 18 Oct 2019)
Log Message
[LFC][BFC] Fix block level formatting root inflow box height computation
https://bugs.webkit.org/show_bug.cgi?id=203085
<rdar://problem/56372306>
Reviewed by Antti Koivisto.
Section 10.6.7 (https://www.w3.org/TR/CSS22/visudet.html#root-height) defines the height computation for block level formatting context roots.
We already use it for floats, out-of-flow and block level boxes when overflow computes to not "visible".
This patch makes generic in-flow non-replaced BFC roots (e.g. principal block container box for <table>) compute their heights according to 10.6.7.
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (251279 => 251280)
--- trunk/Source/WebCore/ChangeLog 2019-10-18 14:24:07 UTC (rev 251279)
+++ trunk/Source/WebCore/ChangeLog 2019-10-18 14:54:47 UTC (rev 251280)
@@ -1,3 +1,18 @@
+2019-10-18 Zalan Bujtas <[email protected]>
+
+ [LFC][BFC] Fix block level formatting root inflow box height computation
+ https://bugs.webkit.org/show_bug.cgi?id=203085
+ <rdar://problem/56372306>
+
+ Reviewed by Antti Koivisto.
+
+ Section 10.6.7 (https://www.w3.org/TR/CSS22/visudet.html#root-height) defines the height computation for block level formatting context roots.
+ We already use it for floats, out-of-flow and block level boxes when overflow computes to not "visible".
+ This patch makes generic in-flow non-replaced BFC roots (e.g. principal block container box for <table>) compute their heights according to 10.6.7.
+
+ * layout/blockformatting/BlockFormattingContextGeometry.cpp:
+ (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
+
2019-10-17 Wenson Hsieh <[email protected]>
[Clipboard API] Support navigator.clipboard.read()
Modified: trunk/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp (251279 => 251280)
--- trunk/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp 2019-10-18 14:24:07 UTC (rev 251279)
+++ trunk/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp 2019-10-18 14:54:47 UTC (rev 251280)
@@ -100,6 +100,10 @@
return { 0, nonCollapsedMargin };
};
+ // 10.6.7 'Auto' heights for block formatting context roots
+ auto isAutoHeight = !usedValues.height && !computedContentHeight(layoutBox);
+ if (isAutoHeight && layoutBox.establishesBlockFormattingContext())
+ usedValues.height = contentHeightForFormattingContextRoot(layoutBox);
auto contentHeightAndMargin = compute();
LOG_WITH_STREAM(FormattingContextLayout, stream << "[Height][Margin] -> inflow non-replaced -> height(" << contentHeightAndMargin.contentHeight << "px) margin(" << contentHeightAndMargin.nonCollapsedMargin.before << "px, " << contentHeightAndMargin.nonCollapsedMargin.after << "px) -> layoutBox(" << &layoutBox << ")");
return contentHeightAndMargin;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes