Title: [277780] trunk
- Revision
- 277780
- Author
- [email protected]
- Date
- 2021-05-20 06:31:05 -0700 (Thu, 20 May 2021)
Log Message
[LFC][TFC] Available space distribution should account for the top and bottom table spacing
https://bugs.webkit.org/show_bug.cgi?id=226003
Reviewed by Antti Koivisto.
Source/WebCore:
The available space for the table content is the table width/height minus the left-right/top-bottom spacing, minus
the additional spacing between the rows/columns.
Tests: fast/inline/vertical-top-on-subpixel-makes-inline-box-overflow.html
fast/layoutformattingcontext/table-simple-row-height.html
* layout/formattingContexts/table/TableLayout.cpp:
(WebCore::Layout::distributeAvailableSpace):
LayoutTests:
* TestExpectations: rendering code disagrees here.
* fast/layoutformattingcontext/table-simple-row-height-expected.html: Added.
* fast/layoutformattingcontext/table-simple-row-height.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (277779 => 277780)
--- trunk/LayoutTests/ChangeLog 2021-05-20 13:24:18 UTC (rev 277779)
+++ trunk/LayoutTests/ChangeLog 2021-05-20 13:31:05 UTC (rev 277780)
@@ -1,3 +1,14 @@
+2021-05-20 Alan Bujtas <[email protected]>
+
+ [LFC][TFC] Available space distribution should account for the top and bottom table spacing
+ https://bugs.webkit.org/show_bug.cgi?id=226003
+
+ Reviewed by Antti Koivisto.
+
+ * TestExpectations: rendering code disagrees here.
+ * fast/layoutformattingcontext/table-simple-row-height-expected.html: Added.
+ * fast/layoutformattingcontext/table-simple-row-height.html: Added.
+
2021-05-20 Aditya Keerthi <[email protected]>
Value of a color input does not update visually when using setAttribute
Modified: trunk/LayoutTests/TestExpectations (277779 => 277780)
--- trunk/LayoutTests/TestExpectations 2021-05-20 13:24:18 UTC (rev 277779)
+++ trunk/LayoutTests/TestExpectations 2021-05-20 13:31:05 UTC (rev 277780)
@@ -4873,6 +4873,8 @@
webkit.org/b/225247 [ Debug ] fast/multicol/span/float-becomes-spanner-crash.html [ Skip ]
+webkit.org/b/226002 fast/layoutformattingcontext/table-simple-row-height.html [ Skip ]
+
# This webstorage test has crashed since it was imported.
imported/w3c/web-platform-tests/webstorage/storage_session_setitem_quotaexceedederr.window.html [ Skip ]
# This webstorage test has timed out since it was imported.
Added: trunk/LayoutTests/fast/layoutformattingcontext/table-simple-row-height-expected.html (0 => 277780)
--- trunk/LayoutTests/fast/layoutformattingcontext/table-simple-row-height-expected.html (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/table-simple-row-height-expected.html 2021-05-20 13:31:05 UTC (rev 277780)
@@ -0,0 +1,8 @@
+<style>
+div {
+ height: 200px;
+ width: 100px;
+ background-color: green;
+}
+</style>
+<div></div>
\ No newline at end of file
Added: trunk/LayoutTests/fast/layoutformattingcontext/table-simple-row-height.html (0 => 277780)
--- trunk/LayoutTests/fast/layoutformattingcontext/table-simple-row-height.html (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/table-simple-row-height.html 2021-05-20 13:31:05 UTC (rev 277780)
@@ -0,0 +1,9 @@
+<style>
+table {
+ height: 100px;
+ width: 100px;
+ background-color: green;
+}
+</style>
+<table><tr><td height=1px></td></tr></table>
+<table><tr><td></td></tr></table>
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (277779 => 277780)
--- trunk/Source/WebCore/ChangeLog 2021-05-20 13:24:18 UTC (rev 277779)
+++ trunk/Source/WebCore/ChangeLog 2021-05-20 13:31:05 UTC (rev 277780)
@@ -1,3 +1,19 @@
+2021-05-20 Alan Bujtas <[email protected]>
+
+ [LFC][TFC] Available space distribution should account for the top and bottom table spacing
+ https://bugs.webkit.org/show_bug.cgi?id=226003
+
+ Reviewed by Antti Koivisto.
+
+ The available space for the table content is the table width/height minus the left-right/top-bottom spacing, minus
+ the additional spacing between the rows/columns.
+
+ Tests: fast/inline/vertical-top-on-subpixel-makes-inline-box-overflow.html
+ fast/layoutformattingcontext/table-simple-row-height.html
+
+ * layout/formattingContexts/table/TableLayout.cpp:
+ (WebCore::Layout::distributeAvailableSpace):
+
2021-05-20 Aditya Keerthi <[email protected]>
Value of a color input does not update visually when using setAttribute
Modified: trunk/Source/WebCore/layout/formattingContexts/table/TableLayout.cpp (277779 => 277780)
--- trunk/Source/WebCore/layout/formattingContexts/table/TableLayout.cpp 2021-05-20 13:24:18 UTC (rev 277779)
+++ trunk/Source/WebCore/layout/formattingContexts/table/TableLayout.cpp 2021-05-20 13:31:05 UTC (rev 277780)
@@ -219,7 +219,10 @@
}
Vector<LayoutUnit> distributedSpaces(resolvedItems.size());
- float spaceToDistribute = availableSpace - adjustabledSpace.value - ((resolvedItems.size() + 1) * SpanType::spacing(grid));
+ float spaceToDistribute = availableSpace;
+ // Top and bottom spacing are fixed.
+ spaceToDistribute -= 2 * SpanType::spacing(grid);
+ spaceToDistribute -= adjustabledSpace.value + ((resolvedItems.size() - 1) * SpanType::spacing(grid));
// Essentially the remaining space to distribute should never be negative. LayoutUnit::epsilon() is required to compensate for LayoutUnit's low precision.
ASSERT(spaceToDistribute >= -LayoutUnit::epsilon() * resolvedItems.size());
// Distribute the extra space based on the resolved spaces.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes