Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Unified Diff: Source/WebCore/dom/Document.cpp

Issue 10116046: Merge 113287 - Auto-size may not work on first load (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | Source/WebCore/page/FrameView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/dom/Document.cpp
===================================================================
--- Source/WebCore/dom/Document.cpp (revision 114571)
+++ Source/WebCore/dom/Document.cpp (working copy)
@@ -2338,11 +2338,11 @@
printf("onload fired at %d\n", elapsedTime());
#endif
- m_processingLoadEvent = false;
-
// An event handler may have removed the frame
- if (!frame())
+ if (!frame()) {
+ m_processingLoadEvent = false;
return;
+ }
// Make sure both the initial layout and reflow happen after the onload
// fires. This will improve onload scores, and other browsers do it.
@@ -2351,6 +2351,7 @@
if (frame()->navigationScheduler()->locationChangePending() && elapsedTime() < cLayoutScheduleThreshold) {
// Just bail out. Before or during the onload we were shifted to another page.
// The old i-Bench suite does this. When this happens don't bother painting or laying out.
+ m_processingLoadEvent = false;
view()->unscheduleRelayout();
return;
}
@@ -2370,6 +2371,8 @@
view()->layout();
}
+ m_processingLoadEvent = false;
+
// If painting and compositing layer updates were suppressed pending the load event, do these actions now.
if (renderer() && settings() && settings()->suppressesIncrementalRendering()) {
#if USE(ACCELERATED_COMPOSITING)
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | Source/WebCore/page/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698