[Webkit-unassigned] [Bug 48476] New: ResourceRequest targetType set to Subresource for main frame and subframe loads

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 27 15:27:39 PDT 2010


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

           Summary: ResourceRequest targetType set to Subresource for main
                    frame and subframe loads
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Page Loading
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jmason at rim.com


ResourceRequestBase::targetType was added for the Chrome port and moved into cross-platform WebCore in svn 51859.

But, it is only initialized to a resource type in PingLoader::loadImage, PingLoader::sendPing, WorkerScriptLoader::createResourceRequest, and cachedResourceTypeToTargetType in loader.cpp - all of which only deal with subresources.  For ResourceRequest's created to do top-level loads (into a main frame or subframe), it's left as the default of TargetIsSubresource.  This isn't just underspecified, it's clearly wrong - target type should be TargetIsMainFrame or TargetIsSubframe.

As far as I know nobody actually checks targetType for non-subresources at the moment, so this is not critical.  But this information would be useful or clients to have, for instance in dispatchDecidePolicyForNavigationAction to make different decisions when loading a main frame vs loading a subframe.

The attached patch sets the targetType whenever a ResourceRequest is created.  No tests yet since I'd like to get a second opinion on whether this is the right approach before spending more time getting it ready for submission.

-- 
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