Bug 57384

Summary: CFNetwork and WebCore load priorities should match
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: Page LoadingAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, joepeck, koivisto, psolanki
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.6   
Bug Depends on:    
Bug Blocks: 61078    
Attachments:
Description Flags
Patch v1
ddkilzer: commit-queue-
Patch v2 ap: review+, ddkilzer: commit-queue-

Description David Kilzer (:ddkilzer) 2011-03-29 13:34:52 PDT
* SUMMARY
When resource load priorities are round-tripped through CFNetwork for the experimental HTTP pipelining feature, we currently map 4 WebCore priorities to 3 CFNetwork priorities.  This should be fixed so that the load priorities match when they are round-tripped.
Comment 1 David Kilzer (:ddkilzer) 2011-04-04 11:52:09 PDT
Created attachment 88087 [details]
Patch v1
Comment 2 David Kilzer (:ddkilzer) 2011-04-04 13:22:14 PDT
Created attachment 88111 [details]
Patch v2

Made a small fix in ResourceHandleMac.mm compared to Patch v1:

     if (isHTTPPipeliningEnabled()) {
-        int priority = mapResourceLoadPriorityToHTTPPipeliningPriority(m_priority);
-        wkSetHTTPPipeliningPriority(nsRequest, shouldForceHTTPPipeliningPriorityHigh() ? 2 : priority);
+        int priority = toHTTPPipeliningPriority(shouldForceHTTPPipeliningPriorityHigh() ? ResourceLoadPriorityHigh : m_priority);
+        wkSetHTTPPipeliningPriority(nsRequest, priority);
     }
Comment 3 David Kilzer (:ddkilzer) 2011-04-04 21:40:31 PDT
Committed r82900: <http://trac.webkit.org/changeset/82900>