Title: [122446] trunk/Source/WebCore
Revision
122446
Author
an...@apple.com
Date
2012-07-12 04:41:20 -0700 (Thu, 12 Jul 2012)

Log Message

Failure to dispatch didFinishLoadForFrame if font load fails synchronously 
https://bugs.webkit.org/show_bug.cgi?id=91018

Reviewed by Enrica Casucci.

New font loads may be triggered by layout after the document load is complete but before we have dispatched
didFinishLoading for the frame. If the load fails synchronously we might fail to ever invoke 
FrameLoader::checkLoadComplete and so fail to dispatch didFinishLoading.
        
Make sure this doesn't happen by calling FrameLoader::checkLoadComplete explicitly after triggering font loads.

* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::beginLoadTimerFired):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (122445 => 122446)


--- trunk/Source/WebCore/ChangeLog	2012-07-12 11:26:27 UTC (rev 122445)
+++ trunk/Source/WebCore/ChangeLog	2012-07-12 11:41:20 UTC (rev 122446)
@@ -1,3 +1,19 @@
+2012-07-11  Antti Koivisto  <an...@apple.com>
+
+        Failure to dispatch didFinishLoadForFrame if font load fails synchronously 
+        https://bugs.webkit.org/show_bug.cgi?id=91018
+
+        Reviewed by Enrica Casucci.
+
+        New font loads may be triggered by layout after the document load is complete but before we have dispatched
+        didFinishLoading for the frame. If the load fails synchronously we might fail to ever invoke 
+        FrameLoader::checkLoadComplete and so fail to dispatch didFinishLoading.
+        
+        Make sure this doesn't happen by calling FrameLoader::checkLoadComplete explicitly after triggering font loads.
+
+        * css/CSSFontSelector.cpp:
+        (WebCore::CSSFontSelector::beginLoadTimerFired):
+
 2012-07-12  Gyuyoung Kim  <gyuyoung....@samsung.com>
 
         Register protocol handler files should be in Modules/protocolhandler

Modified: trunk/Source/WebCore/css/CSSFontSelector.cpp (122445 => 122446)


--- trunk/Source/WebCore/css/CSSFontSelector.cpp	2012-07-12 11:26:27 UTC (rev 122445)
+++ trunk/Source/WebCore/css/CSSFontSelector.cpp	2012-07-12 11:41:20 UTC (rev 122446)
@@ -586,6 +586,10 @@
     }
     // Ensure that if the request count reaches zero, the frame loader will know about it.
     cachedResourceLoader->loadDone();
+    // New font loads may be triggered by layout after the document load is complete but before we have dispatched
+    // didFinishLoading for the frame. Make sure the delegate is always dispatched by checking explicitly.
+    if (m_document && m_document->frame())
+        m_document->frame()->loader()->checkLoadComplete();
 }
 
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to