Files
gerrit/polygerrit-ui/app/elements/core/gr-router
Wyatt Allen 3a69d82777 Force PolyGerrit render in background
Polymer (as well as webcomponents-lite) perform some initialization in
handlers for the `requestAnimationFrame` callback for performance
reasons. The principal drawback of this approach is that pages will not
render in background tabs (such as tabs created by Ctrl+Click-ing a
link) because the rAF system will not offer a frame until the tab has
been foregrounded.

With this change, PolyGerrit pages are rendered in the background by
calling a private function that tweaks the internal state of the Polymer
rendering mechanism to bypass the rAF callback (on the Polymer team's
advice).

Because GR-ROUTER depended on the `webcomponentsready` event, which had
been polyfilled by webcomponents-light inside another rAF callback, it
is refactored to initialize the router inside a Polymer instance method.

Bug: Issue 4334
Change-Id: I8fa43e37199848e053225626406e31613c20deda
2017-02-15 09:21:07 -08:00
..