Title: [260905] trunk
- Revision
- 260905
- Author
- [email protected]
- Date
- 2020-04-29 10:52:30 -0700 (Wed, 29 Apr 2020)
Log Message
Header is blank on https://nader.org
https://bugs.webkit.org/show_bug.cgi?id=205747
<rdar://problem/58305910>
Reviewed by Simon Fraser.
Source/WebCore:
Do not use stale containing block width value while computing preferred width.
Test: fast/text/text-indent-inside-float.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
LayoutTests:
* fast/text/text-indent-inside-float-expected.html: Added.
* fast/text/text-indent-inside-float.html: Added.
* platform/mac/editing/pasteboard/drop-text-without-selection-expected.txt:
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (260904 => 260905)
--- trunk/LayoutTests/ChangeLog 2020-04-29 17:20:27 UTC (rev 260904)
+++ trunk/LayoutTests/ChangeLog 2020-04-29 17:52:30 UTC (rev 260905)
@@ -1,3 +1,15 @@
+2020-04-29 Zalan Bujtas <[email protected]>
+
+ Header is blank on https://nader.org
+ https://bugs.webkit.org/show_bug.cgi?id=205747
+ <rdar://problem/58305910>
+
+ Reviewed by Simon Fraser.
+
+ * fast/text/text-indent-inside-float-expected.html: Added.
+ * fast/text/text-indent-inside-float.html: Added.
+ * platform/mac/editing/pasteboard/drop-text-without-selection-expected.txt:
+
2020-04-29 Youenn Fablet <[email protected]>
http/tests/media/media-stream/device-change-event-in-iframe.html is a flaky failure
Added: trunk/LayoutTests/fast/text/text-indent-inside-float-expected.html (0 => 260905)
--- trunk/LayoutTests/fast/text/text-indent-inside-float-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/text-indent-inside-float-expected.html 2020-04-29 17:52:30 UTC (rev 260905)
@@ -0,0 +1,13 @@
+<title>This tests that text-indent works with shrink-to-fit width computation.</title>
+<style>
+div {
+ border: 1px solid green;
+ float: right;
+ margin: 10px;
+}
+</style>
+
+<div style="width: 126px; height: 28px;"></div>
+<div style="width: 176px; height: 14px;"></div>
+<script>
+</script>
Added: trunk/LayoutTests/fast/text/text-indent-inside-float.html (0 => 260905)
--- trunk/LayoutTests/fast/text/text-indent-inside-float.html (rev 0)
+++ trunk/LayoutTests/fast/text/text-indent-inside-float.html 2020-04-29 17:52:30 UTC (rev 260905)
@@ -0,0 +1,18 @@
+<title>This tests that text-indent works with shrink-to-fit width computation.</title>
+<style>
+#percentage_indent, #fixed_indent {
+ border: 1px solid green;
+ color: white;
+ font-family: ahem;
+ font-size: 14px;
+ margin: 10px;
+}
+</style>
+
+<div id=percentage_indent><div style="text-indent: 10%">some text</div></div>
+<div id=fixed_indent><div style="text-indent: 50px;">some text</div></div>
+<script>
+document.body.offsetHeight;
+percentage_indent.style.float = "right";
+fixed_indent.style.float = "right";
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-indent/percentage-value-intrinsic-size-expected.txt (260904 => 260905)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-indent/percentage-value-intrinsic-size-expected.txt 2020-04-29 17:20:27 UTC (rev 260904)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-indent/percentage-value-intrinsic-size-expected.txt 2020-04-29 17:52:30 UTC (rev 260905)
@@ -1,12 +1,5 @@
Test passes if there is a filled green square.
-FAIL #container 1 assert_equals:
-<div id="container" data-expected-width="50" style="position:relative; float:left; height:100px; background:green;">
- <div id="foo" style="text-indent: 100%;">
- <div data-offset-x="50" data-expected-width="50" style="display:inline-block; width:50px; height:100px; background:green;"></div>
- <div style="width:50px;"></div>
- </div>
-</div>
-width expected 50 but got 100
+PASS #container 1
Modified: trunk/Source/WebCore/ChangeLog (260904 => 260905)
--- trunk/Source/WebCore/ChangeLog 2020-04-29 17:20:27 UTC (rev 260904)
+++ trunk/Source/WebCore/ChangeLog 2020-04-29 17:52:30 UTC (rev 260905)
@@ -1,5 +1,20 @@
2020-04-29 Zalan Bujtas <[email protected]>
+ Header is blank on https://nader.org
+ https://bugs.webkit.org/show_bug.cgi?id=205747
+ <rdar://problem/58305910>
+
+ Reviewed by Simon Fraser.
+
+ Do not use stale containing block width value while computing preferred width.
+
+ Test: fast/text/text-indent-inside-float.html
+
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
+
+2020-04-29 Zalan Bujtas <[email protected]>
+
[LFC][TFC] Take row span into account when checking for missing cells
https://bugs.webkit.org/show_bug.cgi?id=211184
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (260904 => 260905)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2020-04-29 17:20:27 UTC (rev 260904)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2020-04-29 17:52:30 UTC (rev 260905)
@@ -4218,9 +4218,6 @@
float inlineMin = 0;
const RenderStyle& styleToUse = style();
- RenderBlock* containingBlock = this->containingBlock();
- LayoutUnit cw = containingBlock ? containingBlock->contentLogicalWidth() : 0_lu;
-
// If we are at the start of a line, we want to ignore all white-space.
// Also strip spaces if we previously had text that ended in a trailing space.
bool stripFrontSpaces = true;
@@ -4240,7 +4237,14 @@
// Signals the text indent was more negative than the min preferred width
bool hasRemainingNegativeTextIndent = false;
- LayoutUnit textIndent = minimumValueForLength(styleToUse.textIndent(), cw);
+ auto textIndent = LayoutUnit { };
+ if (styleToUse.textIndent().isFixed())
+ textIndent = LayoutUnit { styleToUse.textIndent().value() };
+ else if (auto* containingBlock = this->containingBlock(); containingBlock && containingBlock->style().logicalWidth().isFixed()) {
+ // At this point of the shrink-to-fit computatation, we don't have a used value for the containing block width
+ // (that's exactly to what we try to contribute here) unless the computed value is fixed.
+ textIndent = minimumValueForLength(styleToUse.textIndent(), containingBlock->style().logicalWidth().value());
+ }
RenderObject* prevFloat = 0;
bool isPrevChildInlineFlow = false;
bool shouldBreakLineAfterText = false;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes