comparison chrome/pageloader.js @ 197:b4da709724e1

Bug 379233 - check offset before recording page load complete - r=vladimir
author Alice Nodelman <alice@mozilla.com>
date Fri, 17 Sep 2010 11:34:40 -0400
parents dd0018bc27de
children 59d4f04497dd
comparison
equal deleted inserted replaced
196:dd0018bc27de 197:b4da709724e1
288 evt.originalTarget.defaultView.frameElement) 288 evt.originalTarget.defaultView.frameElement)
289 return; 289 return;
290 if (timeout > 0) { 290 if (timeout > 0) {
291 clearTimeout(timeoutEvent); 291 clearTimeout(timeoutEvent);
292 } 292 }
293 var docElem;
294 if (browserWindow)
295 docElem = browserWindow.frames["content"].document.documentElement;
296 else
297 docElem = content.contentDocument.documentElement;
298 var width;
299 if ("getBoundingClientRect" in docElem) {
300 width = docElem.getBoundingClientRect().width;
301 } else if ("offsetWidth" in docElem) {
302 width = docElem.offsetWidth;
303 }
304
293 var end_time = Date.now(); 305 var end_time = Date.now();
294 var time = (end_time - start_time); 306 var time = (end_time - start_time);
295 307
296 // does this page want to do its own timing? 308 // does this page want to do its own timing?
297 // if so, we shouldn't be here 309 // if so, we shouldn't be here