When exiting fullscreen, call a JS method immediately to implement the style changes for the presentation mode change right away. This should help with the flash in <rdar://problem/24476949>.
Created attachment 278146 [details] Patch
Comment on attachment 278146 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=278146&action=review > Source/WebCore/html/HTMLMediaElement.cpp:5399 > + updateMediaControlsAfterPresentationModeChanged(); Nit: I think "updateMediaControlsAfterPresentationModeChange" would be a slightly better name. > Source/WebCore/html/HTMLMediaElement.cpp:6570 > + JSC::CallData callData; > + JSC::CallType callType = function->methodTable()->getCallData(function, callData); > + JSC::MarkedArgumentBuffer argList; > + if (callType == JSC::CallType::None) > + return; Nit: I see that this is based on existing code, but callData and argList should be declared after the potential early return.
(In reply to comment #2) > Comment on attachment 278146 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=278146&action=review > > > Source/WebCore/html/HTMLMediaElement.cpp:5399 > > + updateMediaControlsAfterPresentationModeChanged(); > > Nit: I think "updateMediaControlsAfterPresentationModeChange" would be a > slightly better name. Renamed. > > > Source/WebCore/html/HTMLMediaElement.cpp:6570 > > + JSC::CallData callData; > > + JSC::CallType callType = function->methodTable()->getCallData(function, callData); > > + JSC::MarkedArgumentBuffer argList; > > + if (callType == JSC::CallType::None) > > + return; > > Nit: I see that this is based on existing code, but callData and argList > should be declared after the potential early return. callData is actually used in the call to getCallData(), so I'll keep that there. I've moved the declaration of argList down. Thanks for the review!
Committed: http://trac.webkit.org/changeset/200462