Title: [263846] trunk
- Revision
- 263846
- Author
- za...@apple.com
- Date
- 2020-07-02 07:52:36 -0700 (Thu, 02 Jul 2020)
Log Message
[LFC][BFC] Remove redundant margin-border-padding when computing the intrinsic width
https://bugs.webkit.org/show_bug.cgi?id=213882
Reviewed by Antti Koivisto.
Source/WebCore:
The child intrinsic width already includes the margin-border-padding values.
Test: fast/layoutformattingcontext/table-with-margin-content-simple.html
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
LayoutTests:
* fast/layoutformattingcontext/table-with-margin-content-simple-expected.html: Added.
* fast/layoutformattingcontext/table-with-margin-content-simple.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (263845 => 263846)
--- trunk/LayoutTests/ChangeLog 2020-07-02 14:52:20 UTC (rev 263845)
+++ trunk/LayoutTests/ChangeLog 2020-07-02 14:52:36 UTC (rev 263846)
@@ -1,5 +1,15 @@
2020-07-02 Zalan Bujtas <za...@apple.com>
+ [LFC][BFC] Remove redundant margin-border-padding when computing the intrinsic width
+ https://bugs.webkit.org/show_bug.cgi?id=213882
+
+ Reviewed by Antti Koivisto.
+
+ * fast/layoutformattingcontext/table-with-margin-content-simple-expected.html: Added.
+ * fast/layoutformattingcontext/table-with-margin-content-simple.html: Added.
+
+2020-07-02 Zalan Bujtas <za...@apple.com>
+
[LFC][IFC] Use <tr> computed height as minimum height for the row
https://bugs.webkit.org/show_bug.cgi?id=213880
Added: trunk/LayoutTests/fast/layoutformattingcontext/table-with-margin-content-simple-expected.html (0 => 263846)
--- trunk/LayoutTests/fast/layoutformattingcontext/table-with-margin-content-simple-expected.html (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/table-with-margin-content-simple-expected.html 2020-07-02 14:52:36 UTC (rev 263846)
@@ -0,0 +1,19 @@
+<!DOCTYPE html><!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<style>
+.first {
+ width: 123px;
+ height: 23px;
+ background-color: green;
+}
+
+.second {
+ width: 50px;
+ height: 23px;
+ background-color: blue;
+ position: relative;
+ top: -23px;
+ left: 10px;
+}
+</style>
+<div class=first></div>
+<div class=second></div>
\ No newline at end of file
Added: trunk/LayoutTests/fast/layoutformattingcontext/table-with-margin-content-simple.html (0 => 263846)
--- trunk/LayoutTests/fast/layoutformattingcontext/table-with-margin-content-simple.html (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/table-with-margin-content-simple.html 2020-07-02 14:52:36 UTC (rev 263846)
@@ -0,0 +1,25 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<style>
+table {
+ width: 100px;
+ font-size: 20px;
+ border-spacing: 0px;
+ background-color: green;
+ color: green;
+}
+
+td {
+ padding: 0px;
+}
+
+div {
+ margin-left: 10px;
+ margin-right: 20px;
+ background-color: blue;
+ color: blue;
+ width: 50px;
+}
+</style>
+<table>
+<td><span><div>XXX</div></span></td><td>XXX</td>
+</table>
Modified: trunk/Source/WebCore/ChangeLog (263845 => 263846)
--- trunk/Source/WebCore/ChangeLog 2020-07-02 14:52:20 UTC (rev 263845)
+++ trunk/Source/WebCore/ChangeLog 2020-07-02 14:52:36 UTC (rev 263846)
@@ -1,5 +1,19 @@
2020-07-02 Zalan Bujtas <za...@apple.com>
+ [LFC][BFC] Remove redundant margin-border-padding when computing the intrinsic width
+ https://bugs.webkit.org/show_bug.cgi?id=213882
+
+ Reviewed by Antti Koivisto.
+
+ The child intrinsic width already includes the margin-border-padding values.
+
+ Test: fast/layoutformattingcontext/table-with-margin-content-simple.html
+
+ * layout/blockformatting/BlockFormattingContextGeometry.cpp:
+ (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
+
+2020-07-02 Zalan Bujtas <za...@apple.com>
+
[LFC][IFC] Use <tr> computed height as minimum height for the row
https://bugs.webkit.org/show_bug.cgi?id=213880
Modified: trunk/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp (263845 => 263846)
--- trunk/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp 2020-07-02 14:52:20 UTC (rev 263845)
+++ trunk/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp 2020-07-02 14:52:36 UTC (rev 263846)
@@ -378,10 +378,8 @@
auto childIntrinsicWidthConstraints = formattingState.intrinsicWidthConstraintsForBox(child);
ASSERT(childIntrinsicWidthConstraints);
- // FIXME Check for box-sizing: border-box;
- auto marginBorderAndPadding = fixedMarginBorderAndPadding(child);
- intrinsicWidthConstraints.minimum = std::max(intrinsicWidthConstraints.minimum, childIntrinsicWidthConstraints->minimum + marginBorderAndPadding);
- intrinsicWidthConstraints.maximum = std::max(intrinsicWidthConstraints.maximum, childIntrinsicWidthConstraints->maximum + marginBorderAndPadding);
+ intrinsicWidthConstraints.minimum = std::max(intrinsicWidthConstraints.minimum, childIntrinsicWidthConstraints->minimum);
+ intrinsicWidthConstraints.maximum = std::max(intrinsicWidthConstraints.maximum, childIntrinsicWidthConstraints->maximum);
}
return intrinsicWidthConstraints;
};
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes