Title: [122629] trunk/Source/WebCore
Revision
122629
Author
[email protected]
Date
2012-07-13 14:03:50 -0700 (Fri, 13 Jul 2012)

Log Message

Always aggressively preload on iOS
https://bugs.webkit.org/show_bug.cgi?id=91276

Patch by Benjamin Poulain <[email protected]> on 2012-07-13
Reviewed by Simon Fraser.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::preload):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (122628 => 122629)


--- trunk/Source/WebCore/ChangeLog	2012-07-13 20:45:55 UTC (rev 122628)
+++ trunk/Source/WebCore/ChangeLog	2012-07-13 21:03:50 UTC (rev 122629)
@@ -1,3 +1,13 @@
+2012-07-13  Benjamin Poulain  <[email protected]>
+
+        Always aggressively preload on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=91276
+
+        Reviewed by Simon Fraser.
+
+        * loader/cache/CachedResourceLoader.cpp:
+        (WebCore::CachedResourceLoader::preload):
+
 2012-07-13  Vineet Chaudhary  <[email protected]>
 
         Restructure V8Utilities::extractTransferables() with help of toV8Sequence()

Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (122628 => 122629)


--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2012-07-13 20:45:55 UTC (rev 122628)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2012-07-13 21:03:50 UTC (rev 122629)
@@ -728,14 +728,20 @@
     // FIXME: Rip this out when we are sure it is no longer necessary (even for mobile).
     UNUSED_PARAM(referencedFromBody);
 
-    bool hasRendering = m_document->body() && m_document->body()->renderer();
-    bool canBlockParser = type == CachedResource::Script || type == CachedResource::CSSStyleSheet;
-    if (!hasRendering && !canBlockParser) {
-        // Don't preload subresources that can't block the parser before we have something to draw.
-        // This helps prevent preloads from delaying first display when bandwidth is limited.
-        PendingPreload pendingPreload = { type, request, charset };
-        m_pendingPreloads.append(pendingPreload);
-        return;
+    bool delaySubresourceLoad = true;
+#if PLATFORM(IOS)
+    delaySubresourceLoad = false;
+#endif
+    if (delaySubresourceLoad) {
+        bool hasRendering = m_document->body() && m_document->body()->renderer();
+        bool canBlockParser = type == CachedResource::Script || type == CachedResource::CSSStyleSheet;
+        if (!hasRendering && !canBlockParser) {
+            // Don't preload subresources that can't block the parser before we have something to draw.
+            // This helps prevent preloads from delaying first display when bandwidth is limited.
+            PendingPreload pendingPreload = { type, request, charset };
+            m_pendingPreloads.append(pendingPreload);
+            return;
+        }
     }
     requestPreload(type, request, charset);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to