Confirmed users
586
edits
Line 56: | Line 56: | ||
=== Deferred layout problems === | === Deferred layout problems === | ||
Accessing layout properties like window.scrollX or body.scrollHeight might trigger some layout code to run in order to provide the correct value. While layout code is running, it could re-enter back into browser.js to run some event handlers. For example, I have observed this happening during device rotation in at least one version of the code - getViewport() is called which tries to access scrollX, which triggers the "resize" event handler in browser.js to run, which causes re-entrancy back into getViewport(). The outer call to getViewport() could end up returning inconsistent values as a result. | Accessing layout properties like window.scrollX or body.scrollHeight might trigger some layout code to run in order to provide the correct value. While layout code is running, it could re-enter back into browser.js to run some event handlers. For example, I have observed this happening during device rotation in at least one version of the code - getViewport() is called which tries to access scrollX, which triggers the "resize" event handler in browser.js to run, which causes re-entrancy back into getViewport(). The outer call to getViewport() could end up returning inconsistent values as a result. (Note: {{bug|764467}} should eliminate this problem, but I'm leaving this here as it is something that should be taken into consideration when touching this code). | ||
== Related bugs for more information == | == Related bugs for more information == |