Changeset 213316 in webkit
- Timestamp:
- Mar 2, 2017 3:50:59 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r213311 r213316 1 2017-02-28 Matt Rajca <mrajca@apple.com> 2 3 Media: send "did interfere with playback" events when the user pauses an autoplaying element 4 https://bugs.webkit.org/show_bug.cgi?id=169006 5 6 Reviewed by Alex Christensen. 7 8 Added API tests. 9 10 * html/HTMLMediaElement.cpp: 11 (WebCore::HTMLMediaElement::pauseInternal): 12 1 13 2017-03-02 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r213246 r213316 3257 3257 3258 3258 m_autoplaying = false; 3259 3260 if (ScriptController::processingUserGestureForMedia() && m_playbackWithoutUserGesture == PlaybackWithoutUserGesture::Started) { 3261 if (Page* page = document().page()) 3262 page->chrome().client().handleAutoplayEvent(AutoplayEvent::UserDidInterfereWithPlayback); 3263 } 3264 3259 3265 m_playbackWithoutUserGesture = PlaybackWithoutUserGesture::None; 3260 3266 -
trunk/Tools/ChangeLog
r213306 r213316 1 2017-02-28 Matt Rajca <mrajca@apple.com> 2 3 Media: send "did interfere with playback" events when the user pauses an autoplaying element 4 https://bugs.webkit.org/show_bug.cgi?id=169006 5 6 Reviewed by Alex Christensen. 7 8 * TestWebKitAPI/Tests/WebKit2/js-play-with-controls.html: 9 * TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm: 10 (TEST): Added. 11 1 12 2017-03-02 Srinivasan Vijayaraghavan <svijayaraghavan@apple.com> 2 13 -
trunk/Tools/TestWebKitAPI/Tests/WebKit2/js-play-with-controls.html
r213246 r213316 10 10 11 11 function play() { 12 document.getElementById("video").play(); 12 var video = document.getElementById("video"); 13 if (video.paused) 14 video.play(); 15 else 16 video.pause(); 13 17 } 14 18 -
trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm
r213246 r213316 391 391 [webView mouseUpAtPoint:muteButtonClickPoint]; 392 392 runUntilReceivesAutoplayEvent(kWKAutoplayEventUserDidInterfereWithPlayback); 393 394 receivedAutoplayEvent = std::nullopt; 395 [webView loadRequest:jsPlayRequest]; 396 [webView waitForMessage:@"playing"]; 397 ASSERT_TRUE(receivedAutoplayEvent == std::nullopt); 398 399 const NSPoint playButtonClickPoint = NSMakePoint(20, 256); 400 [webView mouseDownAtPoint:playButtonClickPoint simulatePressure:NO]; 401 [webView mouseUpAtPoint:playButtonClickPoint]; 402 runUntilReceivesAutoplayEvent(kWKAutoplayEventUserDidInterfereWithPlayback); 393 403 } 394 404 #endif
Note: See TracChangeset
for help on using the changeset viewer.