Changeset 187688 in webkit
- Timestamp:
- Jul 31, 2015 3:59:04 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r187687 r187688 1 2015-07-31 Eric Carlson <eric.carlson@apple.com> 2 3 [iOS] use a media-specific user gesture check 4 https://bugs.webkit.org/show_bug.cgi?id=147509 5 6 Reviewed by Jer Noble. 7 8 * bindings/js/ScriptController.cpp: 9 (WebCore::ScriptController::processingUserGestureForMedia): New. 10 * bindings/js/ScriptController.h: 11 12 * dom/UserGestureIndicator.cpp: 13 (WebCore::isDefinite): Allow DefinitelyProcessingMediaUserGesture. 14 (WebCore::UserGestureIndicator::processingUserGestureForMedia): New. 15 * dom/UserGestureIndicator.h: 16 17 * html/HTMLMediaElement.cpp: 18 (WebCore::HTMLMediaElement::load): Use ScriptController::processingUserGestureForMedia instead of 19 ScriptController::processingUserGesture 20 (WebCore::HTMLMediaElement::play): Ditto. 21 1 22 2015-07-31 Andreas Kling <akling@apple.com> 2 23 -
trunk/Source/WebCore/bindings/js/ScriptController.cpp
r186574 r187688 307 307 } 308 308 309 bool ScriptController::processingUserGestureForMedia() 310 { 311 return UserGestureIndicator::processingUserGestureForMedia(); 312 } 313 309 314 bool ScriptController::canAccessFromCurrentOrigin(Frame *frame) 310 315 { -
trunk/Source/WebCore/bindings/js/ScriptController.h
r178820 r187688 122 122 123 123 WEBCORE_EXPORT static bool processingUserGesture(); 124 WEBCORE_EXPORT static bool processingUserGestureForMedia(); 124 125 125 126 static bool canAccessFromCurrentOrigin(Frame*); -
trunk/Source/WebCore/dom/UserGestureIndicator.cpp
r174700 r187688 34 34 static bool isDefinite(ProcessingUserGestureState state) 35 35 { 36 return state == DefinitelyProcessingUserGesture || state == DefinitelyNotProcessingUserGesture ;36 return state == DefinitelyProcessingUserGesture || state == DefinitelyNotProcessingUserGesture || state == DefinitelyProcessingMediaUserGesture; 37 37 } 38 38 … … 67 67 } 68 68 69 bool UserGestureIndicator::processingUserGestureForMedia() 70 { 71 if (!isMainThread()) 72 return false; 73 74 return s_state == DefinitelyProcessingUserGesture || s_state == DefinitelyProcessingMediaUserGesture; 69 75 } 76 77 } -
trunk/Source/WebCore/dom/UserGestureIndicator.h
r174700 r187688 35 35 enum ProcessingUserGestureState { 36 36 DefinitelyProcessingUserGesture, 37 DefinitelyProcessingMediaUserGesture, 37 38 PossiblyProcessingUserGesture, 38 39 DefinitelyNotProcessingUserGesture … … 43 44 public: 44 45 static bool processingUserGesture(); 46 static bool processingUserGestureForMedia(); 45 47 46 48 // If a document is provided, its last known user gesture timestamp is updated. -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r187687 r187688 921 921 if (!m_mediaSession->dataLoadingPermitted(*this)) 922 922 return; 923 if (ScriptController::processingUserGesture ())923 if (ScriptController::processingUserGestureForMedia()) 924 924 removeBehaviorsRestrictionsAfterFirstUserGesture(); 925 925 … … 2840 2840 if (!m_mediaSession->playbackPermitted(*this)) 2841 2841 return; 2842 if (ScriptController::processingUserGesture ())2842 if (ScriptController::processingUserGestureForMedia()) 2843 2843 removeBehaviorsRestrictionsAfterFirstUserGesture(); 2844 2844
Note: See TracChangeset
for help on using the changeset viewer.