W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2015

Re: [whatwg] Event loop processing model, and current time

From: Ryosuke Niwa <rniwa@apple.com>
Date: Mon, 23 Feb 2015 20:13:36 -0800
Message-id: <C4922EA5-5BFE-4B62-A571-AC1B8E3E2453@apple.com>
To: James Robinson <jamesr@chromium.org>
Cc: Simon Fraser <smfr@me.com>, whatwg <whatwg@whatwg.org>

> On Feb 23, 2015, at 5:26 PM, James Robinson <jamesr@chromium.org> wrote:
> 
> On Mon, Feb 23, 2015 at 4:57 PM, Simon Fraser <smfr@me.com> wrote:
> 
>> https://html.spec.whatwg.org/multipage/webappapis.html#processing-model-9
>> says:
>> 
>> 1. Let now be the value that would be returned by the Performance object's
>> now() method
>> 2. Let docs be the list of Document objects associated with the event loop
>> in question…
>> ...
>> 4. For each fully active Document in docs, run the resize steps for that
>> Document, passing in now as the timestamp
>> ...
>> 
>> This makes no sense, as performance.now() is per-document (it’s relative
>> to the document start time), so passing the same value to all documents in
>> the browsing context is bogus.
>> 
>> What may be intended is to “freeze” the performance.now() time in all
>> documents before processing those documents, but give each document its own
>> performance.now() time.
>> 
> 
> That is the intent.  The algorithm should grab a timestamp for each
> document "at the same time" (which is really just a matter of grabbing one
> timestamp and applying the correct offset for each document).

In that case, step 1 should probably define a list of timestamps, not the value.  Alternatively, "now" should be defined for each document.

- R. Niwa
Received on Tuesday, 24 February 2015 04:14:05 UTC

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