Title: [291671] branches/safari-613-branch
- Revision
- 291671
- Author
- [email protected]
- Date
- 2022-03-22 10:57:08 -0700 (Tue, 22 Mar 2022)
Log Message
Cherry-pick r291330. rdar://problem/90320701
REGRESSION (r282737): `text-shadow` is clipped
https://bugs.webkit.org/show_bug.cgi?id=237898
<rdar://problem/90320701>
Reviewed by Darin Adler.
Source/WebCore:
Inflate the ink overflow rect with the text shadow values (note that here, in the display builder we work with physical coordinates).
Test: fast/text/text-shadow-ink-overflow-missing.html
* layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::appendTextDisplayBox):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::getTextShadowHorizontalExtent const):
(WebCore::RenderStyle::getTextShadowVerticalExtent const):
LayoutTests:
* fast/text/text-shadow-ink-overflow-missing-expected.html: Added.
* fast/text/text-shadow-ink-overflow-missing.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Added Paths
Diff
Modified: branches/safari-613-branch/LayoutTests/ChangeLog (291670 => 291671)
--- branches/safari-613-branch/LayoutTests/ChangeLog 2022-03-22 17:57:03 UTC (rev 291670)
+++ branches/safari-613-branch/LayoutTests/ChangeLog 2022-03-22 17:57:08 UTC (rev 291671)
@@ -1,5 +1,46 @@
2022-03-21 Alan Coon <[email protected]>
+ Cherry-pick r291330. rdar://problem/90320701
+
+ REGRESSION (r282737): `text-shadow` is clipped
+ https://bugs.webkit.org/show_bug.cgi?id=237898
+ <rdar://problem/90320701>
+
+ Reviewed by Darin Adler.
+
+ Source/WebCore:
+
+ Inflate the ink overflow rect with the text shadow values (note that here, in the display builder we work with physical coordinates).
+
+ Test: fast/text/text-shadow-ink-overflow-missing.html
+
+ * layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
+ (WebCore::Layout::InlineDisplayContentBuilder::appendTextDisplayBox):
+ * rendering/style/RenderStyle.h:
+ (WebCore::RenderStyle::getTextShadowHorizontalExtent const):
+ (WebCore::RenderStyle::getTextShadowVerticalExtent const):
+
+ LayoutTests:
+
+ * fast/text/text-shadow-ink-overflow-missing-expected.html: Added.
+ * fast/text/text-shadow-ink-overflow-missing.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-15 Alan Bujtas <[email protected]>
+
+ REGRESSION (r282737): `text-shadow` is clipped
+ https://bugs.webkit.org/show_bug.cgi?id=237898
+ <rdar://problem/90320701>
+
+ Reviewed by Darin Adler.
+
+ * fast/text/text-shadow-ink-overflow-missing-expected.html: Added.
+ * fast/text/text-shadow-ink-overflow-missing.html: Added.
+
+2022-03-21 Alan Coon <[email protected]>
+
Cherry-pick r291141. rdar://problem/90035071
Main document is leaking on haaretz.co.il due to lazy image loading
Added: branches/safari-613-branch/LayoutTests/fast/text/text-shadow-ink-overflow-missing-expected.html (0 => 291671)
--- branches/safari-613-branch/LayoutTests/fast/text/text-shadow-ink-overflow-missing-expected.html (rev 0)
+++ branches/safari-613-branch/LayoutTests/fast/text/text-shadow-ink-overflow-missing-expected.html 2022-03-22 17:57:08 UTC (rev 291671)
@@ -0,0 +1,9 @@
+<style>
+div {
+ font-size: 20px;
+ text-shadow: 0px 100px 1px black;
+ font-family: Ahem;
+ will-change: transform;
+}
+</style>
+<div>PASS if this line is doubled.</div>
Added: branches/safari-613-branch/LayoutTests/fast/text/text-shadow-ink-overflow-missing.html (0 => 291671)
--- branches/safari-613-branch/LayoutTests/fast/text/text-shadow-ink-overflow-missing.html (rev 0)
+++ branches/safari-613-branch/LayoutTests/fast/text/text-shadow-ink-overflow-missing.html 2022-03-22 17:57:08 UTC (rev 291671)
@@ -0,0 +1,26 @@
+<style>
+.wrapper {
+ position: relative;
+ font-family: Ahem;
+}
+
+.shadow {
+ position: relative;
+ z-index: 1;
+ font-size: 20px;
+ text-shadow: 0px 100px 1px black;
+}
+
+.absolute {
+ position: absolute;
+ left: 0;
+ top: 0;
+ will-change: transform;
+}
+</style>
+
+<div class="wrapper">
+ <div class="shadow">PASS if this line is doubled.</div>
+ <div class="absolute"></div>
+</div>
+
Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (291670 => 291671)
--- branches/safari-613-branch/Source/WebCore/ChangeLog 2022-03-22 17:57:03 UTC (rev 291670)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog 2022-03-22 17:57:08 UTC (rev 291671)
@@ -1,5 +1,53 @@
2022-03-21 Alan Coon <[email protected]>
+ Cherry-pick r291330. rdar://problem/90320701
+
+ REGRESSION (r282737): `text-shadow` is clipped
+ https://bugs.webkit.org/show_bug.cgi?id=237898
+ <rdar://problem/90320701>
+
+ Reviewed by Darin Adler.
+
+ Source/WebCore:
+
+ Inflate the ink overflow rect with the text shadow values (note that here, in the display builder we work with physical coordinates).
+
+ Test: fast/text/text-shadow-ink-overflow-missing.html
+
+ * layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
+ (WebCore::Layout::InlineDisplayContentBuilder::appendTextDisplayBox):
+ * rendering/style/RenderStyle.h:
+ (WebCore::RenderStyle::getTextShadowHorizontalExtent const):
+ (WebCore::RenderStyle::getTextShadowVerticalExtent const):
+
+ LayoutTests:
+
+ * fast/text/text-shadow-ink-overflow-missing-expected.html: Added.
+ * fast/text/text-shadow-ink-overflow-missing.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-15 Alan Bujtas <[email protected]>
+
+ REGRESSION (r282737): `text-shadow` is clipped
+ https://bugs.webkit.org/show_bug.cgi?id=237898
+ <rdar://problem/90320701>
+
+ Reviewed by Darin Adler.
+
+ Inflate the ink overflow rect with the text shadow values (note that here, in the display builder we work with physical coordinates).
+
+ Test: fast/text/text-shadow-ink-overflow-missing.html
+
+ * layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
+ (WebCore::Layout::InlineDisplayContentBuilder::appendTextDisplayBox):
+ * rendering/style/RenderStyle.h:
+ (WebCore::RenderStyle::getTextShadowHorizontalExtent const):
+ (WebCore::RenderStyle::getTextShadowVerticalExtent const):
+
+2022-03-21 Alan Coon <[email protected]>
+
Cherry-pick r291326. rdar://problem/85551863
Video poster disappears prematurely on play, leaving transparent video element.
Modified: branches/safari-613-branch/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp (291670 => 291671)
--- branches/safari-613-branch/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp 2022-03-22 17:57:03 UTC (rev 291670)
+++ branches/safari-613-branch/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp 2022-03-22 17:57:08 UTC (rev 291671)
@@ -138,6 +138,7 @@
: formattingState().layoutState().geometryForBox(layoutBox.initialContainingBlock()).contentBox().size();
auto strokeOverflow = ceilf(style.computedStrokeWidth(ceiledIntSize(initialContaingBlockSize)));
auto inkOverflow = textRunRect;
+
inkOverflow.inflate(strokeOverflow);
auto letterSpacing = style.fontCascade().letterSpacing();
if (letterSpacing < 0) {
@@ -144,6 +145,10 @@
// Last letter's negative spacing shrinks logical rect. Push it to ink overflow.
inkOverflow.expand(-letterSpacing, { });
}
+
+ auto textShadow = style.textShadowExtent();
+ inkOverflow.inflate(-textShadow.top(), textShadow.right(), textShadow.bottom(), -textShadow.left());
+
return inkOverflow;
};
auto content = downcast<InlineTextBox>(layoutBox).content();
Modified: branches/safari-613-branch/Source/WebCore/rendering/style/RenderStyle.h (291670 => 291671)
--- branches/safari-613-branch/Source/WebCore/rendering/style/RenderStyle.h 2022-03-22 17:57:03 UTC (rev 291670)
+++ branches/safari-613-branch/Source/WebCore/rendering/style/RenderStyle.h 2022-03-22 17:57:08 UTC (rev 291671)
@@ -502,6 +502,7 @@
float outlineOffset() const;
const ShadowData* textShadow() const { return m_rareInheritedData->textShadow.get(); }
+ LayoutBoxExtent textShadowExtent() const { return shadowExtent(textShadow()); }
void getTextShadowInlineDirectionExtent(LayoutUnit& logicalLeft, LayoutUnit& logicalRight) const { getShadowInlineDirectionExtent(textShadow(), logicalLeft, logicalRight); }
void getTextShadowBlockDirectionExtent(LayoutUnit& logicalTop, LayoutUnit& logicalBottom) const { getShadowBlockDirectionExtent(textShadow(), logicalTop, logicalBottom); }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes