Bug 149111 - [GTK] timeline is not updated after few seconds when mouse hovers on controls
Summary: [GTK] timeline is not updated after few seconds when mouse hovers on controls
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: ChangSeok Oh
URL:
Keywords:
Depends on:
Blocks: 149396
  Show dependency treegraph
 
Reported: 2015-09-13 22:04 PDT by ChangSeok Oh
Modified: 2015-09-21 01:37 PDT (History)
5 users (show)

See Also:


Attachments
Patch (5.21 KB, patch)
2015-09-14 09:26 PDT, ChangSeok Oh
no flags Details | Formatted Diff | Diff
Patch (5.30 KB, patch)
2015-09-16 09:10 PDT, ChangSeok Oh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ChangSeok Oh 2015-09-13 22:04:27 PDT
1. go http://www.w3schools.com/html/html5_video.asp
2. click a play button
3. stay cursor on the playbutton.
4. you can see time is paused after 4 seconds.
Comment 1 ChangSeok Oh 2015-09-14 09:26:46 PDT
Created attachment 261112 [details]
Patch
Comment 2 Xabier Rodríguez Calvar 2015-09-16 00:57:43 PDT
Can you please tell me which diagnostics have you made so that you reach the conclusion that this is the best patch?

It is weird because we shouldn't need to check the opacity as precisely, we handle the opacity thru CSS with the classes we add to the element.
Comment 3 ChangSeok Oh 2015-09-16 01:26:19 PDT
(In reply to comment #2)
> Can you please tell me which diagnostics have you made so that you reach the
> conclusion that this is the best patch?
> 
> It is weird because we shouldn't need to check the opacity as precisely, we
> handle the opacity thru CSS with the classes we add to the element.

As I described the situation in the ChangeLog, We changed not to update time if controllAreHidden is true in https://bugs.webkit.org/show_bug.cgi?id=137773.
However this affects on controls behavior very much. Let guess this scenario.
(move cursor on playbutton) -> (click play button) -> (hideControl timer fired by resetHideControlsTimer after 4 secs) -> (now controlsAreHidden is true since panel has neither -webkit-media-controls-panel.show nor -webkit-media-controls-panel.hidden) -> (playing along with visible controls due to -webkit-media-controls-panel:hover which sets opacity to 1, but time is not updated because of controlsAreHidden == 1)
So the problem here is controlsAreHidden does not actually mean "hidden" and I check the opacity is really 0.

I don't want to argue this approach is the best. Any better idea is welcome. =)
Comment 4 ChangSeok Oh 2015-09-16 01:29:01 PDT
This fixes audio controls broken as well.
Try http://www.quackit.com/html_5/tags/html_audio_tag.cfm
Comment 5 Xabier Rodríguez Calvar 2015-09-16 04:04:02 PDT
(In reply to comment #3)
> As I described the situation in the ChangeLog, We changed not to update time
> if controllAreHidden is true in
> https://bugs.webkit.org/show_bug.cgi?id=137773.
> However this affects on controls behavior very much. Let guess this scenario.
> (move cursor on playbutton) -> (click play button) -> (hideControl timer
> fired by resetHideControlsTimer after 4 secs) -> (now controlsAreHidden is
> true since panel has neither -webkit-media-controls-panel.show nor
> -webkit-media-controls-panel.hidden) -> (playing along with visible controls
> due to -webkit-media-controls-panel:hover which sets opacity to 1, but time
> is not updated because of controlsAreHidden == 1)
> So the problem here is controlsAreHidden does not actually mean "hidden" and
> I check the opacity is really 0.

I understand now, good catch. You're right, another check needs to be done, though I don't think checking for opacity is the best way to go, but checking for the :hover property as :hover can change opacity, display or whatever we want from CSS. IMHO, we are safer with checking for :hover.
Comment 6 ChangSeok Oh 2015-09-16 09:10:34 PDT
Created attachment 261311 [details]
Patch
Comment 7 ChangSeok Oh 2015-09-16 09:14:36 PDT
(In reply to comment #5)
> (In reply to comment #3)
> > As I described the situation in the ChangeLog, We changed not to update time
> > if controllAreHidden is true in
> > https://bugs.webkit.org/show_bug.cgi?id=137773.
> > However this affects on controls behavior very much. Let guess this scenario.
> > (move cursor on playbutton) -> (click play button) -> (hideControl timer
> > fired by resetHideControlsTimer after 4 secs) -> (now controlsAreHidden is
> > true since panel has neither -webkit-media-controls-panel.show nor
> > -webkit-media-controls-panel.hidden) -> (playing along with visible controls
> > due to -webkit-media-controls-panel:hover which sets opacity to 1, but time
> > is not updated because of controlsAreHidden == 1)
> > So the problem here is controlsAreHidden does not actually mean "hidden" and
> > I check the opacity is really 0.
> 
> I understand now, good catch. You're right, another check needs to be done,
> though I don't think checking for opacity is the best way to go, but
> checking for the :hover property as :hover can change opacity, display or
> whatever we want from CSS. IMHO, we are safer with checking for :hover.

Otherwise we can use querySelector to check :hover existence. However, I'm not sure if that way is better than checking opacity directly in performance aspect..
Comment 8 Xabier Rodríguez Calvar 2015-09-17 02:34:59 PDT
(In reply to comment #7)
> Otherwise we can use querySelector to check :hover existence. However, I'm
> not sure if that way is better than checking opacity directly in performance
> aspect..

LGTM. I don't think, unless you correct me, that performance is going to be a problem.
Comment 9 ChangSeok Oh 2015-09-21 00:51:05 PDT
Comment on attachment 261311 [details]
Patch

Thanks!
Comment 10 WebKit Commit Bot 2015-09-21 01:37:44 PDT
Comment on attachment 261311 [details]
Patch

Clearing flags on attachment: 261311

Committed r190053: <http://trac.webkit.org/changeset/190053>
Comment 11 WebKit Commit Bot 2015-09-21 01:37:48 PDT
All reviewed patches have been landed.  Closing bug.