Changeset 106655 in webkit


Ignore:
Timestamp:
Feb 3, 2012 6:05:32 AM (12 years ago)
Author:
rwlbuis@webkit.org
Message:

2012-02-03 Rob Buis <rbuis@rim.com>

Upstream targetType usage on ResourceRequest for BlackBerry port
https://bugs.webkit.org/show_bug.cgi?id=77649

Reviewed by Antonio Gomes.

Upstream bits that make use of targetType enum.

  • loader/PingLoader.cpp: (WebCore::PingLoader::loadImage): (WebCore::PingLoader::sendPing): (WebCore::PingLoader::reportContentSecurityPolicyViolation):
  • platform/network/blackberry/ResourceRequest.h: (ResourceRequest): (WebCore::ResourceRequest::targetType): (WebCore::ResourceRequest::setTargetType):
  • xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::createRequest):
Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r106654 r106655  
     12012-02-03  Rob Buis  <rbuis@rim.com>
     2
     3        Upstream targetType usage on ResourceRequest for BlackBerry port
     4        https://bugs.webkit.org/show_bug.cgi?id=77649
     5
     6        Reviewed by Antonio Gomes.
     7
     8        Upstream bits that make use of targetType enum.
     9
     10        * loader/PingLoader.cpp:
     11        (WebCore::PingLoader::loadImage):
     12        (WebCore::PingLoader::sendPing):
     13        (WebCore::PingLoader::reportContentSecurityPolicyViolation):
     14        * platform/network/blackberry/ResourceRequest.h:
     15        (ResourceRequest):
     16        (WebCore::ResourceRequest::targetType):
     17        (WebCore::ResourceRequest::setTargetType):
     18        * xml/XMLHttpRequest.cpp:
     19        (WebCore::XMLHttpRequest::createRequest):
     20
    1212012-02-03  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
    222
  • trunk/Source/WebCore/loader/PingLoader.cpp

    r100895 r106655  
    5757
    5858    ResourceRequest request(url);
    59 #if PLATFORM(CHROMIUM)
     59#if PLATFORM(CHROMIUM) || PLATFORM(BLACKBERRY)
    6060    request.setTargetType(ResourceRequest::TargetIsImage);
    6161#endif
     
    7676{
    7777    ResourceRequest request(pingURL);
    78 #if PLATFORM(CHROMIUM)
     78#if PLATFORM(CHROMIUM) || PLATFORM(BLACKBERRY)
    7979    request.setTargetType(ResourceRequest::TargetIsSubresource);
    8080#endif
     
    107107{
    108108    ResourceRequest request(reportURL);
    109 #if PLATFORM(CHROMIUM)
     109#if PLATFORM(CHROMIUM) || PLATFORM(BLACKBERRY)
    110110    request.setTargetType(ResourceRequest::TargetIsSubresource);
    111111#endif
  • trunk/Source/WebCore/platform/network/blackberry/ResourceRequest.h

    r102303 r106655  
    3232class ResourceRequest : public ResourceRequestBase {
    3333public:
     34    // The type of this ResourceRequest, based on how the resource will be used.
     35    enum TargetType {
     36        TargetIsMainFrame,
     37        TargetIsSubframe,
     38        TargetIsSubresource, // Resource is a generic subresource. (Generally a specific type should be specified)
     39        TargetIsStyleSheet,
     40        TargetIsScript,
     41        TargetIsFontResource,
     42        TargetIsImage,
     43        TargetIsObject,
     44        TargetIsMedia,
     45        TargetIsWorker,
     46        TargetIsSharedWorker,
     47        TargetIsPrefetch,
     48        TargetIsPrerender,
     49        TargetIsFavicon,
     50        TargetIsXHR,
     51        TargetIsTextTrack,
     52        TargetIsUnspecified,
     53    };
    3454    ResourceRequest(const String& url)
    3555        : ResourceRequestBase(KURL(ParsedURLString, url), UseProtocolCachePolicy)
     
    95115    bool forceDownload() const { return m_forceDownload; }
    96116
     117    // What this request is for.
     118    TargetType targetType() const { return m_targetType; }
     119    void setTargetType(TargetType type) { m_targetType = type; }
     120
    97121private:
    98122    friend class ResourceRequestBase;
     
    105129    bool m_isRequestedByPlugin;
    106130    bool m_forceDownload;
     131    TargetType m_targetType;
    107132
    108133    void doUpdatePlatformRequest() { }
  • trunk/Source/WebCore/xml/XMLHttpRequest.cpp

    r106654 r106655  
    671671    ResourceRequest request(m_url);
    672672    request.setHTTPMethod(m_method);
    673 #if PLATFORM(CHROMIUM)
     673#if PLATFORM(CHROMIUM) || PLATFORM(BLACKBERRY)
    674674    request.setTargetType(ResourceRequest::TargetIsXHR);
    675675#endif
Note: See TracChangeset for help on using the changeset viewer.