Bug 71216 - Add Media characteristics pseudo classes
: Add Media characteristics pseudo classes
Status: RESOLVED WONTFIX
Product: WebKit
Classification: Unclassified
Component: Media Elements
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To: Nobody
:
Depends on:
Blocks: 59867
  Show dependency treegraph
 
Reported: 2011-10-31 04:54 PDT by Arun Patole
Modified: 2012-03-20 08:59 PDT (History)
6 users (show)

See Also:


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

Note You need to log in before you can comment on or make changes to this bug.
Description Arun Patole 2011-10-31 04:54:59 PDT
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 Arun Patole 2011-10-31 05:51:19 PDT
Created attachment 113042 [details]
proposed patch
Comment 2 Gyuyoung Kim 2011-10-31 05:57:47 PDT
Comment on attachment 113042 [details]
proposed patch

Attachment 113042 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/10244612
Comment 3 Arun Patole 2011-10-31 06:33:41 PDT
(In reply to comment #2)
> (From update of attachment 113042 [details])
> Attachment 113042 [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 Arun Patole 2011-10-31 07:04:59 PDT
Created attachment 113046 [details]
updated patch
Comment 5 Arun Patole 2011-11-03 02:56:49 PDT
Can someone from people on CC list review the patch please.
Comment 6 Antti Koivisto 2011-11-03 04:34:05 PDT
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 Dimitri Glazkov (Google) 2011-11-03 11:22:54 PDT
(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 Antti Koivisto 2011-11-03 16:06:09 PDT
(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 Antti Koivisto 2011-11-03 16:06:59 PDT
I mean "elements other than children"
Comment 10 Dimitri Glazkov (Google) 2011-11-04 08:59:06 PDT
> 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 Arun Patole 2011-11-04 09:38:20 PDT
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 Eric Carlson 2012-03-20 07:28:03 PDT
Comment on attachment 113046 [details]
updated patch

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 Antti Koivisto 2012-03-20 08:59:13 PDT
WONTFIX for now based on lack of traction.