Fix "flash to white' problem on yahoo.com as it finishes loading. Refine...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Oct 2006 08:52:26 +0000 (08:52 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Oct 2006 08:52:26 +0000 (08:52 +0000)
        code so that it will only run if the body still has no renderer.

        * dom/Document.cpp:
        (WebCore::Document::updateLayoutIgnorePendingStylesheets):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17076 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/dom/Document.cpp

index 95bf3de61f49d3bcf76fbcebeea31247feb48334..490386cd23f1c5827343ca0efffd5536247e382d 100644 (file)
@@ -1,3 +1,11 @@
+2006-10-17  David Hyatt  <hyatt@apple.com>
+
+        Fix "flash to white' problem on yahoo.com as it finishes loading.  Refine the FOUC suppression
+        code so that it will only run if the body still has no renderer.
+
+        * dom/Document.cpp:
+        (WebCore::Document::updateLayoutIgnorePendingStylesheets):
+
 2006-10-17  David Hyatt  <hyatt@apple.com>
 
         Fix a bug where the WebCore memory cache could grow without bound during extended browsing
index 7fc238a6d6b87b56d13de56c692eada4fd44b94e..ba300255f7195469346599f1d0d68a19ddbd713f 100644 (file)
@@ -936,7 +936,7 @@ void Document::updateLayoutIgnorePendingStylesheets()
         // moment.  If it were more refined, we might be able to do something better.)
         // It's worth noting though that this entire method is a hack, since what we really want to do is
         // suspend JS instead of doing a layout with inaccurate information.
-        if (m_pendingSheetLayout == NoLayoutWithPendingSheets)
+        if (body() && !body()->renderer() && m_pendingSheetLayout == NoLayoutWithPendingSheets)
             m_pendingSheetLayout = DidLayoutWithPendingSheets;
         updateStyleSelector();    
     }
@@ -1254,6 +1254,7 @@ void Document::implicitClose()
         if (view() && renderer() && (!renderer()->firstChild() || renderer()->needsLayout()))
             view()->layout();
     }
+
 #if __APPLE__
     if (renderer() && AXObjectCache::accessibilityEnabled())
         axObjectCache()->postNotificationToElement(renderer(), "AXLoadComplete");