Diff
Modified: trunk/Source/WebCore/ChangeLog (211199 => 211200)
--- trunk/Source/WebCore/ChangeLog 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebCore/ChangeLog 2017-01-26 04:24:10 UTC (rev 211200)
@@ -1,3 +1,16 @@
+2017-01-25 Ryan Haddad <[email protected]>
+
+ Unreviewed, rolling out r211193.
+
+ This change broke internal builds.
+
+ Reverted changeset:
+
+ "Notify clients when the user plays media otherwise prevented
+ from autoplaying"
+ https://bugs.webkit.org/show_bug.cgi?id=167390
+ http://trac.webkit.org/changeset/211193
+
2017-01-25 Wenson Hsieh <[email protected]>
Add infrastructure to support data interaction in WebKit2
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (211199 => 211200)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-01-26 04:24:10 UTC (rev 211200)
@@ -3167,8 +3167,7 @@
scheduleResolvePendingPlayPromises();
if (ScriptController::processingUserGestureForMedia() && m_preventedFromPlayingWithoutUserGesture) {
- if (Page* page = document().page())
- page->chrome().client().didPlayMediaPreventedFromPlayingWithoutUserGesture();
+ // FIXME: notify clients a user gesture was made and started playback of an element that was otherwise prevented from playing.
m_preventedFromPlayingWithoutUserGesture = false;
}
Modified: trunk/Source/WebCore/page/ChromeClient.h (211199 => 211200)
--- trunk/Source/WebCore/page/ChromeClient.h 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebCore/page/ChromeClient.h 2017-01-26 04:24:10 UTC (rev 211200)
@@ -420,7 +420,6 @@
virtual bool shouldUseTiledBackingForFrameView(const FrameView&) const { return false; }
virtual void isPlayingMediaDidChange(MediaProducer::MediaStateFlags, uint64_t) { }
- virtual void didPlayMediaPreventedFromPlayingWithoutUserGesture() { }
#if ENABLE(MEDIA_SESSION)
virtual void hasMediaSessionWithActiveMediaElementsDidChange(bool) { }
Modified: trunk/Source/WebKit2/ChangeLog (211199 => 211200)
--- trunk/Source/WebKit2/ChangeLog 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebKit2/ChangeLog 2017-01-26 04:24:10 UTC (rev 211200)
@@ -1,3 +1,16 @@
+2017-01-25 Ryan Haddad <[email protected]>
+
+ Unreviewed, rolling out r211193.
+
+ This change broke internal builds.
+
+ Reverted changeset:
+
+ "Notify clients when the user plays media otherwise prevented
+ from autoplaying"
+ https://bugs.webkit.org/show_bug.cgi?id=167390
+ http://trac.webkit.org/changeset/211193
+
2017-01-25 Wenson Hsieh <[email protected]>
Add infrastructure to support data interaction in WebKit2
Modified: trunk/Source/WebKit2/UIProcess/API/APIUIClient.h (211199 => 211200)
--- trunk/Source/WebKit2/UIProcess/API/APIUIClient.h 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebKit2/UIProcess/API/APIUIClient.h 2017-01-26 04:24:10 UTC (rev 211200)
@@ -152,7 +152,6 @@
virtual void isPlayingAudioDidChange(WebKit::WebPageProxy&) { }
virtual void didBeginCaptureSession() { }
virtual void didEndCaptureSession() { }
- virtual void didPlayMediaPreventedFromPlayingWithoutUserGesture(WebKit::WebPageProxy&) { }
#if ENABLE(MEDIA_SESSION)
virtual void mediaSessionMetadataDidChange(WebKit::WebPageProxy&, WebKit::WebMediaSessionMetadata*) { }
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (211199 => 211200)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp 2017-01-26 04:24:10 UTC (rev 211200)
@@ -2235,14 +2235,6 @@
m_client.didLosePointerLock(toAPI(page), m_client.base.clientInfo);
}
#endif
-
- void didPlayMediaPreventedFromPlayingWithoutUserGesture(WebPageProxy& page) override
- {
- if (!m_client.didPlayMediaPreventedFromPlayingWithoutUserGesture)
- return;
-
- m_client.didPlayMediaPreventedFromPlayingWithoutUserGesture(toAPI(&page), m_client.base.clientInfo);
- }
};
toImpl(pageRef)->setUIClient(std::make_unique<UIClient>(wkClient));
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h (211199 => 211200)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h 2017-01-26 04:24:10 UTC (rev 211200)
@@ -102,7 +102,6 @@
typedef void (*WKCheckUserMediaPermissionCallback)(WKPageRef page, WKFrameRef frame, WKSecurityOriginRef userMediaDocumentOrigin, WKSecurityOriginRef topLevelDocumentOrigin, WKUserMediaPermissionCheckRef devicesRequest, const void *clientInfo);
typedef void (*WKPageDidClickAutoFillButtonCallback)(WKPageRef page, WKTypeRef userData, const void *clientInfo);
typedef void (*WKPageMediaSessionMetadataDidChangeCallback)(WKPageRef page, WKMediaSessionMetadataRef metadata, const void* clientInfo);
-typedef void (*WKDidPlayMediaPreventedFromPlayingWithoutUserGesture)(WKPageRef page, const void* clientInfo);
typedef void (*WKFullscreenMayReturnToInlineCallback)(WKPageRef page, const void* clientInfo);
typedef void (*WKRequestPointerLockCallback)(WKPageRef page, const void* clientInfo);
@@ -726,7 +725,6 @@
// Version 8.
WKRequestPointerLockCallback requestPointerLock;
WKDidLosePointerLockCallback didLosePointerLock;
- WKDidPlayMediaPreventedFromPlayingWithoutUserGesture didPlayMediaPreventedFromPlayingWithoutUserGesture;
} WKPageUIClientV8;
#ifdef __cplusplus
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (211199 => 211200)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2017-01-26 04:24:10 UTC (rev 211200)
@@ -6527,11 +6527,6 @@
}
#endif
-void WebPageProxy::didPlayMediaPreventedFromPlayingWithoutUserGesture()
-{
- m_uiClient->didPlayMediaPreventedFromPlayingWithoutUserGesture(*this);
-}
-
#if PLATFORM(MAC)
void WebPageProxy::removeNavigationGestureSnapshot()
{
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (211199 => 211200)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2017-01-26 04:24:10 UTC (rev 211200)
@@ -1062,7 +1062,6 @@
bool hasActiveAudioStream() const { return m_mediaState & WebCore::MediaProducer::HasActiveAudioCaptureDevice; }
bool hasActiveVideoStream() const { return m_mediaState & WebCore::MediaProducer::HasActiveVideoCaptureDevice; }
WebCore::MediaProducer::MediaStateFlags mediaStateFlags() const { return m_mediaState; }
- void didPlayMediaPreventedFromPlayingWithoutUserGesture();
#if PLATFORM(MAC)
void videoControlsManagerDidChange();
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (211199 => 211200)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2017-01-26 04:24:10 UTC (rev 211200)
@@ -443,7 +443,6 @@
#endif
IsPlayingMediaDidChange(unsigned state, uint64_t sourceElementID)
- DidPlayMediaPreventedFromPlayingWithoutUserGesture()
#if ENABLE(MEDIA_SESSION)
HasMediaSessionWithActiveMediaElementsDidChange(bool state)
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (211199 => 211200)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp 2017-01-26 04:24:10 UTC (rev 211200)
@@ -1084,11 +1084,6 @@
m_page.send(Messages::WebPageProxy::IsPlayingMediaDidChange(state, sourceElementID));
}
-void WebChromeClient::didPlayMediaPreventedFromPlayingWithoutUserGesture()
-{
- m_page.send(Messages::WebPageProxy::DidPlayMediaPreventedFromPlayingWithoutUserGesture());
-}
-
#if ENABLE(MEDIA_SESSION)
void WebChromeClient::hasMediaSessionWithActiveMediaElementsDidChange(bool state)
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h (211199 => 211200)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h 2017-01-26 04:24:10 UTC (rev 211200)
@@ -297,7 +297,6 @@
bool shouldUseTiledBackingForFrameView(const WebCore::FrameView&) const final;
void isPlayingMediaDidChange(WebCore::MediaProducer::MediaStateFlags, uint64_t) final;
- void didPlayMediaPreventedFromPlayingWithoutUserGesture() final;
#if ENABLE(MEDIA_SESSION)
void hasMediaSessionWithActiveMediaElementsDidChange(bool) final;
Modified: trunk/Tools/ChangeLog (211199 => 211200)
--- trunk/Tools/ChangeLog 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Tools/ChangeLog 2017-01-26 04:24:10 UTC (rev 211200)
@@ -1,3 +1,16 @@
+2017-01-25 Ryan Haddad <[email protected]>
+
+ Unreviewed, rolling out r211193.
+
+ This change broke internal builds.
+
+ Reverted changeset:
+
+ "Notify clients when the user plays media otherwise prevented
+ from autoplaying"
+ https://bugs.webkit.org/show_bug.cgi?id=167390
+ http://trac.webkit.org/changeset/211193
+
2017-01-25 Matt Rajca <[email protected]>
Notify clients when the user plays media otherwise prevented from autoplaying
Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (211199 => 211200)
--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2017-01-26 04:24:10 UTC (rev 211200)
@@ -509,9 +509,6 @@
C95984F41E36BC6B002C0D45 /* autoplay-check.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C95984F21E36BC55002C0D45 /* autoplay-check.html */; };
C95984F51E36BC6B002C0D45 /* autoplay-no-audio-check.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C95984F31E36BC55002C0D45 /* autoplay-no-audio-check.html */; };
C95984F71E36BCEF002C0D45 /* test-without-audio-track.mp4 in Copy Resources */ = {isa = PBXBuildFile; fileRef = C95984F61E36BCD7002C0D45 /* test-without-audio-track.mp4 */; };
- C99B675C1E39721A00FC6C80 /* autoplay-with-controls.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C99B675A1E3971FC00FC6C80 /* autoplay-with-controls.html */; };
- C99B675D1E39722000FC6C80 /* js-play-with-controls.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C99B675B1E3971FC00FC6C80 /* js-play-with-controls.html */; };
- C99B675F1E39736F00FC6C80 /* no-autoplay-with-controls.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C99B675E1E39735C00FC6C80 /* no-autoplay-with-controls.html */; };
CD59F53419E9110D00CF1835 /* file-with-mse.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CD59F53219E910AA00CF1835 /* file-with-mse.html */; };
CD59F53519E9110D00CF1835 /* test-mse.mp4 in Copy Resources */ = {isa = PBXBuildFile; fileRef = CD59F53319E910BC00CF1835 /* test-mse.mp4 */; };
CD78E11D1DB7EA660014A2DE /* FullscreenDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD78E11A1DB7EA360014A2DE /* FullscreenDelegate.mm */; };
@@ -610,9 +607,6 @@
dstPath = TestWebKitAPI.resources;
dstSubfolderSpec = 7;
files = (
- C99B675F1E39736F00FC6C80 /* no-autoplay-with-controls.html in Copy Resources */,
- C99B675D1E39722000FC6C80 /* js-play-with-controls.html in Copy Resources */,
- C99B675C1E39721A00FC6C80 /* autoplay-with-controls.html in Copy Resources */,
C95984F71E36BCEF002C0D45 /* test-without-audio-track.mp4 in Copy Resources */,
C95984F41E36BC6B002C0D45 /* autoplay-check.html in Copy Resources */,
C95984F51E36BC6B002C0D45 /* autoplay-no-audio-check.html in Copy Resources */,
@@ -1280,9 +1274,6 @@
C95984F21E36BC55002C0D45 /* autoplay-check.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "autoplay-check.html"; sourceTree = "<group>"; };
C95984F31E36BC55002C0D45 /* autoplay-no-audio-check.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "autoplay-no-audio-check.html"; sourceTree = "<group>"; };
C95984F61E36BCD7002C0D45 /* test-without-audio-track.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = "test-without-audio-track.mp4"; sourceTree = "<group>"; };
- C99B675A1E3971FC00FC6C80 /* autoplay-with-controls.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "autoplay-with-controls.html"; sourceTree = "<group>"; };
- C99B675B1E3971FC00FC6C80 /* js-play-with-controls.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "js-play-with-controls.html"; sourceTree = "<group>"; };
- C99B675E1E39735C00FC6C80 /* no-autoplay-with-controls.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "no-autoplay-with-controls.html"; sourceTree = "<group>"; };
CD225C071C45A69200140761 /* ParsedContentRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParsedContentRange.cpp; sourceTree = "<group>"; };
CD5393C71757BA9700C07123 /* MD5.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MD5.cpp; sourceTree = "<group>"; };
CD5393C91757BAC400C07123 /* SHA1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SHA1.cpp; sourceTree = "<group>"; };
@@ -1970,7 +1961,6 @@
76E182DE15475A8300F1FADD /* auto-submitting-form.html */,
C95984F21E36BC55002C0D45 /* autoplay-check.html */,
C95984F31E36BC55002C0D45 /* autoplay-no-audio-check.html */,
- C99B675A1E3971FC00FC6C80 /* autoplay-with-controls.html */,
7C486BA01AA1254B003F6F9B /* bundle-file.html */,
9BD4239B1E04BFD000200395 /* chinese-character-with-image.html */,
1A50AA1F1A2A4EA500F4C345 /* close-from-within-create-page.html */,
@@ -1991,7 +1981,6 @@
4A410F4D19AF7BEF002EBAB5 /* getUserMedia.html */,
BCBD372E125ABBE600D2C29F /* icon.png */,
CE3524F51B142BBB0028A7C5 /* input-focus-blur.html */,
- C99B675B1E3971FC00FC6C80 /* js-play-with-controls.html */,
8349D3C31DB9724F004A9F65 /* link-with-download-attribute.html */,
378E647816326FDF00B6C676 /* link-with-title.html */,
9361002814DC957B0061379D /* lots-of-iframes.html */,
@@ -2002,7 +1991,6 @@
51CD1C711B38D48400142CA5 /* modal-alerts-in-new-about-blank-window.html */,
7A1458FB1AD5C03500E06772 /* mouse-button-listener.html */,
33E79E05137B5FCE00E32D99 /* mouse-move-listener.html */,
- C99B675E1E39735C00FC6C80 /* no-autoplay-with-controls.html */,
CEA6CF2719CCF69D0064F5A7 /* open-and-close-window.html */,
F6FDDDD514241C48004F1729 /* push-state.html */,
CEBABD481B71687C0051210A /* should-open-external-schemes.html */,
Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKit2/autoplay-with-controls.html (211199 => 211200)
--- trunk/Tools/TestWebKitAPI/Tests/WebKit2/autoplay-with-controls.html 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2/autoplay-with-controls.html 2017-01-26 04:24:10 UTC (rev 211200)
@@ -1,19 +0,0 @@
-<html>
- <head>
- <script>
- function pageLoaded() {
- try {
- window.webkit.messageHandlers.testHandler.postMessage("loaded");
- } catch(e) { }
- }
-
- function play() {
- document.getElementById("video").play();
- }
- </script>
- </head>
- <body _onload_="pageLoaded()">
- <button _onclick_="play()">Play</button>
- <video id="video" autoplay src="" />
- </body>
-</html>
Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKit2/js-play-with-controls.html (211199 => 211200)
--- trunk/Tools/TestWebKitAPI/Tests/WebKit2/js-play-with-controls.html 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2/js-play-with-controls.html 2017-01-26 04:24:10 UTC (rev 211200)
@@ -1,20 +0,0 @@
-<html>
- <head>
- <script>
- function pageLoaded() {
- document.getElementById("video").play();
- try {
- window.webkit.messageHandlers.testHandler.postMessage("loaded");
- } catch(e) { }
- }
-
- function play() {
- document.getElementById("video").play();
- }
- </script>
- </head>
- <body _onload_="pageLoaded()">
- <button _onclick_="play()">Play</button>
- <video id="video" src="" />
- </body>
-</html>
Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKit2/no-autoplay-with-controls.html (211199 => 211200)
--- trunk/Tools/TestWebKitAPI/Tests/WebKit2/no-autoplay-with-controls.html 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2/no-autoplay-with-controls.html 2017-01-26 04:24:10 UTC (rev 211200)
@@ -1,25 +0,0 @@
-<html>
- <head>
- <script>
- function pageLoaded() {
- try {
- window.webkit.messageHandlers.testHandler.postMessage("loaded");
- } catch(e) { }
- }
-
- function beganPlaying() {
- try {
- window.webkit.messageHandlers.testHandler.postMessage("played");
- } catch(e) { }
- }
-
- function play() {
- document.getElementById("video").play();
- }
- </script>
- </head>
- <body _onload_="pageLoaded()">
- <button _onclick_="play()">Play</button>
- <video id="video" _onplaying_=beganPlaying() src="" />
- </body>
-</html>
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm (211199 => 211200)
--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm 2017-01-26 04:24:10 UTC (rev 211200)
@@ -39,10 +39,6 @@
#if WK_API_ENABLED
-@interface WKWebView ()
-- (WKPageRef)_pageForTesting;
-@end
-
static bool doneCompiling;
static bool receivedAlert;
static size_t alertCount;
@@ -217,59 +213,4 @@
[webView waitForMessage:@"autoplayed"];
}
-#if PLATFORM(MAC)
-static void didPlayMediaPreventedFromPlayingWithoutUserGesture(WKPageRef page, const void* clientInfo)
-{
- receivedAlert = true;
-}
-
-TEST(WebKit2, WebsitePoliciesPlayAfterPreventedAutoplay)
-{
- auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
- auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 336, 276) configuration:configuration.get()]);
-
- auto delegate = adoptNS([[AutoplayPoliciesDelegate alloc] init]);
- [delegate setAutoplayPolicy:_WKWebsiteAutoplayPolicyDeny];
- [webView setNavigationDelegate:delegate.get()];
-
- WKPageUIClientV8 uiClient;
- memset(&uiClient, 0, sizeof(uiClient));
-
- uiClient.base.version = 8;
- uiClient.didPlayMediaPreventedFromPlayingWithoutUserGesture = didPlayMediaPreventedFromPlayingWithoutUserGesture;
-
- WKPageSetPageUIClient([webView _pageForTesting], &uiClient.base);
- NSPoint playButtonClickPoint = NSMakePoint(20, 256);
-
- receivedAlert = false;
- NSURLRequest *jsPlayRequest = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"js-play-with-controls" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
- [webView loadRequest:jsPlayRequest];
- [webView waitForMessage:@"loaded"];
- [webView mouseDownAtPoint:playButtonClickPoint simulatePressure:NO];
- [webView mouseUpAtPoint:playButtonClickPoint];
- TestWebKitAPI::Util::run(&receivedAlert);
-
- receivedAlert = false;
- [webView loadHTMLString:@"" baseURL:nil];
-
- NSURLRequest *autoplayRequest = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"autoplay-with-controls" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
- [webView loadRequest:autoplayRequest];
- [webView waitForMessage:@"loaded"];
- [webView mouseDownAtPoint:playButtonClickPoint simulatePressure:NO];
- [webView mouseUpAtPoint:playButtonClickPoint];
- TestWebKitAPI::Util::run(&receivedAlert);
-
- receivedAlert = false;
- [webView loadHTMLString:@"" baseURL:nil];
-
- NSURLRequest *noAutoplayRequest = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"no-autoplay-with-controls" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
- [webView loadRequest:noAutoplayRequest];
- [webView waitForMessage:@"loaded"];
- [webView mouseDownAtPoint:playButtonClickPoint simulatePressure:NO];
- [webView mouseUpAtPoint:playButtonClickPoint];
- [webView waitForMessage:@"played"];
- ASSERT_FALSE(receivedAlert);
-}
#endif
-
-#endif
Modified: trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.h (211199 => 211200)
--- trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.h 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.h 2017-01-26 04:24:10 UTC (rev 211200)
@@ -44,7 +44,6 @@
@interface TestWKWebView (MacOnly)
// Simulates clicking with a pressure-sensitive device, if possible.
- (void)mouseDownAtPoint:(NSPoint)point simulatePressure:(BOOL)simulatePressure;
-- (void)mouseUpAtPoint:(NSPoint)point;
- (void)typeCharacter:(char)character;
@end
#endif
Modified: trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm (211199 => 211200)
--- trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm 2017-01-26 04:24:10 UTC (rev 211200)
@@ -120,11 +120,6 @@
}
#endif
}
-
-- (void)_mouseUpAtPoint:(NSPoint)point
-{
- [self sendEvent:[NSEvent mouseEventWithType:NSEventTypeLeftMouseUp location:point modifierFlags:0 timestamp:GetCurrentEventTime() windowNumber:self.windowNumber context:[NSGraphicsContext currentContext] eventNumber:++gEventNumber clickCount:1 pressure:0]];
-}
#endif // PLATFORM(MAC)
- (BOOL)isKeyWindow
@@ -255,11 +250,6 @@
[_hostWindow _mouseDownAtPoint:point simulatePressure:simulatePressure];
}
-- (void)mouseUpAtPoint:(NSPoint)point
-{
- [_hostWindow _mouseUpAtPoint:point];
-}
-
- (void)typeCharacter:(char)character {
NSString *characterAsString = [NSString stringWithFormat:@"%c" , character];
NSEventType keyDownEventType = NSEventTypeKeyDown;
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (211199 => 211200)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2017-01-26 04:22:05 UTC (rev 211199)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2017-01-26 04:24:10 UTC (rev 211200)
@@ -279,7 +279,6 @@
0, // fullscreenMayReturnToInline
requestPointerLock,
0,
- 0, // didPlayMediaPreventedFromPlayingWithoutUserGesture
};
WKPageSetPageUIClient(newPage, &otherPageUIClient.base);
@@ -552,7 +551,6 @@
0, // fullscreenMayReturnToInline
requestPointerLock,
0,
- 0, // didPlayMediaPreventedFromPlayingWithoutUserGesture
};
WKPageSetPageUIClient(m_mainWebView->page(), &pageUIClient.base);