Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@


PASS getPhotoSettings() on an 'ended' track should throw "InvalidStateError"
PASS Check getPhotoSettings()

48 changes: 48 additions & 0 deletions LayoutTests/fast/mediastream/image-capture-get-photo-settings.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>ImageCapture getPhotoSettings</title>
<script src='../../resources/testharness.js'></script>
<script src='../../resources/testharnessreport.js'></script>
</head>
<body>
<video controls autoplay width=640 height=480 playsInline id='video'></video>
<script>

promise_test(async (test) => {
const stream = await navigator.mediaDevices.getUserMedia({ video: { width : 640 } });
const [track] = stream.getVideoTracks();

assert_equals(track.readyState, 'live');
track.stop();
assert_equals(track.readyState, 'ended');

const imageCapture = new ImageCapture(track);
return promise_rejects_dom(test, 'InvalidStateError', imageCapture.getPhotoSettings())

}, `getPhotoSettings() on an 'ended' track should throw "InvalidStateError"`);

promise_test(async (test) => {
const stream = await navigator.mediaDevices.getUserMedia({ video: { width: 640, torch : true } });
const [track] = stream.getVideoTracks();

const imageCapture = new ImageCapture(track);
const trackSettings = track.getSettings();
let photoSettings = await imageCapture.getPhotoSettings();

assert_equals(photoSettings.imageHeight, trackSettings.height);
assert_equals(photoSettings.imageWidth, trackSettings.width);
assert_equals(photoSettings.fillLightMode, 'flash');

await track.applyConstraints({ torch : false });
photoSettings = await imageCapture.getPhotoSettings();
assert_equals(photoSettings.fillLightMode, 'off');

}, `Check getPhotoSettings()`);



</script>
</body>
</html>
10 changes: 10 additions & 0 deletions LayoutTests/platform/ios-16/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,13 @@ accessibility/ios-simulator/inline-prediction-attributed-string.html [ Skip ]

# Only supported with iOS 17 and later.
media/media-webm-opus-variable-length.html [ Failure ]

# webkit.org/b/262663 (REGRESSION(iOS17/Sonoma): 8 WebCryptoAPI tests are constantly crashing.)
imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_X25519.https.any.html [ Pass ]
imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_X25519.https.any.worker.html [ Pass ]
imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_X25519.https.any.html [ Pass ]
imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_X25519.https.any.worker.html [ Pass ]
imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey.https.any.html [ Pass ]
imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey.https.any.worker.html [ Pass ]
imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey_failures_X25519.https.any.html [ Pass ]
imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey_failures_X25519.https.any.worker.html [ Pass ]
10 changes: 10 additions & 0 deletions LayoutTests/platform/ios/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -4649,3 +4649,13 @@ imported/w3c/web-platform-tests/css/css-fonts/font-palette-modify.html [ ImageOn
imported/w3c/web-platform-tests/css/css-fonts/font-palette-remove.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-fonts/palette-values-rule-add.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-fonts/palette-values-rule-delete.html [ ImageOnlyFailure ]

# webkit.org/b/262663 (REGRESSION(iOS17/Sonoma): 8 WebCryptoAPI tests are constantly crashing.)
imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_X25519.https.any.html [ Crash ]
imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_X25519.https.any.worker.html [ Crash ]
imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_X25519.https.any.html [ Crash ]
imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_X25519.https.any.worker.html [ Crash ]
imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey.https.any.html [ Crash ]
imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey.https.any.worker.html [ Crash ]
imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey_failures_X25519.https.any.html [ Crash ]
imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey_failures_X25519.https.any.worker.html [ Crash ]
10 changes: 10 additions & 0 deletions LayoutTests/platform/mac/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -2886,3 +2886,13 @@ webkit.org/b/261306 imported/w3c/web-platform-tests/content-security-policy/repo

# rdar://114294654 (REGRESSION (265615@main): [ Sonoma ] fast/attachment/cocoa/wide-attachment-rendering.html is a constant failure)
[ Sonoma+ ] fast/attachment/cocoa/wide-attachment-rendering.html [ Failure ]

# webkit.org/b/262663 (REGRESSION(iOS17/Sonoma): 8 WebCryptoAPI tests are constantly crashing.)
[ Sonoma ] imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_X25519.https.any.html [ Crash ]
[ Sonoma ] imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_X25519.https.any.worker.html [ Crash ]
[ Sonoma ] imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_X25519.https.any.html [ Crash ]
[ Sonoma ] imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_X25519.https.any.worker.html [ Crash ]
[ Sonoma ] imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey.https.any.html [ Crash ]
[ Sonoma ] imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey.https.any.worker.html [ Crash ]
[ Sonoma ] imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey_failures_X25519.https.any.html [ Crash ]
[ Sonoma ] imported/w3c/web-platform-tests/WebCryptoAPI/import_export/okp_importKey_failures_X25519.https.any.worker.html [ Crash ]
16 changes: 16 additions & 0 deletions Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4914,6 +4914,22 @@ OffscreenCanvasInWorkersEnabled:
"PLATFORM(COCOA)": true
default: false

# FIXME: Reenable this on iOS once we can mitigate impact on memory use.
OpportunisticSweepingAndGarbageCollectionEnabled:
type: bool
status: internal
humanReadableName: "Opportunistic Sweeping and GC"
humanReadableDescription: "Enable Opportunistic Sweeping and GC"
category: javascript
defaultValue:
WebKitLegacy:
default: false
WebKit:
"PLATFORM(IOS_FAMILY)": false
default: true
WebCore:
default: false

OpusDecoderEnabled:
type: bool
status: mature
Expand Down
6 changes: 0 additions & 6 deletions Source/WTF/wtf/CrossThreadCopier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ static_assert((std::is_same<RefPtr<CopierThreadSafeRefCountedTest>, CrossThreadC
static_assert((std::is_same<RefPtr<CopierThreadSafeRefCountedTest>, CrossThreadCopier<CopierThreadSafeRefCountedTest*>::Type>::value), "RawPointerTest");
static_assert((std::is_same<Ref<CopierThreadSafeRefCountedTest>, CrossThreadCopier<Ref<CopierThreadSafeRefCountedTest>>::Type>::value), "RawPointerTest");

// Add specializations for RefCounted types which will let us verify that no other template matches.
template<typename T> struct CrossThreadCopierBase<false, false, RefPtr<T>> {
typedef int Type;
};

template<typename T> struct CrossThreadCopierBase<false, false, T*> {
typedef int Type;
};
Expand All @@ -57,7 +52,6 @@ template<typename T> struct CrossThreadCopierBase<false, false, T*> {
class CopierRefCountedTest : public RefCounted<CopierRefCountedTest> {
};

static_assert((std::is_same<int, CrossThreadCopier<RefPtr<CopierRefCountedTest>>::Type>::value), "CrossThreadCopier specialization improperly applied to RefPtr<> of a RefCounted (but not ThreadSafeRefCounted) type");
static_assert((std::is_same<int, CrossThreadCopier<CopierRefCountedTest*>::Type>::value), "CrossThreadCopier specialization improperly applied to raw pointer of a RefCounted (but not ThreadSafeRefCounted) type");

} // namespace WTF
Expand Down
Loading