Title: [272161] branches/safari-611-branch
- Revision
- 272161
- Author
- [email protected]
- Date
- 2021-02-01 12:11:55 -0800 (Mon, 01 Feb 2021)
Log Message
Cherry-pick r272059. rdar://problem/73838832
REGRESSION(r262893): feComponentTransfer is not rendered correctly on Retina display
https://bugs.webkit.org/show_bug.cgi?id=220576
Reviewed by Simon Fraser.
Source/WebCore:
convertImageDataToColorSpace() creates a temporary ImageBuffer with the
size of m_premultipliedImageResult. This ImageBuffer has to be scaled
with the filterScale(). But the size of m_premultipliedImageResult is
scaled with the filterScale(). This means, convertImageDataToColorSpace()
applies the filterScale() twice to the temporary ImageBuffer.
The fix is to create the temporary ImageBuffer with the unscaled size of
the input ImageData and scale it with the filterScale().
Test: fast/hidpi/filters-component-transfer.html
* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::convertImageDataToColorSpace):
(WebCore::FilterEffect::copyPremultipliedResult):
LayoutTests:
* fast/hidpi/filters-component-transfer-expected.html: Added.
* fast/hidpi/filters-component-transfer.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Added Paths
Diff
Modified: branches/safari-611-branch/LayoutTests/ChangeLog (272160 => 272161)
--- branches/safari-611-branch/LayoutTests/ChangeLog 2021-02-01 20:11:51 UTC (rev 272160)
+++ branches/safari-611-branch/LayoutTests/ChangeLog 2021-02-01 20:11:55 UTC (rev 272161)
@@ -1,5 +1,49 @@
2021-02-01 Alan Coon <[email protected]>
+ Cherry-pick r272059. rdar://problem/73838832
+
+ REGRESSION(r262893): feComponentTransfer is not rendered correctly on Retina display
+ https://bugs.webkit.org/show_bug.cgi?id=220576
+
+ Reviewed by Simon Fraser.
+
+ Source/WebCore:
+
+ convertImageDataToColorSpace() creates a temporary ImageBuffer with the
+ size of m_premultipliedImageResult. This ImageBuffer has to be scaled
+ with the filterScale(). But the size of m_premultipliedImageResult is
+ scaled with the filterScale(). This means, convertImageDataToColorSpace()
+ applies the filterScale() twice to the temporary ImageBuffer.
+
+ The fix is to create the temporary ImageBuffer with the unscaled size of
+ the input ImageData and scale it with the filterScale().
+
+ Test: fast/hidpi/filters-component-transfer.html
+
+ * platform/graphics/filters/FilterEffect.cpp:
+ (WebCore::FilterEffect::convertImageDataToColorSpace):
+ (WebCore::FilterEffect::copyPremultipliedResult):
+
+ LayoutTests:
+
+ * fast/hidpi/filters-component-transfer-expected.html: Added.
+ * fast/hidpi/filters-component-transfer.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-01-29 Said Abou-Hallawa <[email protected]>
+
+ REGRESSION(r262893): feComponentTransfer is not rendered correctly on Retina display
+ https://bugs.webkit.org/show_bug.cgi?id=220576
+
+ Reviewed by Simon Fraser.
+
+ * fast/hidpi/filters-component-transfer-expected.html: Added.
+ * fast/hidpi/filters-component-transfer.html: Added.
+
+2021-02-01 Alan Coon <[email protected]>
+
Cherry-pick r272054. rdar://problem/73838900
[css-flexbox] REGRESSION(r266695): content inside a `<button>` inside a flex container has a height of `0` without a declared `min-height`
Added: branches/safari-611-branch/LayoutTests/fast/hidpi/filters-component-transfer-expected.html (0 => 272161)
--- branches/safari-611-branch/LayoutTests/fast/hidpi/filters-component-transfer-expected.html (rev 0)
+++ branches/safari-611-branch/LayoutTests/fast/hidpi/filters-component-transfer-expected.html 2021-02-01 20:11:55 UTC (rev 272161)
@@ -0,0 +1,11 @@
+<script src=""
+<style>
+ #box {
+ width: 100px;
+ height: 100px;
+ background-color: green;
+ }
+</style>
+<body>
+ <div id="box"></div>
+</body>
Added: branches/safari-611-branch/LayoutTests/fast/hidpi/filters-component-transfer.html (0 => 272161)
--- branches/safari-611-branch/LayoutTests/fast/hidpi/filters-component-transfer.html (rev 0)
+++ branches/safari-611-branch/LayoutTests/fast/hidpi/filters-component-transfer.html 2021-02-01 20:11:55 UTC (rev 272161)
@@ -0,0 +1,18 @@
+<script src=""
+<style>
+ #box {
+ width: 100px;
+ height: 100px;
+ background-color: green;
+ filter: url("#a");
+ }
+</style>
+<body>
+ <div id="box"></div>
+ <svg>
+ <filter id="a">
+ <feComponentTransfer/>
+ <feGaussianBlur stdDeviation="0"/>
+ </filter>
+ </svg>
+</body>
Modified: branches/safari-611-branch/Source/WebCore/ChangeLog (272160 => 272161)
--- branches/safari-611-branch/Source/WebCore/ChangeLog 2021-02-01 20:11:51 UTC (rev 272160)
+++ branches/safari-611-branch/Source/WebCore/ChangeLog 2021-02-01 20:11:55 UTC (rev 272161)
@@ -1,5 +1,61 @@
2021-02-01 Alan Coon <[email protected]>
+ Cherry-pick r272059. rdar://problem/73838832
+
+ REGRESSION(r262893): feComponentTransfer is not rendered correctly on Retina display
+ https://bugs.webkit.org/show_bug.cgi?id=220576
+
+ Reviewed by Simon Fraser.
+
+ Source/WebCore:
+
+ convertImageDataToColorSpace() creates a temporary ImageBuffer with the
+ size of m_premultipliedImageResult. This ImageBuffer has to be scaled
+ with the filterScale(). But the size of m_premultipliedImageResult is
+ scaled with the filterScale(). This means, convertImageDataToColorSpace()
+ applies the filterScale() twice to the temporary ImageBuffer.
+
+ The fix is to create the temporary ImageBuffer with the unscaled size of
+ the input ImageData and scale it with the filterScale().
+
+ Test: fast/hidpi/filters-component-transfer.html
+
+ * platform/graphics/filters/FilterEffect.cpp:
+ (WebCore::FilterEffect::convertImageDataToColorSpace):
+ (WebCore::FilterEffect::copyPremultipliedResult):
+
+ LayoutTests:
+
+ * fast/hidpi/filters-component-transfer-expected.html: Added.
+ * fast/hidpi/filters-component-transfer.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-01-29 Said Abou-Hallawa <[email protected]>
+
+ REGRESSION(r262893): feComponentTransfer is not rendered correctly on Retina display
+ https://bugs.webkit.org/show_bug.cgi?id=220576
+
+ Reviewed by Simon Fraser.
+
+ convertImageDataToColorSpace() creates a temporary ImageBuffer with the
+ size of m_premultipliedImageResult. This ImageBuffer has to be scaled
+ with the filterScale(). But the size of m_premultipliedImageResult is
+ scaled with the filterScale(). This means, convertImageDataToColorSpace()
+ applies the filterScale() twice to the temporary ImageBuffer.
+
+ The fix is to create the temporary ImageBuffer with the unscaled size of
+ the input ImageData and scale it with the filterScale().
+
+ Test: fast/hidpi/filters-component-transfer.html
+
+ * platform/graphics/filters/FilterEffect.cpp:
+ (WebCore::FilterEffect::convertImageDataToColorSpace):
+ (WebCore::FilterEffect::copyPremultipliedResult):
+
+2021-02-01 Alan Coon <[email protected]>
+
Cherry-pick r272054. rdar://problem/73838900
[css-flexbox] REGRESSION(r266695): content inside a `<button>` inside a flex container has a height of `0` without a declared `min-height`
Modified: branches/safari-611-branch/Source/WebCore/platform/graphics/filters/FilterEffect.cpp (272160 => 272161)
--- branches/safari-611-branch/Source/WebCore/platform/graphics/filters/FilterEffect.cpp 2021-02-01 20:11:51 UTC (rev 272160)
+++ branches/safari-611-branch/Source/WebCore/platform/graphics/filters/FilterEffect.cpp 2021-02-01 20:11:55 UTC (rev 272161)
@@ -436,7 +436,8 @@
RefPtr<ImageData> FilterEffect::convertImageDataToColorSpace(ColorSpace targetColorSpace, ImageData& inputData, AlphaPremultiplication outputFormat)
{
IntRect destinationRect(IntPoint(), inputData.size());
- FloatSize clampedSize = ImageBuffer::clampedSize(inputData.size());
+ destinationRect.scale(1 / m_filter.filterScale());
+ FloatSize clampedSize = ImageBuffer::clampedSize(destinationRect.size());
// Create an ImageBuffer to store incoming ImageData
auto buffer = ImageBuffer::create(clampedSize, m_filter.renderingMode(), m_filter.filterScale(), operatingColorSpace());
if (!buffer)
@@ -535,8 +536,7 @@
copyPremultiplyingAlpha(*m_unmultipliedImageResult->data(), *m_premultipliedImageResult->data(), inputSize);
}
}
-
- RefPtr<ImageData> convertedImageData;
+
if (requiresImageDataColorSpaceConversion(colorSpace)) {
copyConvertedImageDataToDestination(destination, *m_premultipliedImageResult, *colorSpace, AlphaPremultiplication::Premultiplied, rect);
return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes