Repaint video controls when buffering during pause.
Created attachment 118130 [details] Patch
Currently buffering progress on the media controls does not update when the video is paused or hasn't started. Not exactly the end of world, but a polish issue none the less. The attached patch fixes this issue by piping a new MediaControls::bufferingProgressed() method which is called when the buffer updates according to HTMLMediaElement::progressEventTimerFired. A new layout test is included to verify this behavior. The layout test uses an image diff, but I'm not sure what the process for generating the platform expected images is. Please take a look and advise. Chromium Issue: http://crbug.com/97720 Chromium CL: http://codereview.chromium.org/8496044/
Comment on attachment 118130 [details] Patch Attachment 118130 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/10746074
Whoops, apparently since the time I wrote this patch there's been a refactoring of the MediaControls classes. I'll dig into this and resubmit.
Comment on attachment 118130 [details] Patch Attachment 118130 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/10739241
Comment on attachment 118130 [details] Patch Attachment 118130 [details] did not pass gtk-ews (gtk): Output: http://queues.webkit.org/results/10736898
Created attachment 118141 [details] Patch
m_timeline->setPosition() sets the position of the slider thumb. When the element is paused the thumb will be stationary, so I would hope that the entire slider would not be invalidated and redrawn.
At least on Chromium, setting the position of MediaSliderThumb results in a repaint for MediaSlider as well. Whether the repaint is done explicitly or is just due to a change in HTMLMediaElement::percentLoaded() I'm not sure.
Comment on attachment 118141 [details] Patch > At least on Chromium, setting the position of MediaSliderThumb results in a repaint for MediaSlider as well. Whether the repaint is done explicitly or is just due to a change in HTMLMediaElement::percentLoaded() I'm not sure. Your light, HTMLInputElement, which is a superclass of MediaControlTimelineElement, should take care of it. r- for now because the change doesn't contain test expectation file or suppression lines. Code looks good to me.
Thanks for your comments morrita. As mentioned in an earlier comment, I'm looking for advice on proper generation of the the expected files. When running the included layout test it only generates the per-platform expected files and not the generic expected. Am I doing something wrong? If not, what's the proper procedure for generating and including these platform expected results? Output: Writing new expected result "platform/chromium-linux/http/tests/media/video-buffering-repaints-controls-expected.txt" Writing new expected result "platform/chromium-linux/http/tests/media/video-buffering-repaints-controls-expected.png" http/tests/media/video-buffering-repaints-controls.html -> unexpected no expected result found 0 tests ran as expected, 1 didn't: Regressions: Unexpected no expected results found : (1) http/tests/media/video-buffering-repaints-controls.html = MISSING
Created attachment 121137 [details] Patch
Created attachment 121142 [details] Patch
PTAL. Under dglazkov's gracious advice, I've added the expected results for the chromium-linux platform, added suppression entries to the test_expectations.txt for all platforms, and filed https://bugs.webkit.org/show_bug.cgi?id=75570 to track submitting the baselines after this patch goes in.
Comment on attachment 121142 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=121142&action=review Looks good, with small nit. > Source/WebCore/html/shadow/MediaControlRootElement.h:115 > + void bufferingProgressed(); Nit: As WebKit being under influence of Obj-C, generally this would be named didBufferingProgress().
Comment on attachment 121142 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=121142&action=review >> Source/WebCore/html/shadow/MediaControlRootElement.h:115 >> + void bufferingProgressed(); > > Nit: As WebKit being under influence of Obj-C, generally this would be named didBufferingProgress(). Thanks for your review! Since other methods in the class with similar functionality do not use the did* style, I think it's better to keep it as it is.
Comment on attachment 121142 [details] Patch Rejecting attachment 121142 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: of 1 hunk FAILED -- saving rejects to file LayoutTests/platform/chromium/test_expectations.txt.rej patching file LayoutTests/platform/gtk/test_expectations.txt Hunk #1 succeeded at 96 (offset -3 lines). patching file LayoutTests/platform/mac/test_expectations.txt Hunk #1 succeeded at 189 (offset -5 lines). patching file LayoutTests/platform/win/test_expectations.txt Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--reviewer', u'Hajime Morita', u'--fo..." exit_code: 1 Full output: http://queues.webkit.org/results/11141702
Created attachment 121945 [details] Patch
Comment on attachment 121945 [details] Patch Clearing flags on attachment: 121945 Committed r104658: <http://trac.webkit.org/changeset/104658>
All reviewed patches have been landed. Closing bug.