mediawiki.special.watchlist: Fix render stampede after "Mark all pages visited"
authorTimo Tijhof <krinklemail@gmail.com>
Sat, 17 Dec 2016 05:47:28 +0000 (21:47 -0800)
committerTimo Tijhof <krinklemail@gmail.com>
Sat, 17 Dec 2016 05:47:28 +0000 (21:47 -0800)
commit2c85104eb9e68d16edb35c5afded1005a6eb227f
treed18c74f2c27c2d7c5bc3fd98ffc78cb3c7b7945e
parentaae209c128d9ac9a99daab0bc9f3df3039ff3757
mediawiki.special.watchlist: Fix render stampede after "Mark all pages visited"

Follow-up 9ea1142fadf4d70ceedc73592aea1c.

The progress bar has a continuous animation that is rather CPU heavy.
While it is set to 'visibility hidden', this is merely a way to make the
contents of the element transparent. It is still interactable (e.g. if it
has hover or click handlers, they would trigger if hovering in that area)
and still rendered with full 60fps paint and layout.

Instead, detach and (re-)append the element as needed. Since the element
has an absolute position, it doesn't cause a content reflow when the element
is detached. This fact is already made use of considering the element is
inserted only after the submit button is clicked - without content reflow.

Change-Id: I06ef0d527044e5a6080febdb618eaffeb6ec85fa
resources/src/mediawiki.special/mediawiki.special.watchlist.js