Skip to content

Commit 6860206

Browse files
committed
Disable display-p3 canvas and ImageData on platforms other than Monterey+ and iOS 15+
https://bugs.webkit.org/show_bug.cgi?id=230139 <rdar://81828819> Reviewed by Sam Weinig. Source/WebCore: * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::write): (WebCore::CloneDeserializer::read): * html/canvas/PredefinedColorSpace.cpp: (WebCore::toDestinationColorSpace): (WebCore::toPredefinedColorSpace): * html/canvas/PredefinedColorSpace.h: * html/canvas/PredefinedColorSpace.idl: Source/WTF: Add HAVE(CORE_ANIMATION_FIX_FOR_RADAR_78402035) to represent whether CoreAnimation has a fix for a bug that prevents Display P3 canvas rendering operations from behaving correctly. Add ENABLE(PREDEFINED_COLOR_SPACE_DISPLAY_P3) to represent whether the "display-p3" values of the PredefinedColorSpace IDL enum is enabled. This in turn controls whether Display P3 canvases and ImageData objects can be created. We turn this on only for platforms where ENABLE(DESTINATION_COLOR_SPACE_DISPLAY_P3), since that is what the canvas and ImageData backing stores use, and only if HAVE(CORE_ANIMATION_FIX_FOR_RADAR_78402035). The result is that these features are only enabled on macOS Monterey+ and iOS 15+. * wtf/PlatformEnable.h: * wtf/PlatformEnableCocoa.h: * wtf/PlatformHave.h: LayoutTests: * TestExpectations: * platform/glib/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-draw-high-bit-depth-images-expected.txt: Removed. * platform/ios-14/TestExpectations: * platform/ios/TestExpectations: * platform/ios/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-draw-high-bit-depth-images-expected.txt: Removed. * platform/mac-bigsur/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-draw-high-bit-depth-images-expected.txt: Removed. * platform/mac-catalina/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-draw-high-bit-depth-images-expected.txt: Removed. * platform/mac/TestExpectations: Canonical link: https://commits.webkit.org/241738@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@282513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent f10f6b5 commit 6860206

18 files changed

Lines changed: 151 additions & 180 deletions

File tree

LayoutTests/ChangeLog

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
2021-09-16 Cameron McCormack <heycam@apple.com>
2+
3+
Disable display-p3 canvas and ImageData on platforms other than Monterey+ and iOS 15+
4+
https://bugs.webkit.org/show_bug.cgi?id=230139
5+
<rdar://81828819>
6+
7+
Reviewed by Sam Weinig.
8+
9+
* TestExpectations:
10+
* platform/glib/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-draw-high-bit-depth-images-expected.txt: Removed.
11+
* platform/ios-14/TestExpectations:
12+
* platform/ios/TestExpectations:
13+
* platform/ios/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-draw-high-bit-depth-images-expected.txt: Removed.
14+
* platform/mac-bigsur/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-draw-high-bit-depth-images-expected.txt: Removed.
15+
* platform/mac-catalina/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-draw-high-bit-depth-images-expected.txt: Removed.
16+
* platform/mac/TestExpectations:
17+
118
2021-09-15 Alex Christensen <achristensen@webkit.org>
219

320
Add IDL skeleton for SharedWorker

LayoutTests/TestExpectations

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5247,6 +5247,21 @@ webkit.org/b/227086 imported/w3c/web-platform-tests/webxr/xrWebGLLayer_construct
52475247
# Invalid test. Tests color(lab ...) which has been removed from the standard.
52485248
imported/w3c/web-platform-tests/css/css-color/predefined-013.html [ Skip ]
52495249

5250+
# display-p3 canvas and ImageData are Cocoa only for now.
5251+
fast/canvas/canvas-color-space-display-p3-ImageData.html [ Failure ]
5252+
fast/canvas/canvas-color-space-display-p3.html [ Failure ]
5253+
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-draw-high-bit-depth-images.html [ Failure ]
5254+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.html [ Failure ]
5255+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.shadow.html [ Failure ]
5256+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.strokeText.html [ Failure ]
5257+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.p3.html [ Failure ]
5258+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.srgb.html [ Failure ]
5259+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.p3.canvas.html [ Failure ]
5260+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.with.putImageData.html [ Failure ]
5261+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.p3.canvas.html [ Failure ]
5262+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.with.putImageData.html [ Failure ]
5263+
storage/indexeddb/structured-clone-image-data-display-p3.html [ Failure ]
5264+
52505265
webkit.org/b/226942 imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/active-processing.https.html [ Pass Failure ]
52515266

52525267
webkit.org/b/227849 imported/w3c/web-platform-tests/css/css-overflow/overflow-body-propagation-007.html [ Skip ]

LayoutTests/platform/glib/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-draw-high-bit-depth-images-expected.txt

Lines changed: 0 additions & 43 deletions
This file was deleted.

LayoutTests/platform/ios-14/TestExpectations

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,26 @@ imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitma
6868
# Privacy Transparency tests are iOS15 only.
6969
http/tests/app-privacy-report/ [ Skip ]
7070

71+
# display-p3 canvas and ImageData are iOS 15+.
72+
fast/canvas/canvas-color-space-display-p3-ImageData.html [ Failure ]
73+
fast/canvas/canvas-color-space-display-p3.html [ Failure ]
74+
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-draw-high-bit-depth-images.html [ Failure ]
75+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.html [ Failure ]
76+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.shadow.html [ Failure ]
77+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.strokeText.html [ Failure ]
78+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.p3.html [ Failure ]
79+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.srgb.html [ Failure ]
80+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.p3.canvas.html [ Failure ]
81+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.with.putImageData.html [ Failure ]
82+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.p3.canvas.html [ Failure ]
83+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.with.putImageData.html [ Failure ]
84+
storage/indexeddb/structured-clone-image-data-display-p3.html [ Failure ]
85+
86+
#webkit.org/b/229573
87+
imported/w3c/web-platform-tests/service-workers/service-worker/getregistrations.https.html [ Pass Failure ]
88+
imported/w3c/web-platform-tests/service-workers/service-worker/register-default-scope.https.html [ Pass Failure ]
89+
imported/w3c/web-platform-tests/service-workers/service-worker/http-to-https-redirect-and-register.https.html [ Pass Failure ]
90+
7191
# rdar://79084756 ((r278618) media/modern-media-controls /overflow-support/chapters.html is timing out since introduction (226828))
7292
media/modern-media-controls/overflow-support/chapters.html [ Pass ]
7393

LayoutTests/platform/ios/TestExpectations

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3484,6 +3484,21 @@ imported/w3c/web-platform-tests/css/css-typed-om/width-by-max-px-em.html [ Pass
34843484
webkit.org/b/228176 fast/text/variable-system-font.html [ ImageOnlyFailure ]
34853485
webkit.org/b/228176 fast/text/variable-system-font-2.html [ Pass ]
34863486

3487+
# display-p3 canvas and ImageData are Cocoa only for now.
3488+
fast/canvas/canvas-color-space-display-p3-ImageData.html [ Pass ]
3489+
fast/canvas/canvas-color-space-display-p3.html [ Pass ]
3490+
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-draw-high-bit-depth-images.html [ Pass ]
3491+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.html [ Pass ]
3492+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.shadow.html [ Pass ]
3493+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.strokeText.html [ Pass ]
3494+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.p3.html [ Pass ]
3495+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.srgb.html [ Pass ]
3496+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.p3.canvas.html [ Pass ]
3497+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.with.putImageData.html [ Pass ]
3498+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.p3.canvas.html [ Pass ]
3499+
imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.with.putImageData.html [ Pass ]
3500+
storage/indexeddb/structured-clone-image-data-display-p3.html [ Pass ]
3501+
34873502
# Show 1px diff in the result. Maybe hitting the background bleed avoidance code path.
34883503
webkit.org/b/229397 imported/w3c/web-platform-tests/css/css-writing-modes/abs-pos-non-replaced-vlr-109.xht [ ImageOnlyFailure ]
34893504
webkit.org/b/229397 imported/w3c/web-platform-tests/css/css-writing-modes/abs-pos-non-replaced-vlr-125.xht [ ImageOnlyFailure ]

0 commit comments

Comments
 (0)