Bug 161914

Summary: Media controls behave strangely when changing media sources
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: MediaAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, commit-queue, jer.noble, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Rebased against trunk
none
Patch for landing
none
Patch for landing none

Description Wenson Hsieh 2016-09-13 10:28:26 PDT
Media controls behave strangely when changing media sources
Comment 1 Wenson Hsieh 2016-09-13 10:28:53 PDT
<rdar://problem/28227805>
Comment 2 Wenson Hsieh 2016-09-13 12:00:42 PDT
Created attachment 288710 [details]
Patch
Comment 3 Wenson Hsieh 2016-09-13 12:03:47 PDT
Created attachment 288712 [details]
Rebased against trunk
Comment 4 Tim Horton 2016-09-14 14:02:45 PDT
Comment on attachment 288712 [details]
Rebased against trunk

View in context: https://bugs.webkit.org/attachment.cgi?id=288712&action=review

Looks pretty reasonable, but maybe have Jer or someone take a peek?

> Source/WebCore/ChangeLog:26
> +          play. This gives the user a change to interact with the controls when a video ends, but also allows the page

s/change/chance/

> Source/WebCore/html/HTMLMediaElement.cpp:166
> +static const double HideMediaControlsAfterEndedDelay = 6;

no std::chrono love? I don't know if we're on or off it this week, but it looks like you're matching nearby code so I guess it's fine.

> Source/WebCore/html/MediaElementSession.cpp:654
> +    return elementRectInMainFrame.width() * elementRectInMainFrame.height() > totalElementArea / 2;

Don't we have a .area()?
Comment 5 Wenson Hsieh 2016-09-14 14:06:08 PDT
Comment on attachment 288712 [details]
Rebased against trunk

View in context: https://bugs.webkit.org/attachment.cgi?id=288712&action=review

Thanks! I'll get Jer's opinion as well.

>> Source/WebCore/ChangeLog:26
>> +          play. This gives the user a change to interact with the controls when a video ends, but also allows the page
> 
> s/change/chance/

Whoops -- fixed.

>> Source/WebCore/html/MediaElementSession.cpp:654
>> +    return elementRectInMainFrame.width() * elementRectInMainFrame.height() > totalElementArea / 2;
> 
> Don't we have a .area()?

Ah, so we do! Changed to area().
Comment 6 Jer Noble 2016-09-14 15:33:39 PDT
Comment on attachment 288712 [details]
Rebased against trunk

This all looks reasonable to me as well.
Comment 7 Wenson Hsieh 2016-09-14 16:16:52 PDT
Created attachment 288881 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2016-09-14 16:19:15 PDT
Comment on attachment 288881 [details]
Patch for landing

Rejecting attachment 288881 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'validate-changelog', '--check-oops', '--non-interactive', 288881, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

ChangeLog entry in Source/WebCore/ChangeLog contains OOPS!.

Full output: http://webkit-queues.webkit.org/results/2075052
Comment 9 Wenson Hsieh 2016-09-14 16:21:04 PDT
Created attachment 288882 [details]
Patch for landing
Comment 10 WebKit Commit Bot 2016-09-14 16:54:00 PDT
Comment on attachment 288882 [details]
Patch for landing

Clearing flags on attachment: 288882

Committed r205938: <http://trac.webkit.org/changeset/205938>
Comment 11 WebKit Commit Bot 2016-09-14 16:54:04 PDT
All reviewed patches have been landed.  Closing bug.