Diff
Modified: trunk/LayoutTests/ChangeLog (283863 => 283864)
--- trunk/LayoutTests/ChangeLog 2021-10-09 06:18:20 UTC (rev 283863)
+++ trunk/LayoutTests/ChangeLog 2021-10-09 06:24:30 UTC (rev 283864)
@@ -1,3 +1,41 @@
+2021-10-08 Devin Rousso <[email protected]>
+
+ [GPU Process] support rendering Apple Pay logos
+ https://bugs.webkit.org/show_bug.cgi?id=230664
+ <rdar://problem/83187282>
+
+ Reviewed by Tim Horton.
+
+ * fast/css/webkit-named-image/apple-pay-logo-black/background-size-centered.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-black/background-size-centered-expected-mismatch.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-black/background-size.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-black/background-size-expected-mismatch.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-black/basic.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-black/basic-expected-mismatch.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-black/container-larger-height.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-black/container-larger-height-expected-mismatch.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-black/container-larger-width.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-black/container-larger-width-expected-mismatch.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-black/mask.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-black/mask-expected-mismatch.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-white/background-size-centered.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-white/background-size-centered-expected-mismatch.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-white/background-size.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-white/background-size-expected-mismatch.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-white/basic.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-white/basic-expected-mismatch.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-white/container-larger-height.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-white/container-larger-height-expected-mismatch.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-white/container-larger-width.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-white/container-larger-width-expected-mismatch.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-white/mask.html: Added.
+ * fast/css/webkit-named-image/apple-pay-logo-white/mask-expected-mismatch.html: Added.
+
+ * TestExpectations:
+ * platform/ios/TestExpectations:
+ * platform/mac/TestExpectations:
+ Skip the above tests everywhere except iOS and macOS.
+
2021-10-08 Simon Fraser <[email protected]>
Unreviewed. Fix up some TestExpectations errors.
Modified: trunk/LayoutTests/TestExpectations (283863 => 283864)
--- trunk/LayoutTests/TestExpectations 2021-10-09 06:18:20 UTC (rev 283863)
+++ trunk/LayoutTests/TestExpectations 2021-10-09 06:24:30 UTC (rev 283864)
@@ -254,6 +254,8 @@
fast/css/appearance-apple-pay-button-border-radius.html [ Skip ]
fast/css/appearance-apple-pay-button-default-corners.html [ Skip ]
fast/css/getComputedStyle/computed-style-apple-pay-button.html [ Skip ]
+fast/css/webkit-named-image/apple-pay-logo-black [ Skip ]
+fast/css/webkit-named-image/apple-pay-logo-white [ Skip ]
http/tests/ssl/applepay/ [ Skip ]
# Only WK2 allows unconstrained scrolling
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/background-size-centered-expected-mismatch.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/background-size-centered-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/background-size-centered-expected-mismatch.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1 @@
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/background-size-centered.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/background-size-centered.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/background-size-centered.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1,11 @@
+<style>
+div {
+ width: 100px;
+ height: 100px;
+ background-image: -webkit-named-image(apple-pay-logo-black);
+ background-size: 50px 50px;
+ background-position: 50% 50%;
+ background-repeat: no-repeat;
+}
+</style>
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/background-size-expected-mismatch.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/background-size-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/background-size-expected-mismatch.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1 @@
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/background-size.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/background-size.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/background-size.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1,10 @@
+<style>
+div {
+ width: 100px;
+ height: 100px;
+ background-image: -webkit-named-image(apple-pay-logo-black);
+ background-size: 50px 50px;
+ background-repeat: no-repeat;
+}
+</style>
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/basic-expected-mismatch.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/basic-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/basic-expected-mismatch.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1 @@
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/basic.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/basic.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/basic.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1,10 @@
+<style>
+div {
+ width: 100px;
+ height: 100px;
+ background-image: -webkit-named-image(apple-pay-logo-black);
+ background-size: 100% 100%;
+ background-repeat: no-repeat;
+}
+</style>
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/container-larger-height-expected-mismatch.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/container-larger-height-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/container-larger-height-expected-mismatch.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1 @@
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/container-larger-height.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/container-larger-height.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/container-larger-height.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1,10 @@
+<style>
+div {
+ width: 100px;
+ height: 150px;
+ background-image: -webkit-named-image(apple-pay-logo-black);
+ background-size: 100% 100%;
+ background-repeat: no-repeat;
+}
+</style>
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/container-larger-width-expected-mismatch.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/container-larger-width-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/container-larger-width-expected-mismatch.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1 @@
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/container-larger-width.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/container-larger-width.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/container-larger-width.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1,10 @@
+<style>
+div {
+ width: 150px;
+ height: 100px;
+ background-image: -webkit-named-image(apple-pay-logo-black);
+ background-size: 100% 100%;
+ background-repeat: no-repeat;
+}
+</style>
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/mask-expected-mismatch.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/mask-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/mask-expected-mismatch.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1 @@
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/mask.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/mask.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-black/mask.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1,10 @@
+<style>
+div {
+ width: 100px;
+ height: 100px;
+ background-color: blue;
+ -webkit-mask-image: -webkit-named-image(apple-pay-logo-white);
+ -webkit-mask-size: 100% 100%;
+}
+</style>
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/background-size-centered-expected-mismatch.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/background-size-centered-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/background-size-centered-expected-mismatch.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1 @@
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/background-size-centered.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/background-size-centered.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/background-size-centered.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1,12 @@
+<style>
+div {
+ width: 100px;
+ height: 100px;
+ background-color: black;
+ background-image: -webkit-named-image(apple-pay-logo-white);
+ background-size: 50px 50px;
+ background-position: 50% 50%;
+ background-repeat: no-repeat;
+}
+</style>
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/background-size-expected-mismatch.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/background-size-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/background-size-expected-mismatch.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1 @@
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/background-size.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/background-size.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/background-size.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1,11 @@
+<style>
+div {
+ width: 100px;
+ height: 100px;
+ background-color: black;
+ background-image: -webkit-named-image(apple-pay-logo-white);
+ background-size: 50px 50px;
+ background-repeat: no-repeat;
+}
+</style>
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/basic-expected-mismatch.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/basic-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/basic-expected-mismatch.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1 @@
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/basic.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/basic.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/basic.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1,11 @@
+<style>
+div {
+ width: 100px;
+ height: 100px;
+ background-color: black;
+ background-image: -webkit-named-image(apple-pay-logo-white);
+ background-size: 100% 100%;
+ background-repeat: no-repeat;
+}
+</style>
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/container-larger-height-expected-mismatch.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/container-larger-height-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/container-larger-height-expected-mismatch.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1 @@
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/container-larger-height.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/container-larger-height.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/container-larger-height.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1,11 @@
+<style>
+div {
+ width: 100px;
+ height: 150px;
+ background-color: black;
+ background-image: -webkit-named-image(apple-pay-logo-white);
+ background-size: 100% 100%;
+ background-repeat: no-repeat;
+}
+</style>
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/container-larger-width-expected-mismatch.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/container-larger-width-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/container-larger-width-expected-mismatch.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1 @@
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/container-larger-width.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/container-larger-width.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/container-larger-width.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1,11 @@
+<style>
+div {
+ width: 150px;
+ height: 100px;
+ background-color: black;
+ background-image: -webkit-named-image(apple-pay-logo-white);
+ background-size: 100% 100%;
+ background-repeat: no-repeat;
+}
+</style>
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/mask-expected-mismatch.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/mask-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/mask-expected-mismatch.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1 @@
+<div></div>
Added: trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/mask.html (0 => 283864)
--- trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/mask.html (rev 0)
+++ trunk/LayoutTests/fast/css/webkit-named-image/apple-pay-logo-white/mask.html 2021-10-09 06:24:30 UTC (rev 283864)
@@ -0,0 +1,10 @@
+<style>
+div {
+ width: 100px;
+ height: 100px;
+ background-color: blue;
+ -webkit-mask-image: -webkit-named-image(apple-pay-logo-white);
+ -webkit-mask-size: 100% 100%;
+}
+</style>
+<div></div>
Modified: trunk/LayoutTests/platform/ios/TestExpectations (283863 => 283864)
--- trunk/LayoutTests/platform/ios/TestExpectations 2021-10-09 06:18:20 UTC (rev 283863)
+++ trunk/LayoutTests/platform/ios/TestExpectations 2021-10-09 06:24:30 UTC (rev 283864)
@@ -39,6 +39,8 @@
fast/css/appearance-apple-pay-button.html [ Pass ]
fast/css/appearance-apple-pay-button-border-radius.html [ Pass ]
fast/css/appearance-apple-pay-button-default-corners.html [ Pass ]
+fast/css/webkit-named-image/apple-pay-logo-black [ Pass ]
+fast/css/webkit-named-image/apple-pay-logo-white [ Pass ]
fast/css/getComputedStyle/computed-style-apple-pay-button.html [ Pass ]
fast/css/ios [ Pass ]
Modified: trunk/LayoutTests/platform/mac/TestExpectations (283863 => 283864)
--- trunk/LayoutTests/platform/mac/TestExpectations 2021-10-09 06:18:20 UTC (rev 283863)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2021-10-09 06:24:30 UTC (rev 283864)
@@ -1061,6 +1061,8 @@
fast/css/appearance-apple-pay-button.html [ Pass ]
fast/css/appearance-apple-pay-button-border-radius.html [ Pass ]
fast/css/appearance-apple-pay-button-default-corners.html [ Pass ]
+fast/css/webkit-named-image/apple-pay-logo-black [ Pass ]
+fast/css/webkit-named-image/apple-pay-logo-white [ Pass ]
fast/css/getComputedStyle/computed-style-apple-pay-button.html [ Pass ]
# <rdar://problem/23504749> imported/w3c/web-platform-tests/xhr/response-method.htm failing
Modified: trunk/Source/WebCore/ChangeLog (283863 => 283864)
--- trunk/Source/WebCore/ChangeLog 2021-10-09 06:18:20 UTC (rev 283863)
+++ trunk/Source/WebCore/ChangeLog 2021-10-09 06:24:30 UTC (rev 283864)
@@ -1,5 +1,22 @@
2021-10-08 Devin Rousso <[email protected]>
+ [GPU Process] support rendering Apple Pay logos
+ https://bugs.webkit.org/show_bug.cgi?id=230664
+ <rdar://problem/83187282>
+
+ Reviewed by Tim Horton.
+
+ * platform/cocoa/ThemeCocoa.mm:
+ (WebCore::drawApplePayButton):
+ Instead of drawing directly into the `GraphicsContext::platformContext` (which will not be
+ valid in the WebProcess when DOM rendering happens in the GPUProcess), first draw into a
+ temporary `ImageBuffer` and then consume it to draw into the actual/used `GraphicsContext`.
+ While it is possible to create a dedicated display list item for this, we don't want to do
+ that because we need to load PDFs from PassKit, which are not as secure as we'd like for use
+ in the GPUProcess.
+
+2021-10-08 Devin Rousso <[email protected]>
+
[iOS][GPU Process] support `<attachment>`
https://bugs.webkit.org/show_bug.cgi?id=230781
<rdar://problem/70884096>
Modified: trunk/Source/WebCore/platform/cocoa/ThemeCocoa.mm (283863 => 283864)
--- trunk/Source/WebCore/platform/cocoa/ThemeCocoa.mm 2021-10-09 06:18:20 UTC (rev 283863)
+++ trunk/Source/WebCore/platform/cocoa/ThemeCocoa.mm 2021-10-09 06:24:30 UTC (rev 283864)
@@ -28,6 +28,7 @@
#import "FontCascade.h"
#import "GraphicsContext.h"
+#import "ImageBuffer.h"
#import <dlfcn.h>
namespace WebCore {
@@ -109,14 +110,19 @@
static void drawApplePayButton(GraphicsContext& context, CGPDFPageRef page, const FloatRect& rect)
{
+ auto imageBuffer = ImageBuffer::createCompatibleBuffer(rect.size(), context);
+ if (!imageBuffer)
+ return;
+
CGSize pdfSize = CGPDFPageGetBoxRect(page, kCGPDFMediaBox).size;
- GraphicsContextStateSaver stateSaver(context);
- fitContextToBox(context, FloatSize(pdfSize), rect.size());
- CGContextTranslateCTM(context.platformContext(), 0, pdfSize.height);
- CGContextScaleCTM(context.platformContext(), 1, -1);
+ auto& imageContext = imageBuffer->context();
+ fitContextToBox(imageContext, FloatSize(pdfSize), rect.size());
+ imageContext.translate(0, pdfSize.height);
+ imageContext.scale(FloatSize(1, -1));
+ CGContextDrawPDFPage(imageContext.platformContext(), page);
- CGContextDrawPDFPage(context.platformContext(), page);
+ context.drawConsumingImageBuffer(WTFMove(imageBuffer), rect);
};
#endif