Bug 73957 - Repaint video controls when buffering during pause.
Summary: Repaint video controls when buffering during pause.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-06 15:51 PST by Dale Curtis
Modified: 2012-01-10 17:51 PST (History)
7 users (show)

See Also:


Attachments
Patch (8.41 KB, patch)
2011-12-06 15:59 PST, Dale Curtis
no flags Details | Formatted Diff | Diff
Patch (8.42 KB, patch)
2011-12-06 16:50 PST, Dale Curtis
no flags Details | Formatted Diff | Diff
Patch (57.99 KB, patch)
2012-01-04 13:13 PST, Dale Curtis
no flags Details | Formatted Diff | Diff
Patch (57.99 KB, patch)
2012-01-04 13:41 PST, Dale Curtis
no flags Details | Formatted Diff | Diff
Patch (57.94 KB, patch)
2012-01-10 17:09 PST, Dale Curtis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dale Curtis 2011-12-06 15:51:27 PST
Repaint video controls when buffering during pause.
Comment 1 Dale Curtis 2011-12-06 15:59:17 PST
Created attachment 118130 [details]
Patch
Comment 2 Dale Curtis 2011-12-06 16:07:24 PST
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 3 Early Warning System Bot 2011-12-06 16:10:42 PST
Comment on attachment 118130 [details]
Patch

Attachment 118130 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/10746074
Comment 4 Dale Curtis 2011-12-06 16:16:59 PST
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 5 WebKit Review Bot 2011-12-06 16:17:04 PST
Comment on attachment 118130 [details]
Patch

Attachment 118130 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/10739241
Comment 6 Gustavo Noronha (kov) 2011-12-06 16:28:00 PST
Comment on attachment 118130 [details]
Patch

Attachment 118130 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/10736898
Comment 7 Dale Curtis 2011-12-06 16:50:19 PST
Created attachment 118141 [details]
Patch
Comment 8 Eric Carlson 2011-12-06 17:00:31 PST
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.
Comment 9 Dale Curtis 2011-12-06 17:18:20 PST
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 10 Hajime Morrita 2011-12-11 21:16:46 PST
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.
Comment 11 Dale Curtis 2011-12-12 10:51:07 PST
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
Comment 12 Dale Curtis 2012-01-04 13:13:57 PST
Created attachment 121137 [details]
Patch
Comment 13 Dale Curtis 2012-01-04 13:41:13 PST
Created attachment 121142 [details]
Patch
Comment 14 Dale Curtis 2012-01-04 13:47:39 PST
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 15 Hajime Morrita 2012-01-05 17:30:27 PST
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 16 Dale Curtis 2012-01-05 17:44:33 PST
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 17 WebKit Review Bot 2012-01-10 16:56:31 PST
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
Comment 18 Dale Curtis 2012-01-10 17:09:01 PST
Created attachment 121945 [details]
Patch
Comment 19 WebKit Review Bot 2012-01-10 17:51:35 PST
Comment on attachment 121945 [details]
Patch

Clearing flags on attachment: 121945

Committed r104658: <http://trac.webkit.org/changeset/104658>
Comment 20 WebKit Review Bot 2012-01-10 17:51:41 PST
All reviewed patches have been landed.  Closing bug.