Bug 71216 - Add Media characteristics pseudo classes
: Add Media characteristics pseudo classes
Status: RESOLVED WONTFIX
: WebKit
Media Elements
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To:
:
:
:
: 59867
  Show dependency treegraph
 
Reported: 2011-10-31 04:54 PST by
Modified: 2012-03-20 08:59 PST (History)


Attachments
proposed patch (21.59 KB, patch)
2011-10-31 05:51 PST, Arun Patole
gyuyoung.kim: commit‑queue-
Review Patch | Details | Formatted Diff | Diff
updated patch (21.81 KB, patch)
2011-10-31 07:04 PST, Arun Patole
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2011-10-31 04:54:59 PST
Add following Media characteristics pseudo classes:
  - has-closed-captioning
  - has-audio
  - has-video
  - has-duration

see:
https://bugs.webkit.org/show_bug.cgi?id=59867
------- Comment #1 From 2011-10-31 05:51:19 PST -------
Created an attachment (id=113042) [details]
praposed patch
------- Comment #2 From 2011-10-31 05:57:47 PST -------
(From update of attachment 113042 [details])
Attachment 113042 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/10244612
------- Comment #3 From 2011-10-31 06:33:41 PST -------
(In reply to comment #2)
> (From update of attachment 113042 [details] [details])
> Attachment 113042 [details] [details] did not pass efl-ews (efl):
> Output: http://queues.webkit.org/results/10244612

forgot to put changes under #if ENABLE(VIDEO), will upload updated patch soon...
------- Comment #4 From 2011-10-31 07:04:59 PST -------
Created an attachment (id=113046) [details]
updated patch
------- Comment #5 From 2011-11-03 02:56:49 PST -------
Can someone from people on CC list review the patch please.
------- Comment #6 From 2011-11-03 04:34:05 PST -------
It is not clear to me what these are good for (even after reading the whatwg thread). CSS is not very good for styling things based on state of another element so these are fairly inflexible to use. A media controller needs scripting anyway. A full implementation of all pseudo classes would require quite a bit of code.
------- Comment #7 From 2011-11-03 11:22:54 PST -------
(In reply to comment #6)
> It is not clear to me what these are good for (even after reading the whatwg thread). CSS is not very good for styling things based on state of another element so these are fairly inflexible to use.

What do you mean by this? Styling based on state of an ancestor is a very common pattern in Web development.

> A media controller needs scripting anyway. A full implementation of all pseudo classes would require quite a bit of code.

Yep. That's certainly a cost. But the benefit is pretty nice too, albeit localized to media controls and those styling them. And yes, you would still need scripting to build a full-blown media controller, but with these pseudo-classes, you could totally get away with just CSS to skin existing controls.
------- Comment #8 From 2011-11-03 16:06:09 PST -------
(In reply to comment #7)
> (In reply to comment #6)
> > It is not clear to me what these are good for (even after reading the whatwg thread). CSS is not very good for styling things based on state of another element so these are fairly inflexible to use.
> 
> What do you mean by this? Styling based on state of an ancestor is a very common pattern in Web development.

Exactly. Ancestors only. Inflexible. Presumably you would occasionally want elements other than ancestors to be affected by the media state.

> > A media controller needs scripting anyway. A full implementation of all pseudo classes would require quite a bit of code.
> 
> Yep. That's certainly a cost. But the benefit is pretty nice too, albeit localized to media controls and those styling them. And yes, you would still need scripting to build a full-blown media controller, but with these pseudo-classes, you could totally get away with just CSS to skin existing controls.

I think there is a whiff off adding features for the sake of adding features here. I think you should at least get some traction in whatwg first.

I don't really feel very strongly about this either way. Just asking the potential reviewers to consider if this is really worth doing.
------- Comment #9 From 2011-11-03 16:06:59 PST -------
I mean "elements other than children"
------- Comment #10 From 2011-11-04 08:59:06 PST -------
> I don't really feel very strongly about this either way. Just asking the potential reviewers to consider if this is really worth doing.

For what it's worth, I also have a similar doubt (even though I proposed this originally). There's a delicate cost/benefit balance, and I stand ambivalent in attempt to resolve it.
------- Comment #11 From 2011-11-04 09:38:20 PST -------
I am not an expert but it looked good addition to me and also because it was already discussed on WHATWG. I will cancel adding these classes as the advantages of having it are not clear.
------- Comment #12 From 2012-03-20 07:28:03 PST -------
(From update of attachment 113046 [details])
Canceling r? as we don't have consensus that this is a good direction. Please feel free to reopen if you think this is incorrect.
------- Comment #13 From 2012-03-20 08:59:13 PST -------
WONTFIX for now based on lack of traction.