Changeset 200462 in webkit
- Timestamp:
- May 5, 2016 11:14:48 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r200461 r200462 1 2016-05-04 Ada Chan <adachan@apple.com> 2 3 When exiting fullscreen, call a JS method immediately to implement the style changes for the presentation mode change right away 4 https://bugs.webkit.org/show_bug.cgi?id=157359 5 6 Reviewed by Eric Carlson. 7 8 No new tests as this is done to just mitigate a visual glitch. 9 10 * html/HTMLMediaElement.cpp: 11 (WebCore::HTMLMediaElement::exitFullscreen): 12 (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange): 13 * html/HTMLMediaElement.h: 14 1 15 2016-05-04 Alex Christensen <achristensen@webkit.org> 2 16 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r200431 r200462 5396 5396 VideoFullscreenMode oldVideoFullscreenMode = m_videoFullscreenMode; 5397 5397 fullscreenModeChanged(VideoFullscreenModeNone); 5398 #if ENABLE(MEDIA_CONTROLS_SCRIPT) 5399 updateMediaControlsAfterPresentationModeChange(); 5400 #endif 5398 5401 if (hasMediaControls()) 5399 5402 mediaControls()->exitedFullscreen(); … … 6539 6542 else 6540 6543 document().unregisterForPageScaleFactorChangedCallbacks(this); 6544 } 6545 6546 void HTMLMediaElement::updateMediaControlsAfterPresentationModeChange() 6547 { 6548 DOMWrapperWorld& world = ensureIsolatedWorld(); 6549 ScriptController& scriptController = document().frame()->script(); 6550 JSDOMGlobalObject* globalObject = JSC::jsCast<JSDOMGlobalObject*>(scriptController.globalObject(world)); 6551 JSC::ExecState* exec = globalObject->globalExec(); 6552 JSC::JSLockHolder lock(exec); 6553 6554 JSC::JSValue controllerValue = controllerJSValue(*exec, *globalObject, *this); 6555 JSC::JSObject* controllerObject = controllerValue.toObject(exec); 6556 6557 if (exec->hadException()) 6558 return; 6559 6560 JSC::JSValue functionValue = controllerObject->get(exec, JSC::Identifier::fromString(exec, "handlePresentationModeChange")); 6561 if (exec->hadException() || functionValue.isUndefinedOrNull()) 6562 return; 6563 6564 JSC::JSObject* function = functionValue.toObject(exec); 6565 ASSERT(!exec->hadException()); 6566 JSC::CallData callData; 6567 JSC::CallType callType = function->methodTable()->getCallData(function, callData); 6568 if (callType == JSC::CallType::None) 6569 return; 6570 6571 JSC::MarkedArgumentBuffer argList; 6572 JSC::call(exec, function, callType, callData, controllerObject, argList); 6541 6573 } 6542 6574 -
trunk/Source/WebCore/html/HTMLMediaElement.h
r200431 r200462 484 484 bool mediaControlsDependOnPageScaleFactor() const { return m_mediaControlsDependOnPageScaleFactor; } 485 485 void setMediaControlsDependOnPageScaleFactor(bool); 486 void updateMediaControlsAfterPresentationModeChange(); 486 487 #endif 487 488
Note: See TracChangeset
for help on using the changeset viewer.