Bug 161914 - Media controls behave strangely when changing media sources
Summary: Media controls behave strangely when changing media sources
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-09-13 10:28 PDT by Wenson Hsieh
Modified: 2016-09-14 16:54 PDT (History)
5 users (show)

See Also:


Attachments
Patch (33.37 KB, patch)
2016-09-13 12:00 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Rebased against trunk (33.39 KB, patch)
2016-09-13 12:03 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch for landing (33.29 KB, patch)
2016-09-14 16:16 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch for landing (33.28 KB, patch)
2016-09-14 16:21 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.