W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2013

Re: [whatwg] Simplified <picture> element draft

From: Yoav Weiss <yoav@yoav.ws>
Date: Mon, 25 Nov 2013 09:00:10 +0100
Message-ID: <CACj=BEhXAq012CCBJzfQYTvg_dQ3Kt5vb1pv5CJ6wfGBr2Q9kw@mail.gmail.com>
To: Adam Barth <w3c@adambarth.com>
Cc: Timothy Hatcher <timothy@apple.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, whatwg <whatwg@whatwg.org>
This is a part of the proposal that got people excited. The linked document
defines picture's source selection algorithm.
It contains some parts that I'm not sure have a consensus around them yet:
* It defines <picture> as controlling <img>, where earlier on this list we
discussed mostly the opposite (<img> querying its parent <picture>, if one
* It defines <img> as a part of <picture>'s shadow DOM, which we need to
see how it fits with having fallback <img> elements (which are necessary in
the near future).

This proposal does contain srcset as a subcomponent, but it's not the same
srcset as defined in the HTML spec, but a modified version based on
improvements from the src-N spec. (that cover the variable-width images

The proposal will also require some changes to <img> and specifically, when
not created by JS, <img> will have to avoid loading of resources until the
element is added to the DOM, and can see if its direct parent is <picture>.
If the parent is <picture>, <img> would then query the parent (or wait to
be "controlled" by its parent), otherwise, it'll load its resources as

On Mon, Nov 25, 2013 at 8:33 AM, Adam Barth <w3c@adambarth.com> wrote:

> I'm trying to sort out from the many messages on this topic which
> proposal I should read in detail.  Is the one linked below the one
> that people are most excited about?  I'm I correct in understand that
> this proposal contains srcset as a subcomponent?
> Thanks,
> Adam
> On Sat, Nov 23, 2013 at 3:04 PM, Kornel LesiƄski <kornel@geekhood.net>
> wrote:
> >
> > I've written down proposal for the simplified source selection algorithm:
> >
> > http://geekhood.net/picture-element.html
> >
> > This also includes variant of the idea from the recent "<picture> redux"
> > proposal to use an actual <img> element as the basis for the <picture>
> > element definition.
> >
> > This draft doesn't include all features of src-N *yet*, but I expect
> this to
> > be added either via extended srcset syntax to something like <source
> sizes>
> > once there's consensus how to approach this.
> >
> > To simplify implementation even further I've allowed UAs to flatten
> fallback
> > DOM to a plaintext string (in case they need to emulate <img alt> for
> > existing screen readers or accessibility APIs).
> >
> > I've dropped usemap. It could be added, but I'm not sure if there is need
> > for it.
> >
> > I've specified very few IDL attributes. This area may need to be
> extended.
> >
> > --
> > regards, Kornel
Received on Monday, 25 November 2013 08:00:37 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:14 UTC