On Wed, Nov 6, 2013 at 11:33 PM, Benjamin Poulain <benja...@webkit.org>wrote:
> On 11/6/13, 10:53 AM, John Mellor wrote: > >> On Sun, Oct 20, 2013 at 2:00 AM, Maciej Stachowiak <m...@apple.com >> <mailto:m...@apple.com>> wrote: >> > >> > My initial impression is that it seems a bit overengineered. >> >> I sympathize. The issue of srcN appearing to be a complex solution to a >> seemingly simple problem came up again on IRC chatting to rniwa, so I >> thought I'd try to explain this briefly. >> >> Unfortunately, responsive images is a deceptively complex problem. There >> are 3 main use cases: >> 1. dpr-switching: fixed-width image resolution based on devicePixelRatio. >> 2. viewport-switching: flexible-width image resolution based on viewport >> width and devicePixelRatio. >> 3. art direction: same as #1 or #2, except additionally, must serve >> completely different images based on viewport width. >> > > How important and common are each of those use cases? > Handling every imaginable use case by the Engine is a non-goal. > There has been a lot of demand for dpr-switching since the first iPad > Retina. This has caused some very ugly hacks on the Web. It is very > important to address that issue. > > Viewport switching is usually done to adapt images for mobile device VS > large/huge display devices. It is a valid concern but it is not easily > addressed. Srcset can/should likely be improved regarding this. > > I believe (feel free to prove me wrong) dynamic viewport adaptation and > what you call "art direction" is not as common. > On a survey ran at the last Mobilism conference (and on Twitter) 41% of respondents said they're already using some hack to get their responsive image "art-directed". A manual responsive site survey<http://japborst.net/blog/the-current-state-of-art-direction.html> showed that 23% of the sites "art-direct" their images, and 58% do that when (subjectively) the design requires it. So it might not be as common as viewport switching (which is practically everywhere), but it is pretty common. I have the feeling those corner cases may be better addressed with > JavaScript. > I don't think art-direction qualifies as a corner case. > > > In my opinion WebKit should not support srcN in its current form. We are > here to make the web a better/friendlier platform. The srcN proposal does > not do that, it is a catch all that makes the important use cases more > difficult. > > Benjamin > > _______________________________________________ > webkit-dev mailing list > webkit-dev@lists.webkit.org > https://lists.webkit.org/mailman/listinfo/webkit-dev >
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev