Re: CfC: to publish "The picture element" specification as a First Public Working Draft (FPWD)

As the author of the Chromium `<picture>` prototype, I did not find it hard
to re-use <source>, but I kept most of the logic inside
HTMLPictureElement.cpp (similiar to the way that media element's logic for
source selection is in HTMLMediaElement.cpp)

>From an implementation standpoint, at least in WebKit, it is feasible for
the `<source>` element to have different attributes depending on its
parent. IMO, a better alternative would be to define a unified interface
for `<source>` (i.e. add `srcset` to `<source>`, regardless of the parent
element) and media elements will simply ignore it.


On Mon, Feb 4, 2013 at 1:45 PM, Marcos Caceres <w3c@marcosc.com> wrote:

>
>
>
>
>
> On Monday, 4 February 2013 at 12:39, Bruce Lawson wrote:
>
> > On Mon, 04 Feb 2013 12:30:29 -0000, Marcos Caceres <w3c@marcosc.com(mailto:
> w3c@marcosc.com)> wrote:
> >
> >
> > > On Monday, 4 February 2013 at 11:59, Silvia Pfeiffer wrote:
> >
> > > > I do wonder whether reusing <source> is a good idea or whether it
> > > > should just be something different for images...
> > >
> > >
> > >
> > > I wondered the same. But advice I got from different people was to
> resue
> > > existing elements instead of inventing new ones.
> >
> >
> >
> > It seems to me (speaking personally rather than for Opera) that
> > conceptually there is no difference between <source> that chooses a
> source
> > file for <video>/ <audio> depending on a media query, and a mechanism
> that
> > chooses a source file for a responsive image element depending on a media
> > query. So it feels to me that minting a new element for authors to get to
> > grips with because of implementation/ specification complexity violates
> > the priority of constituencies.
>
> Correct. The problem is adding srcset to <source> because the attribute
> then it becomes <picture> specific (i.e., <video|audio><source srcset> is
> meaningless, and may be confusing because it works in one context (picture)
> but not others (video|audio)). I don't like that personally, unless we are
> going to make a case for responsive video and responsive audio :)
> >
> > (It may, however, factor into a browser vendor's decision to implement or
> > not. Did the author of the Chromium implementation find it harder to
> > re-use <source>?)
> >
> > --
> >
> >
> > Bruce Lawson
> > Open standards evangelist
> > Developer Relations Team
> > Opera
> >
> > http://dev.opera.com
>
>
>
>

Received on Monday, 4 February 2013 13:07:28 UTC