Diff
Modified: trunk/LayoutTests/ChangeLog (279502 => 279503)
--- trunk/LayoutTests/ChangeLog 2021-07-02 14:13:18 UTC (rev 279502)
+++ trunk/LayoutTests/ChangeLog 2021-07-02 14:45:56 UTC (rev 279503)
@@ -1,3 +1,16 @@
+2021-07-02 Commit Queue <commit-qu...@webkit.org>
+
+ Unreviewed, reverting r279487.
+ https://bugs.webkit.org/show_bug.cgi?id=227626
+
+ Added broken ios-wk2 test
+
+ Reverted changeset:
+
+ "WebAudio auto-play policy should come from top document"
+ https://bugs.webkit.org/show_bug.cgi?id=227593
+ https://commits.webkit.org/r279487
+
2021-07-02 Razvan Caliman <rcali...@apple.com>
Web Inspector: Styles: should autocomplete `var()` and `attr()` values
Deleted: trunk/LayoutTests/media/auto-play-video-in-about-blank-iframe-expected.txt (279502 => 279503)
--- trunk/LayoutTests/media/auto-play-video-in-about-blank-iframe-expected.txt 2021-07-02 14:13:18 UTC (rev 279502)
+++ trunk/LayoutTests/media/auto-play-video-in-about-blank-iframe-expected.txt 2021-07-02 14:45:56 UTC (rev 279503)
@@ -1,19 +0,0 @@
-
-
-*** Test with auto-play policy set to 'Allow'
-EVENT(load)
-EVENT(message)
-PASS: Video auto-played
-
-*** Test with auto-play policy set to 'AllowWithoutSound'
-EVENT(load)
-EVENT(message)
-PASS: Video did not auto-play
-
-*** Test with auto-play policy set to 'Deny'
-EVENT(load)
-EVENT(message)
-PASS: Video did not auto-play
-
-END OF TEST
-
Deleted: trunk/LayoutTests/media/auto-play-video-in-about-blank-iframe.html (279502 => 279503)
--- trunk/LayoutTests/media/auto-play-video-in-about-blank-iframe.html 2021-07-02 14:13:18 UTC (rev 279502)
+++ trunk/LayoutTests/media/auto-play-video-in-about-blank-iframe.html 2021-07-02 14:45:56 UTC (rev 279503)
@@ -1,80 +0,0 @@
-<head>
- <style>
- iframe {
- width: 320px;
- height: 240px;
- }
- </style>
- <script src=""
- <script src=""
- <script>
- if (window.testRunner) {
- testRunner.waitUntilDone();
- testRunner.dumpAsText();
- }
-
- async function checkAutoPlay(allowed)
- {
- let message = allowed ? "Video auto-played" : "Video did not auto-play";
- let video = iframe.contentDocument.querySelector("video");
-
- let played;
- let counter = 0;
- while (++counter < 20) {
- played = video.ended || video.currentTime != 0;
- if (allowed === played)
- break;
- await new Promise(resolve => setTimeout(resolve, 50));
- }
-
- if (allowed == played)
- consoleWrite(`PASS: ${allowed ? "Video auto-played" : "Video did not auto-play"}`);
- else
- consoleWrite(`FAIL: ${allowed ? "Video did not auto-play" : "Video auto-played"}`);
- }
-
- async function loadVideo(policy, allow)
- {
- consoleWrite(`<br>*** Test with auto-play policy set to '${policy}'`);
-
- if (window.internals)
- internals.setDocumentAutoplayPolicy(document, policy)
-
- iframe.src = '';
- await waitForEventWithTimeout(iframe, 'load', 4000, '"about:blank" iframe failed to load!');
-
- let script = iframe.contentDocument.head.appendChild(iframe.contentDocument.createElement('script'));
- let code = `
- let video=document.createElement('video');
- document.body.appendChild(video);
- video.controls = 1;
- video.autoplay = 1;
- video.src = '';
- video._oncanplaythrough_ = () => {
- window.parent.postMessage('loaded', '*')
- }`;
- script.appendChild(iframe.contentDocument.createTextNode(code));
-
- await waitForEventWithTimeout(window, 'message', 4000, 'iframe failed to send message!');
- await new Promise(resolve => setTimeout(resolve, 250));
- await checkAutoPlay(allow);
- }
-
- window.addEventListener('load', async () => {
- iframe = document.querySelector('iframe');
-
- await loadVideo('Allow', true);
-
- await loadVideo('AllowWithoutSound', false);
-
- await loadVideo('Deny', false);
-
- consoleWrite('');
- endTest();
- }, false);
-
- </script>
-</head>
-<body>
- <iframe ></iframe>
-</body>
Deleted: trunk/LayoutTests/media/auto-play-web-audio-in-about-blank-iframe-expected.txt (279502 => 279503)
--- trunk/LayoutTests/media/auto-play-web-audio-in-about-blank-iframe-expected.txt 2021-07-02 14:13:18 UTC (rev 279502)
+++ trunk/LayoutTests/media/auto-play-web-audio-in-about-blank-iframe-expected.txt 2021-07-02 14:45:56 UTC (rev 279503)
@@ -1,19 +0,0 @@
-
-
-*** Test with auto-play policy set to 'Allow'
-EVENT(load)
-EVENT(message)
-PASS: Video auto-played
-
-*** Test with auto-play policy set to 'AllowWithoutSound'
-EVENT(load)
-EVENT(message)
-PASS: Video did not auto-play
-
-*** Test with auto-play policy set to 'Deny'
-EVENT(load)
-EVENT(message)
-PASS: Video did not auto-play
-
-END OF TEST
-
Deleted: trunk/LayoutTests/media/auto-play-web-audio-in-about-blank-iframe.html (279502 => 279503)
--- trunk/LayoutTests/media/auto-play-web-audio-in-about-blank-iframe.html 2021-07-02 14:13:18 UTC (rev 279502)
+++ trunk/LayoutTests/media/auto-play-web-audio-in-about-blank-iframe.html 2021-07-02 14:45:56 UTC (rev 279503)
@@ -1,67 +0,0 @@
-<head>
- <style>
- iframe {
- width: 320px;
- height: 240px;
- }
- </style>
- <script src=""
- <script src=""
- <script>
- if (window.testRunner) {
- testRunner.waitUntilDone();
- testRunner.dumpAsText();
- }
-
- async function checkAutoPlay(state, allowed)
- {
- let message = allowed ? "AudioContext auto-played" : "AudioContext did not auto-play";
- if (allowed === (event.data ="" "running"))
- consoleWrite(`PASS: ${allowed ? "Video auto-played" : "Video did not auto-play"}`);
- else
- consoleWrite(`FAIL: ${allowed ? "Video did not auto-play" : "Video auto-played"}`);
- }
-
- async function loadVideo(policy, allow)
- {
- consoleWrite(`<br>*** Test with auto-play policy set to '${policy}'`);
-
- if (window.internals)
- internals.setDocumentAutoplayPolicy(document, policy)
-
- iframe.src = '';
- await waitForEventWithTimeout(iframe, 'load', 4000, '"about:blank" iframe failed to load!');
-
- let script = iframe.contentDocument.head.appendChild(iframe.contentDocument.createElement('script'));
- let code = `
- let context = new AudioContext();
- let node = context.createBufferSource();
- node.connect(context.destination);
- node.start();
- setTimeout(() => {
- window.parent.postMessage(context.state, '*');
- }, 250)`;
- script.appendChild(iframe.contentDocument.createTextNode(code));
-
- let event = await waitForEventWithTimeout(window, 'message', 4000, 'iframe failed to send message!');
- await checkAutoPlay(event.data, allow);
- }
-
- window.addEventListener('load', async () => {
- iframe = document.querySelector('iframe');
-
- await loadVideo('Allow', true);
-
- await loadVideo('AllowWithoutSound', false);
-
- await loadVideo('Deny', false);
-
- consoleWrite('');
- endTest();
- }, false);
-
- </script>
-</head>
-<body>
- <iframe ></iframe>
-</body>
Modified: trunk/LayoutTests/media/video-test.js (279502 => 279503)
--- trunk/LayoutTests/media/video-test.js 2021-07-02 14:13:18 UTC (rev 279502)
+++ trunk/LayoutTests/media/video-test.js 2021-07-02 14:45:56 UTC (rev 279503)
@@ -213,7 +213,7 @@
}
consoleWrite(`EVENT(${result.type})`);
- return Promise.resolve(result);
+ Promise.resolve(result);
});
}
Modified: trunk/Source/WebCore/ChangeLog (279502 => 279503)
--- trunk/Source/WebCore/ChangeLog 2021-07-02 14:13:18 UTC (rev 279502)
+++ trunk/Source/WebCore/ChangeLog 2021-07-02 14:45:56 UTC (rev 279503)
@@ -1,3 +1,16 @@
+2021-07-02 Commit Queue <commit-qu...@webkit.org>
+
+ Unreviewed, reverting r279487.
+ https://bugs.webkit.org/show_bug.cgi?id=227626
+
+ Added broken ios-wk2 test
+
+ Reverted changeset:
+
+ "WebAudio auto-play policy should come from top document"
+ https://bugs.webkit.org/show_bug.cgi?id=227593
+ https://commits.webkit.org/r279487
+
2021-07-02 Youenn Fablet <you...@apple.com>
Make LocalSampleBufferDisplayLayer::requestNotificationWhenReadyForVideoData hop to main thread before hopping to processing thread
Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp (279502 => 279503)
--- trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp 2021-07-02 14:13:18 UTC (rev 279502)
+++ trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp 2021-07-02 14:45:56 UTC (rev 279503)
@@ -135,7 +135,7 @@
void AudioContext::constructCommon()
{
ASSERT(document());
- if (document()->topDocument().audioPlaybackRequiresUserGesture())
+ if (document()->audioPlaybackRequiresUserGesture())
addBehaviorRestriction(RequireUserGestureForAudioStartRestriction);
else
m_restrictions = NoRestrictions;
Modified: trunk/Source/WebCore/testing/Internals.cpp (279502 => 279503)
--- trunk/Source/WebCore/testing/Internals.cpp 2021-07-02 14:13:18 UTC (rev 279502)
+++ trunk/Source/WebCore/testing/Internals.cpp 2021-07-02 14:45:56 UTC (rev 279503)
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2012 Google Inc. All rights reserved.
- * Copyright (C) 2013-2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -6418,20 +6418,5 @@
return result.toString();
}
-ExceptionOr<void> Internals::setDocumentAutoplayPolicy(Document& document, Internals::AutoplayPolicy policy)
-{
- static_assert(static_cast<uint8_t>(WebCore::AutoplayPolicy::Default) == static_cast<uint8_t>(Internals::AutoplayPolicy::Default), "Internals::Default != WebCore::Default");
- static_assert(static_cast<uint8_t>(WebCore::AutoplayPolicy::Allow) == static_cast<uint8_t>(Internals::AutoplayPolicy::Allow), "Internals::Allow != WebCore::Allow");
- static_assert(static_cast<uint8_t>(WebCore::AutoplayPolicy::AllowWithoutSound) == static_cast<uint8_t>(Internals::AutoplayPolicy::AllowWithoutSound), "Internals::AllowWithoutSound != WebCore::AllowWithoutSound");
- static_assert(static_cast<uint8_t>(WebCore::AutoplayPolicy::Deny) == static_cast<uint8_t>(Internals::AutoplayPolicy::Deny), "Internals::Deny != WebCore::Deny");
- auto* loader = document.loader();
- if (!loader)
- return Exception { InvalidStateError };
-
- loader->setAutoplayPolicy(static_cast<WebCore::AutoplayPolicy>(policy));
-
- return { };
-}
-
} // namespace WebCore
Modified: trunk/Source/WebCore/testing/Internals.h (279502 => 279503)
--- trunk/Source/WebCore/testing/Internals.h 2021-07-02 14:13:18 UTC (rev 279502)
+++ trunk/Source/WebCore/testing/Internals.h 2021-07-02 14:45:56 UTC (rev 279503)
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2012 Google Inc. All rights reserved.
- * Copyright (C) 2013-2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -1169,14 +1169,6 @@
String dumpStyleResolvers();
- enum class AutoplayPolicy : uint8_t {
- Default,
- Allow,
- AllowWithoutSound,
- Deny,
- };
- ExceptionOr<void> setDocumentAutoplayPolicy(Document&, AutoplayPolicy);
-
private:
explicit Internals(Document&);
Document* contextDocument() const;
Modified: trunk/Source/WebCore/testing/Internals.idl (279502 => 279503)
--- trunk/Source/WebCore/testing/Internals.idl 2021-07-02 14:13:18 UTC (rev 279502)
+++ trunk/Source/WebCore/testing/Internals.idl 2021-07-02 14:45:56 UTC (rev 279503)
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2012 Google Inc. All rights reserved.
- * Copyright (C) 2013-2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -105,13 +105,6 @@
"Timeout"
};
-enum AutoplayPolicy {
- "Default",
- "Allow",
- "AllowWithoutSound",
- "Deny"
-};
-
[
ExportMacro=WEBCORE_TESTSUPPORT_EXPORT,
Conditional=VIDEO,
@@ -1045,6 +1038,4 @@
undefined systemBeep();
DOMString dumpStyleResolvers();
-
- undefined setDocumentAutoplayPolicy(Document document, AutoplayPolicy policy);
};