Title: [287779] trunk
- Revision
- 287779
- Author
- [email protected]
- Date
- 2022-01-07 13:16:52 -0800 (Fri, 07 Jan 2022)
Log Message
Inline blocks that contain text with min-width, box-sizing: border-box incorrectly include the border in width calculation
https://bugs.webkit.org/show_bug.cgi?id=234935
<rdar://problem/87217423>
Reviewed by Antti Koivisto.
Source/WebCore:
The block formatting context root takes care of applying the the min/max-width constraints.
Test: fast/inline/min-max-width-and-preferred-width.html
* layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraintsForIntegration): remove redundant min/max-width checking.
LayoutTests:
* fast/inline/min-max-width-and-preferred-width-expected.html: Added.
* fast/inline/min-max-width-and-preferred-width.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (287778 => 287779)
--- trunk/LayoutTests/ChangeLog 2022-01-07 21:09:21 UTC (rev 287778)
+++ trunk/LayoutTests/ChangeLog 2022-01-07 21:16:52 UTC (rev 287779)
@@ -1,3 +1,14 @@
+2022-01-07 Alan Bujtas <[email protected]>
+
+ Inline blocks that contain text with min-width, box-sizing: border-box incorrectly include the border in width calculation
+ https://bugs.webkit.org/show_bug.cgi?id=234935
+ <rdar://problem/87217423>
+
+ Reviewed by Antti Koivisto.
+
+ * fast/inline/min-max-width-and-preferred-width-expected.html: Added.
+ * fast/inline/min-max-width-and-preferred-width.html: Added.
+
2022-01-07 Youenn Fablet <[email protected]>
Expose rvfc processingDuration for the WebRTC code path
Added: trunk/LayoutTests/fast/inline/min-max-width-and-preferred-width-expected.html (0 => 287779)
--- trunk/LayoutTests/fast/inline/min-max-width-and-preferred-width-expected.html (rev 0)
+++ trunk/LayoutTests/fast/inline/min-max-width-and-preferred-width-expected.html 2022-01-07 21:16:52 UTC (rev 287779)
@@ -0,0 +1,22 @@
+<style>
+div {
+ color: transparent;
+ font-family: Ahem;
+ font-size: 20px;
+}
+
+.inline-block {
+ display: inline-block;
+ min-height: 50px;
+ border-left: 50px solid blue;
+ border-right: 100px solid green;
+}
+</style>
+
+<div><div class=inline-block style="width: 200px;"></div></div>
+<div><div class=inline-block style="width: 200px;">X</div></div>
+<div><div class=inline-block style="box-sizing: border-box; width: 200px;">X</div></div>
+<div><div class=inline-block style="box-sizing: border-box;">X</div></div>
+<div><div class=inline-block style="box-sizing: border-box;">X</div></div>
+<div><div class=inline-block style="box-sizing: border-box; width: 20px;">X</div></div>
+
Added: trunk/LayoutTests/fast/inline/min-max-width-and-preferred-width.html (0 => 287779)
--- trunk/LayoutTests/fast/inline/min-max-width-and-preferred-width.html (rev 0)
+++ trunk/LayoutTests/fast/inline/min-max-width-and-preferred-width.html 2022-01-07 21:16:52 UTC (rev 287779)
@@ -0,0 +1,22 @@
+<style>
+div {
+ color: transparent;
+ font-family: Ahem;
+ font-size: 20px;
+}
+
+.inline-block {
+ display: inline-block;
+ min-height: 50px;
+ border-left: 50px solid blue;
+ border-right: 100px solid green;
+}
+</style>
+
+<div><div class=inline-block style="min-width: 200px;"></div></div>
+<div><div class=inline-block style="min-width: 200px;">X</div></div>
+<div><div class=inline-block style="box-sizing: border-box; min-width: 200px;">X</div></div>
+<div><div class=inline-block style="box-sizing: border-box; min-width: 20px;">X</div></div>
+<div><div class=inline-block style="box-sizing: border-box; max-width: 200px;">X</div></div>
+<div><div class=inline-block style="box-sizing: border-box; max-width: 20px;">X</div></div>
+
Modified: trunk/Source/WebCore/ChangeLog (287778 => 287779)
--- trunk/Source/WebCore/ChangeLog 2022-01-07 21:09:21 UTC (rev 287778)
+++ trunk/Source/WebCore/ChangeLog 2022-01-07 21:16:52 UTC (rev 287779)
@@ -1,3 +1,18 @@
+2022-01-07 Alan Bujtas <[email protected]>
+
+ Inline blocks that contain text with min-width, box-sizing: border-box incorrectly include the border in width calculation
+ https://bugs.webkit.org/show_bug.cgi?id=234935
+ <rdar://problem/87217423>
+
+ Reviewed by Antti Koivisto.
+
+ The block formatting context root takes care of applying the the min/max-width constraints.
+
+ Test: fast/inline/min-max-width-and-preferred-width.html
+
+ * layout/formattingContexts/inline/InlineFormattingContext.cpp:
+ (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraintsForIntegration): remove redundant min/max-width checking.
+
2022-01-07 Andres Gonzalez <[email protected]>
WebAccessibilityObjectWrapper accessibilityHitTest should call AXCoreObject::widget() on the main thread.
Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp (287778 => 287779)
--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp 2022-01-07 21:09:21 UTC (rev 287778)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp 2022-01-07 21:16:52 UTC (rev 287779)
@@ -167,9 +167,10 @@
collectContentIfNeeded();
- auto constraints = formattingGeometry().constrainByMinMaxWidth(root(),
- { ceiledLayoutUnit(computedIntrinsicWidthForConstraint(IntrinsicWidthMode::Minimum))
- , ceiledLayoutUnit(computedIntrinsicWidthForConstraint(IntrinsicWidthMode::Maximum)) });
+ auto constraints = IntrinsicWidthConstraints {
+ ceiledLayoutUnit(computedIntrinsicWidthForConstraint(IntrinsicWidthMode::Minimum)),
+ ceiledLayoutUnit(computedIntrinsicWidthForConstraint(IntrinsicWidthMode::Maximum))
+ };
formattingState().setIntrinsicWidthConstraints(constraints);
return constraints;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes