Bug 157359 - When exiting fullscreen, call a JS method immediately to implement the style changes for the presentation mode change right away
Summary: When exiting fullscreen, call a JS method immediately to implement the style ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ada Chan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-05-04 15:07 PDT by Ada Chan
Modified: 2016-05-05 11:15 PDT (History)
0 users

See Also:


Attachments
Patch (3.79 KB, patch)
2016-05-04 17:37 PDT, Ada Chan
eric.carlson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ada Chan 2016-05-04 15:07:12 PDT
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>.
Comment 1 Ada Chan 2016-05-04 17:37:31 PDT
Created attachment 278146 [details]
Patch
Comment 2 Eric Carlson 2016-05-05 07:18:20 PDT
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.
Comment 3 Ada Chan 2016-05-05 10:48:21 PDT
(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!
Comment 4 Ada Chan 2016-05-05 11:15:03 PDT
Committed:
http://trac.webkit.org/changeset/200462