Re: Do we need a rendering spec?

On Jan 23, 2014, at 2:45 PM, Dimitri Glazkov <dglazkov@google.com> wrote:
> As HTML imports [1] are implemented across browsers, there’s a potential for diversity of opinion in how rendering of documents with imports occurs. What blocks rendering?
> What doesn’t? To prevent the inevitable pain of converging on a de-facto standard behavior, it would be super-nice to have precise documentation of when the rendering engine should start (and stop) rendering the document.

I don't think we want to expose when rendering / painting / style resolution happens to the Web just like we don't want to expose GC timing to the Web.  e.g. it makes the UAs much more vulnerable against the timing attacks.  If the HTML imports specification exposes such timing, then we should "fix" that so that we expose such timing.

But before jumping to conclusions, could you clarify how exactly HTML imports creates a dependency on the rendering timing?

> The specific problem we (the imports people) are interested in is “when do things first appear on screen?”, and we could definitely hack up some vague informative prose in the HTML Imports spec in the short term.
> 
> But long-term, do we (the W3C people) want a rendering spec?
> 
> It seems like a daunting path with lots of obstacles. To name a few:
> 
> * Things like first-frame rendering traditionally had been a secret sauce for performance optimizations. Trying to standardize this could potentially remove such opportunities.

Indeed.

> * Rendering as a concept doesn’t seem to exist in spec land. Starting from scratch will be a ton of work.
> 
> * Browsers do wildly different things when rendering. Coming up with a cohesive unified spec for existing behaviors sounds like an epic multi-year undertaking.

Right.  What does "the first time to render" mean for printing UA for example?

> * Even more fundamentally, what is really rendering? Is it when the pixels appear on screen? Is it the specific consistent state of the box tree? Hell, do we have to now define a box tree?

I don't think we want to define those either.  Those should be left as implementation details.

- R. Niwa

Received on Saturday, 25 January 2014 01:53:32 UTC