Title: [262102] trunk
- Revision
- 262102
- Author
- [email protected]
- Date
- 2020-05-23 12:47:51 -0700 (Sat, 23 May 2020)
Log Message
[LFC][TFC] Maximum constraint of a cell should never be smaller than the minimum width
https://bugs.webkit.org/show_bug.cgi?id=212304
Reviewed by Antti Koivisto.
Source/WebCore:
Test: fast/layoutformattingcontext/table-simple-fixed-width-with-wide-content.html
* layout/tableformatting/TableFormattingContextGeometry.cpp:
(WebCore::Layout::TableFormattingContext::Geometry::intrinsicWidthConstraintsForCell):
LayoutTests:
* fast/layoutformattingcontext/table-simple-fixed-width-with-wide-content-expected.html: Added.
* fast/layoutformattingcontext/table-simple-fixed-width-with-wide-content.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (262101 => 262102)
--- trunk/LayoutTests/ChangeLog 2020-05-23 17:10:56 UTC (rev 262101)
+++ trunk/LayoutTests/ChangeLog 2020-05-23 19:47:51 UTC (rev 262102)
@@ -1,5 +1,15 @@
2020-05-23 Zalan Bujtas <[email protected]>
+ [LFC][TFC] Maximum constraint of a cell should never be smaller than the minimum width
+ https://bugs.webkit.org/show_bug.cgi?id=212304
+
+ Reviewed by Antti Koivisto.
+
+ * fast/layoutformattingcontext/table-simple-fixed-width-with-wide-content-expected.html: Added.
+ * fast/layoutformattingcontext/table-simple-fixed-width-with-wide-content.html: Added.
+
+2020-05-23 Zalan Bujtas <[email protected]>
+
[LFC][TFC] Used height of a cell is the maximum of the computed and the content height.
https://bugs.webkit.org/show_bug.cgi?id=212302
Added: trunk/LayoutTests/fast/layoutformattingcontext/table-simple-fixed-width-with-wide-content-expected.html (0 => 262102)
--- trunk/LayoutTests/fast/layoutformattingcontext/table-simple-fixed-width-with-wide-content-expected.html (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/table-simple-fixed-width-with-wide-content-expected.html 2020-05-23 19:47:51 UTC (rev 262102)
@@ -0,0 +1,13 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<style>
+div {
+ height: 42px;
+ width: 42px;
+ border: 1px solid green;
+ position: absolute;
+}
+</style>
+<div style="top: 10px; left: 10px;"></div>
+<div style="top: 10px; left: 56px;"></div>
+<div style="top: 56px; left: 10px;"></div>
+<div style="top: 56px; left: 56px;"></div>
Added: trunk/LayoutTests/fast/layoutformattingcontext/table-simple-fixed-width-with-wide-content.html (0 => 262102)
--- trunk/LayoutTests/fast/layoutformattingcontext/table-simple-fixed-width-with-wide-content.html (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/table-simple-fixed-width-with-wide-content.html 2020-05-23 19:47:51 UTC (rev 262102)
@@ -0,0 +1,18 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<style>
+table {
+ font-size: 40px;
+ font-family: Ahem;
+ color: white;
+}
+
+td {
+ width: 10px;
+ height: 10px;
+ border: 1px solid green;
+}
+</style>
+<table>
+<tr><td>#</td><td>#</td></tr>
+<tr><td>#</td><td>#</td></tr>
+</table>
Modified: trunk/Source/WebCore/ChangeLog (262101 => 262102)
--- trunk/Source/WebCore/ChangeLog 2020-05-23 17:10:56 UTC (rev 262101)
+++ trunk/Source/WebCore/ChangeLog 2020-05-23 19:47:51 UTC (rev 262102)
@@ -1,5 +1,17 @@
2020-05-23 Zalan Bujtas <[email protected]>
+ [LFC][TFC] Maximum constraint of a cell should never be smaller than the minimum width
+ https://bugs.webkit.org/show_bug.cgi?id=212304
+
+ Reviewed by Antti Koivisto.
+
+ Test: fast/layoutformattingcontext/table-simple-fixed-width-with-wide-content.html
+
+ * layout/tableformatting/TableFormattingContextGeometry.cpp:
+ (WebCore::Layout::TableFormattingContext::Geometry::intrinsicWidthConstraintsForCell):
+
+2020-05-23 Zalan Bujtas <[email protected]>
+
[LFC][TFC] Used height of a cell is the maximum of the computed and the content height.
https://bugs.webkit.org/show_bug.cgi?id=212302
Modified: trunk/Source/WebCore/layout/tableformatting/TableFormattingContextGeometry.cpp (262101 => 262102)
--- trunk/Source/WebCore/layout/tableformatting/TableFormattingContextGeometry.cpp 2020-05-23 17:10:56 UTC (rev 262101)
+++ trunk/Source/WebCore/layout/tableformatting/TableFormattingContextGeometry.cpp 2020-05-23 19:47:51 UTC (rev 262102)
@@ -95,14 +95,14 @@
auto& cellBox = cell.box();
auto& style = cellBox.style();
- auto computedIntrinsicWidthConstraints = [&] {
+ auto computedIntrinsicWidthConstraints = [&]() -> FormattingContext::IntrinsicWidthConstraints {
// Even fixed width cells expand to their minimum content width
// <td style="width: 10px">test_content</td> will size to max(minimum content width, computed width).
auto intrinsicWidthConstraints = FormattingContext::IntrinsicWidthConstraints { };
if (cellBox.hasChild())
intrinsicWidthConstraints = LayoutContext::createFormattingContext(cellBox, layoutState())->computedIntrinsicWidthConstraints();
- if (auto width = fixedValue(style.logicalWidth()))
- return FormattingContext::IntrinsicWidthConstraints { std::max(intrinsicWidthConstraints.minimum, *width), *width };
+ if (auto fixedWidth = fixedValue(style.logicalWidth()))
+ return { std::max(intrinsicWidthConstraints.minimum, *fixedWidth), std::max(intrinsicWidthConstraints.minimum, *fixedWidth) };
return intrinsicWidthConstraints;
};
// FIXME Check for box-sizing: border-box;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes