[Webkit-unassigned] [Bug 49778] Add USE(CHROMIUM_NET)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 18 19:21:56 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=49778


William Chan <willchan at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |abarth at webkit.org,
                   |                            |darin at apple.com,
                   |                            |fishd at chromium.org,
                   |                            |mjs at apple.com




--- Comment #2 from William Chan <willchan at chromium.org>  2010-11-18 19:21:55 PST ---
Er, webkit-patch doesn't seem to have an option to add a description, unless I confused it with the title.  Sorry if I missed something.

I plan to use USE(CHROMIUM_NET) to unthrottle some preloading, like so:

diff --git a/WebCore/loader/cache/CachedResourceLoader.cpp b/WebCore/loader/cache/CachedResourceLoader.cpp
index 15c5f03..0e2a393 100644
--- a/WebCore/loader/cache/CachedResourceLoader.cpp
+++ b/WebCore/loader/cache/CachedResourceLoader.cpp
@@ -377,6 +377,9 @@ int CachedResourceLoader::requestCount()

 void CachedResourceLoader::preload(CachedResource::Type type, const String& url, const String& charset, bool referencedFromBody)
 {
+    // CHROMIUM_NET will prioritize network requests appropriately, so always
+    // request a preload.
+#if !USE(CHROMIUM_NET)
     bool hasRendering = m_document->body() && m_document->body()->renderer();
     if (!hasRendering && (referencedFromBody || type == CachedResource::ImageResource)) {
         // Don't preload images or body resources before we have something to draw. This prevents
@@ -385,6 +388,8 @@ void CachedResourceLoader::preload(CachedResource::Type type, const String& url,
         m_pendingPreloads.append(pendingPreload);
         return;
     }
+#endif  // !USE(CHROMIUM_NET)
+
     requestPreload(type, url, charset);
 }

Let me know if I should add this change into the proposed patch.  I wasn't sure if they should be separate or not.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list