On 10/06/2016 22:56, smaug wrote:
, and dtd localization in XHTML is currently synchronous on parsing.
That seems like a large change that will cause a lot
of problems relating to reflow / flashes of unlocalized content

Why would it cause reflows or flashes of unlocalized content?

AIUI, if I insert content that needs localizing with these attributes into the DOM tree of a document, and then read any salient property of that document/tree that triggers a reflow (scrollHeight, anything off the bounding client rect, etc.), that will cause a sync reflow before the localized content is there, and it will likely produce different values from what we want when localization is in place.

Separately, the documentation put forth so far seems to indicate that the localization itself is also async, on top of the asyncness of the mutationobserver approach, and that could potentially result in flashes of unlocalized content, depending on "how" asynchronous that API really ends up being. (AFAIK, if the API returned an already-resolved promise, there might be less chance of that than if it actually went off and did IO off-main-thread, then came back with some results.)

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

Reply via email to