Bug 169962

Summary: [Modern Media Controls] Controls size lags behind media size
Product: WebKit Reporter: Antoine Quint <graouts>
Component: MediaAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, commit-queue, ryanhaddad, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Testcase
none
Patch
none
Archive of layout-test-results from ews122 for ios-simulator-wk2
none
Patch for landing none

Description Antoine Quint 2017-03-22 10:53:05 PDT
Created attachment 305109 [details]
Testcase

When resizing a video element, it's very visible that the controls size lags behind the media size. The attached test case makes it very clear. The issue is that we fire the "resize" event on the shadow root on a timer to notify the JS code, and on top of that we use a requestAnimationFrame() call to update the DOM.
Comment 1 Antoine Quint 2017-03-22 10:53:23 PDT
<rdar://problem/30340293>
Comment 2 Antoine Quint 2017-03-22 10:59:09 PDT
Created attachment 305110 [details]
Patch
Comment 3 Dean Jackson 2017-03-22 11:08:41 PDT
Comment on attachment 305110 [details]
Patch

Assuming smfr said this is the right place, r=me
Comment 4 Simon Fraser (smfr) 2017-03-22 11:13:43 PDT
Comment on attachment 305110 [details]
Patch

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

> Source/WebCore/html/HTMLMediaElement.cpp:-4054
> -    m_resizeTaskQueue.enqueueTask(WTFMove(task));

You don't use m_resizeTaskQueue any more, so should remove it.
Comment 5 Build Bot 2017-03-22 12:48:44 PDT
Comment on attachment 305110 [details]
Patch

Attachment 305110 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/3388738

New failing tests:
media/modern-media-controls/media-controller/media-controller-scale-factor-audio.html
Comment 6 Build Bot 2017-03-22 12:48:46 PDT
Created attachment 305115 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.6
Comment 7 Antoine Quint 2017-03-22 15:10:55 PDT
Created attachment 305130 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2017-03-22 15:52:02 PDT
Comment on attachment 305130 [details]
Patch for landing

Clearing flags on attachment: 305130

Committed r214282: <http://trac.webkit.org/changeset/214282>
Comment 9 WebKit Commit Bot 2017-03-22 15:52:07 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Ryan Haddad 2017-03-23 13:49:58 PDT
(In reply to WebKit Commit Bot from comment #8)
> Comment on attachment 305130 [details]
> Patch for landing
> 
> Clearing flags on attachment: 305130
> 
> Committed r214282: <http://trac.webkit.org/changeset/214282>

This change appears to have caused LayoutTest media/restore-from-page-cache.html to consistently crash on Sierra Debug WK1:

https://build.webkit.org/results/Apple%20Sierra%20Debug%20WK1%20(Tests)/r214308%20(125)/results.html