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

Re: [whatwg] <picture> redux

From: Timothy Hatcher <timothy@apple.com>
Date: Wed, 20 Nov 2013 19:36:12 -0800
Message-id: <CDFE7AC1-A58A-4C14-B231-0581675699FE@apple.com>
To: Kornel Lesiński <kornel@geekhood.net>
Cc: whatwg <whatwg@whatwg.org>
On Nov 20, 2013, at 7:06 PM, Kornel Lesiński <kornel@geekhood.net> wrote:

> On Wed, 20 Nov 2013 17:25:07 -0000, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 
>> Simon Pieters wrote up Kornel's earlier approach to a saner, more
>> palatable source selection algorithm for <picture> (rather than
>> copying <video>/<audio>).  This approach also has a new wrinkle:
>> <picture> *requires* an <img> child, and it's the <img> that still
>> actually displays the image.  The <picture> element is just a wrapper
>> for the <img>+<source> elements, and provides a context for the source
>> selection algorithm.  This makes testing substantially easier, as we
>> can limit ourselves to testing the source selection algorithm, and
>> probably makes implementation easier as well.
> 
> Can we hide the "controlling" <img> in shadow DOM? And make HTMLPictureElement the interface that proxies relevant properties/events to the internal <img>?
> 
> Reuse of <img> is a great idea for simpler implementation and testing, but maybe we don't even need to expose that fact to the authors.
> 
> -- 
> regards, Kornel


Authors are likely going to need an explicit <img> for backwards compatibility anyway. Having an implicit <img> in the shadow DOM that is created if one isn't explicitly provided is interesting.

— Timothy Hatcher
Received on Thursday, 21 November 2013 03:37:21 UTC

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