зеркало из https://github.com/mozilla/gecko-dev.git
104f98fb8c
Accessing `offsetXXX` attributes of element, it would trigger reflow, and sometime it would result in a re-entry of `processCue()` because we would call `processCue()` when `resizecaption` occurs. One specifical case is that, assigning CSS properties `min-width` and `max-width` at the same video element, in thise case, when we re-enter the `processCues()` and access `offsetXXX`. It seems that the layout system would reprocess those properites again and again and dispatch `resizecaption` when we access `offsetXXX`, which causes an infinite loop, starting from receving `resizecaption`, then calling `processCue()`, accessing `offSetXXX`, triggering reflow, sending `resizecaption` event again. Therefore, we should stop revisiting `processCues()` if we're already running a processing, we should run a processing once at a time. Differential Revision: https://phabricator.services.mozilla.com/D45421 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
tests | ||
WebVTTParserWrapper.jsm | ||
components.conf | ||
moz.build | ||
nsIWebVTTListener.idl | ||
nsIWebVTTParserWrapper.idl | ||
package.json | ||
update-webvtt.js | ||
vtt.jsm |