On Friday, July 22, 2016 at 6:53:45 AM UTC-7, Mike Conley wrote: 
> As for MozAfterPaint firing all over the place - you might find this
> useful:
> https://groups.google.com/forum/#!searchin/mozilla.dev.platform/MozAfterPaint/mozilla.dev.platform/pCLwWdYc_GY/j9A-vWm3AgAJ
> 
> See the second example I wrote in
> https://developer.mozilla.org/en-US/docs/Web/Events/MozAfterPaint#Example

Follow-up question.

I started using the transaction ID in my tests and am getting this weird result:

1)  24.00: DOM Loading 
1)  65.50: Paint with transaction ID 38
2)  73.00: DOM Interactive (winUtils.lastTransactionId == 39)
3)  74.00: DOMContentLoadedEventStart
4)  94.00: DOMComplete
5) 162.00: loadEventEnd
6) 196.97: Paint with transaction ID 39
7) 271.94: Paint with transaction ID 40

And this order happens relatively often. What's surprising is that the 
winUtils.lastTransactionId read done at readyState=='interactive' is 39.

>From what you said in the linked post, the transaction ID 39 is the one that 
>has been sent to the compositor *before* document.readyState changed to 
>'interactive'.

That means that this transaction did not contain DOM from HTML and will not 
result in a layout yet, so I'm hunting for the *next* transaction after it, 
which has ID 40.

But the next paint happens at 196.97 and it has the transaction ID 39, and then 
finally the paint with transacation ID 40 happens at 271.94

Should I take the one with ID 39 or 40 as "the first paint of the document"?

zb.

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to