Re: Simplified source selection algorithm

On Mon, 07 Oct 2013 16:27:06 +0200, Marcos Caceres <w3c@marcosc.com> wrote:

>
>
>
> On Monday, September 30, 2013 at 5:02 PM, Simon Pieters wrote:
>
>>
>> Reversing the order creates a problem: the algorithm can't be run during
>> parsing until the </picture> end tag is seen. This is bad and something
>> that HTML tries to avoid (<video> avoids it, but <object> has to do it
>> because plugins need all parameters at init time).
>>
>> Consider the following case:
>>
>> <picture>
>> <source ...>
>> <source ...>
>> <!-- packet boundary here, and data is a bit slow to arrive -->
>>
>> With reverse order, the browser can't start downloading any source  
>> because
>> there might come other <source>s that need to be checked first.
>>
>> The same thing can happen if there's a lot of fallback content in the
>> <picture>.
>>
>
>
> I guess this also affects src-n, as the "-n" is significant when doing  
> the evaluation to find the src ?

No. In the HTML parser, the whole tag is first tokenized into a single  
token with all the attributes, and then the tree builder inserts an  
element with all the attributes to the document.

-- 
Simon Pieters
Opera Software

Received on Monday, 7 October 2013 14:41:30 UTC