mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1067173 - Bail out early if _resizeGrid() is called before the page has loaded f=Mardak r=adw
This commit is contained in:
parent
85145c4ecf
commit
ed63da4f97
@ -193,6 +193,13 @@ let gGrid = {
|
||||
* Make sure the correct number of rows and columns are visible
|
||||
*/
|
||||
_resizeGrid: function Grid_resizeGrid() {
|
||||
// If we're somehow called before the page has finished loading,
|
||||
// let's bail out to avoid caching zero heights and widths.
|
||||
// We'll be called again when the load event fires.
|
||||
if (document.readyState != "complete") {
|
||||
return;
|
||||
}
|
||||
|
||||
// Save the cell's computed height/width including margin and border
|
||||
if (this._cellMargin === undefined) {
|
||||
let refCell = document.querySelector(".newtab-cell");
|
||||
|
Loading…
Reference in New Issue
Block a user