Changeset 147730 in webkit


Ignore:
Timestamp:
Apr 5, 2013 2:12:07 AM (11 years ago)
Author:
rniwa@webkit.org
Message:

Remove Chromium code from WebCore/loader
https://bugs.webkit.org/show_bug.cgi?id=114011

Reviewed by Benjamin Poulain.

Removed.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::responseReceived):

  • loader/DocumentThreadableLoader.h:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::FrameLoader):
(WebCore::FrameLoader::defaultObjectContentType):
(WebCore):

  • loader/FrameLoader.h:

(FrameLoader):

  • loader/FrameLoaderClient.h:

(FrameLoaderClient):

  • loader/PingLoader.cpp:

(WebCore::PingLoader::loadImage):
(WebCore::PingLoader::sendPing):
(WebCore::PingLoader::sendViolationReport):

  • loader/ResourceLoadScheduler.cpp:

(WebCore):
(WebCore::ResourceLoadScheduler::ResourceLoadScheduler):
(WebCore::ResourceLoadScheduler::scheduleLoad):

  • loader/ResourceLoader.h:
  • loader/SubresourceLoader.h:
  • loader/ThreadableLoaderClient.h:

(ThreadableLoaderClient):

  • loader/ThreadableLoaderClientWrapper.h:

(ThreadableLoaderClientWrapper):

  • loader/appcache/ApplicationCacheHost.h:

(WebCore):
(ApplicationCacheHost):

  • loader/cache/CachedRawResource.h:

(CachedRawResource):
(WebCore::CachedRawResourceClient::redirectReceived):

  • loader/cache/CachedResource.cpp:

(WebCore):
(WebCore::CachedResource::load):

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::didSendData):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::preload):

  • loader/chromium: Removed.
  • loader/chromium/CachedRawResourceChromium.cpp: Removed.
  • loader/chromium/DocumentThreadableLoaderChromium.cpp: Removed.
  • loader/chromium/ResourceLoaderChromium.cpp: Removed.
  • loader/chromium/SubresourceLoaderChromium.cpp: Removed.
Location:
trunk/Source/WebCore
Files:
4 deleted
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r147721 r147730  
     12013-04-05  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Remove Chromium code from WebCore/loader
     4        https://bugs.webkit.org/show_bug.cgi?id=114011
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        Removed.
     9
     10        * loader/DocumentLoader.cpp:
     11        (WebCore::DocumentLoader::responseReceived):
     12        * loader/DocumentThreadableLoader.h:
     13        * loader/FrameLoader.cpp:
     14        (WebCore::FrameLoader::FrameLoader):
     15        (WebCore::FrameLoader::defaultObjectContentType):
     16        (WebCore):
     17        * loader/FrameLoader.h:
     18        (FrameLoader):
     19        * loader/FrameLoaderClient.h:
     20        (FrameLoaderClient):
     21        * loader/PingLoader.cpp:
     22        (WebCore::PingLoader::loadImage):
     23        (WebCore::PingLoader::sendPing):
     24        (WebCore::PingLoader::sendViolationReport):
     25        * loader/ResourceLoadScheduler.cpp:
     26        (WebCore):
     27        (WebCore::ResourceLoadScheduler::ResourceLoadScheduler):
     28        (WebCore::ResourceLoadScheduler::scheduleLoad):
     29        * loader/ResourceLoader.h:
     30        * loader/SubresourceLoader.h:
     31        * loader/ThreadableLoaderClient.h:
     32        (ThreadableLoaderClient):
     33        * loader/ThreadableLoaderClientWrapper.h:
     34        (ThreadableLoaderClientWrapper):
     35        * loader/appcache/ApplicationCacheHost.h:
     36        (WebCore):
     37        (ApplicationCacheHost):
     38        * loader/cache/CachedRawResource.h:
     39        (CachedRawResource):
     40        (WebCore::CachedRawResourceClient::redirectReceived):
     41        * loader/cache/CachedResource.cpp:
     42        (WebCore):
     43        (WebCore::CachedResource::load):
     44        * loader/cache/CachedResource.h:
     45        (WebCore::CachedResource::didSendData):
     46        * loader/cache/CachedResourceLoader.cpp:
     47        (WebCore::CachedResourceLoader::requestResource):
     48        (WebCore::CachedResourceLoader::preload):
     49        * loader/chromium: Removed.
     50        * loader/chromium/CachedRawResourceChromium.cpp: Removed.
     51        * loader/chromium/DocumentThreadableLoaderChromium.cpp: Removed.
     52        * loader/chromium/ResourceLoaderChromium.cpp: Removed.
     53        * loader/chromium/SubresourceLoaderChromium.cpp: Removed.
     54
    1552013-04-05  Ryosuke Niwa  <rniwa@webkit.org>
    256
  • trunk/Source/WebCore/loader/DocumentLoader.cpp

    r147530 r147730  
    568568    // The memory cache doesn't understand the application cache or its caching rules. So if a main resource is served
    569569    // from the application cache, ensure we don't save the result for future use.
    570     bool shouldRemoveResourceFromCache = willLoadFallback;
    571 #if PLATFORM(CHROMIUM)
    572     // chromium's ApplicationCacheHost implementation always returns true for maybeLoadFallbackForMainResponse(). However, all responses loaded
    573     // from appcache will have a non-zero appCacheID().
    574     if (response.appCacheID())
    575         shouldRemoveResourceFromCache = true;
    576 #endif
    577     if (shouldRemoveResourceFromCache)
     570    if (willLoadFallback)
    578571        memoryCache()->remove(m_mainResource.get());
    579572
  • trunk/Source/WebCore/loader/DocumentThreadableLoader.h

    r144565 r147730  
    8383        virtual void redirectReceived(CachedResource*, ResourceRequest&, const ResourceResponse&);
    8484        virtual void notifyFinished(CachedResource*);
    85 #if PLATFORM(CHROMIUM)
    86         virtual void dataDownloaded(CachedResource*, int);
    87 #endif
    8885
    8986        void didReceiveResponse(unsigned long identifier, const ResourceResponse&);
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r147260 r147730  
    233233    , m_shouldCallCheckLoadComplete(false)
    234234    , m_opener(0)
    235 #if PLATFORM(CHROMIUM)
    236     , m_didAccessInitialDocument(false)
    237     , m_didAccessInitialDocumentTimer(this, &FrameLoader::didAccessInitialDocumentTimerFired)
    238 #endif
    239235    , m_didPerformFirstNavigation(false)
    240236    , m_loadingFromCachedPage(false)
     
    885881        mimeType = mimeTypeFromURL(url);
    886882
    887 #if !PLATFORM(MAC) && !PLATFORM(CHROMIUM) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does Chromium or EFL
     883#if !PLATFORM(MAC) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does Chromium or EFL
    888884    if (mimeType.isEmpty()) {
    889885        String decodedPath = decodeURLEscapeSequences(url.path());
     
    895891        return ObjectContentFrame; // Go ahead and hope that we can display the content.
    896892
    897 #if !PLATFORM(MAC) && !PLATFORM(CHROMIUM) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does Chromium or EFL
     893#if !PLATFORM(MAC) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does Chromium or EFL
    898894    bool plugInSupportsMIMEType = PluginDatabase::installedPlugins()->isMIMETypeRegistered(mimeType);
    899895#else
     
    15811577    return m_documentLoader.get();
    15821578}
    1583 
    1584 #if PLATFORM(CHROMIUM)
    1585 void FrameLoader::didAccessInitialDocument()
    1586 {
    1587     // We only need to notify the client once, and only for the main frame.
    1588     if (isLoadingMainFrame() && !m_didAccessInitialDocument) {
    1589         m_didAccessInitialDocument = true;
    1590         // Notify asynchronously, since this is called within a JavaScript security check.
    1591         m_didAccessInitialDocumentTimer.startOneShot(0);
    1592     }
    1593 }
    1594 
    1595 void FrameLoader::didAccessInitialDocumentTimerFired(Timer<FrameLoader>*)
    1596 {
    1597     m_client->didAccessInitialDocument();
    1598 }
    1599 #endif
    16001579
    16011580bool FrameLoader::isLoading() const
  • trunk/Source/WebCore/loader/FrameLoader.h

    r147260 r147730  
    138138    void clear(Document* newDocument, bool clearWindowProperties = true, bool clearScriptObjects = true, bool clearFrameView = true);
    139139
    140 #if PLATFORM(CHROMIUM)
    141     void didAccessInitialDocument();
    142     void didAccessInitialDocumentTimerFired(Timer<FrameLoader>*);
    143 #endif
    144 
    145140    bool isLoading() const;
    146141    bool frameHasLoaded() const;
     
    438433    HashSet<Frame*> m_openedFrames;
    439434
    440 #if PLATFORM(CHROMIUM)
    441     bool m_didAccessInitialDocument;
    442     Timer<FrameLoader> m_didAccessInitialDocumentTimer;
    443 #endif
    444435    bool m_didPerformFirstNavigation;
    445436    bool m_loadingFromCachedPage;
  • trunk/Source/WebCore/loader/FrameLoaderClient.h

    r145914 r147730  
    210210        virtual void updateGlobalHistoryItemForPage() { }
    211211
    212 #if PLATFORM(CHROMIUM)
    213         // Another page has accessed the initial empty document of this frame.
    214         // It is no longer safe to display a provisional URL, since a URL spoof
    215         // is now possible.
    216         virtual void didAccessInitialDocument() { }
    217 #endif
    218 
    219212        // This frame has set its opener to null, disowning it for the lifetime of the frame.
    220213        // See http://html.spec.whatwg.org/#dom-opener.
  • trunk/Source/WebCore/loader/PingLoader.cpp

    r144568 r147730  
    6060
    6161    ResourceRequest request(url);
    62 #if PLATFORM(CHROMIUM) || PLATFORM(BLACKBERRY)
     62#if PLATFORM(BLACKBERRY)
    6363    request.setTargetType(ResourceRequest::TargetIsImage);
    6464#endif
     
    7979{
    8080    ResourceRequest request(pingURL);
    81 #if PLATFORM(CHROMIUM) || PLATFORM(BLACKBERRY)
     81#if PLATFORM(BLACKBERRY)
    8282    request.setTargetType(ResourceRequest::TargetIsSubresource);
    8383#endif
     
    110110{
    111111    ResourceRequest request(reportURL);
    112 #if PLATFORM(CHROMIUM) || PLATFORM(BLACKBERRY)
     112#if PLATFORM(BLACKBERRY)
    113113    request.setTargetType(ResourceRequest::TargetIsSubresource);
    114114#endif
  • trunk/Source/WebCore/loader/ResourceLoadScheduler.cpp

    r141635 r147730  
    4343#include <wtf/text/CString.h>
    4444
    45 #if PLATFORM(CHROMIUM)
    46 #define REQUEST_MANAGEMENT_ENABLED 0
    47 #else
    48 #define REQUEST_MANAGEMENT_ENABLED 1
    49 #endif
    50 
    5145namespace WebCore {
    5246
    53 #if REQUEST_MANAGEMENT_ENABLED
    5447static const unsigned maxRequestsInFlightForNonHTTPProtocols = 20;
    5548// Match the parallel connection count used by the networking layer.
    5649static unsigned maxRequestsInFlightPerHost;
    57 #else
    58 static const unsigned maxRequestsInFlightForNonHTTPProtocols = 10000;
    59 static const unsigned maxRequestsInFlightPerHost = 10000;
    60 #endif
    6150
    6251ResourceLoadScheduler::HostInformation* ResourceLoadScheduler::hostForURL(const KURL& url, CreateHostPolicy createHostPolicy)
     
    10897    , m_isSerialLoadingEnabled(false)
    10998{
    110 #if REQUEST_MANAGEMENT_ENABLED
    11199    maxRequestsInFlightPerHost = initializeMaximumHTTPConnectionCountPerHost();
    112 #endif
    113100}
    114101
     
    137124    ASSERT(resourceLoader);
    138125    ASSERT(priority != ResourceLoadPriorityUnresolved);
    139 #if !REQUEST_MANAGEMENT_ENABLED
    140     priority = ResourceLoadPriorityHighest;
    141 #endif
    142126
    143127    LOG(ResourceLoading, "ResourceLoadScheduler::load resource %p '%s'", resourceLoader, resourceLoader->url().string().latin1().data());
  • trunk/Source/WebCore/loader/ResourceLoader.h

    r145820 r147730  
    134134    virtual bool shouldCacheResponse(ResourceHandle*, CFCachedURLResponseRef) OVERRIDE;
    135135#endif
    136 #if PLATFORM(CHROMIUM)
    137     virtual void didDownloadData(ResourceHandle*, int);
    138     virtual void didDownloadData(int);
    139 #endif
    140136
    141137    const KURL& url() const { return m_request.url(); }
  • trunk/Source/WebCore/loader/SubresourceLoader.h

    r145820 r147730  
    7373    virtual void didReceiveDataArray(CFArrayRef) OVERRIDE;
    7474#endif
    75 #if PLATFORM(CHROMIUM)
    76     virtual void didDownloadData(int) OVERRIDE;
    77 #endif
    7875    virtual void releaseResources() OVERRIDE;
    7976
  • trunk/Source/WebCore/loader/ThreadableLoaderClient.h

    r138083 r147730  
    5353        virtual bool isDocumentThreadableLoaderClient() { return false; }
    5454
    55 #if PLATFORM(CHROMIUM)
    56         virtual void didDownloadData(int /*dataLength*/) { }
    57 #endif
    58 
    5955    protected:
    6056        ThreadableLoaderClient() { }
  • trunk/Source/WebCore/loader/ThreadableLoaderClientWrapper.h

    r138083 r147730  
    115115    }
    116116
    117 #if PLATFORM(CHROMIUM)
    118     void didDownloadData(int dataLength)
    119     {
    120         if (m_client)
    121             m_client->didDownloadData(dataLength);
    122     }
    123 #endif
    124 
    125117protected:
    126118    explicit ThreadableLoaderClientWrapper(ThreadableLoaderClient* client)
  • trunk/Source/WebCore/loader/appcache/ApplicationCacheHost.h

    r110564 r147730  
    4848    class ResourceResponse;
    4949    class SubstituteData;
    50 #if PLATFORM(CHROMIUM)
    51     class ApplicationCacheHostInternal;
    52 #else
    5350    class ApplicationCache;
    5451    class ApplicationCacheGroup;
    5552    class ApplicationCacheResource;
    5653    class ApplicationCacheStorage;
    57 #endif
    5854
    5955    class ApplicationCacheHost {
     
    156152#endif
    157153
    158 #if !PLATFORM(CHROMIUM)
    159154        bool shouldLoadResourceFromApplicationCache(const ResourceRequest&, ApplicationCacheResource*&);
    160155        bool getApplicationCacheFallbackResource(const ResourceRequest&, ApplicationCacheResource*&, ApplicationCache* = 0);
    161 #endif
    162156
    163157    private:
     
    179173        void dispatchDOMEvent(EventID, int progressTotal, int progressDone);
    180174
    181 #if PLATFORM(CHROMIUM)
    182         friend class ApplicationCacheHostInternal;
    183         OwnPtr<ApplicationCacheHostInternal> m_internal;
    184 #else
    185175        friend class ApplicationCacheGroup;
    186176        friend class ApplicationCacheStorage;
     
    203193        // This is the application cache the main resource was loaded from (if any).
    204194        RefPtr<ApplicationCache> m_mainResourceApplicationCache;
    205 #endif
    206195    };
    207196
  • trunk/Source/WebCore/loader/cache/CachedRawResource.h

    r146626 r147730  
    6363    virtual void responseReceived(const ResourceResponse&);
    6464    virtual void didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent);
    65 #if PLATFORM(CHROMIUM)
    66     virtual void didDownloadData(int);
    67 #endif
    6865
    6966    virtual void switchClientsToRevalidatedResource() OVERRIDE;
     
    9794    virtual void dataReceived(CachedResource*, const char* /* data */, int /* length */) { }
    9895    virtual void redirectReceived(CachedResource*, ResourceRequest&, const ResourceResponse&) { }
    99 #if PLATFORM(CHROMIUM)
    100     virtual void dataDownloaded(CachedResource*, int) { }
    101 #endif
    10296};
    10397
  • trunk/Source/WebCore/loader/cache/CachedResource.cpp

    r147267 r147730  
    153153}
    154154
    155 #if PLATFORM(CHROMIUM) || PLATFORM(BLACKBERRY)
     155#if PLATFORM(BLACKBERRY)
    156156static ResourceRequest::TargetType cachedResourceTypeToTargetType(CachedResource::Type type)
    157157{
     
    312312    m_loading = true;
    313313
    314 #if PLATFORM(CHROMIUM) || PLATFORM(BLACKBERRY)
     314#if PLATFORM(BLACKBERRY)
    315315    if (m_resourceRequest.targetType() == ResourceRequest::TargetIsUnspecified)
    316316        m_resourceRequest.setTargetType(cachedResourceTypeToTargetType(type()));
  • trunk/Source/WebCore/loader/cache/CachedResource.h

    r146544 r147730  
    254254   
    255255    virtual void didSendData(unsigned long long /* bytesSent */, unsigned long long /* totalBytesToBeSent */) { }
    256 #if PLATFORM(CHROMIUM)
    257     virtual void didDownloadData(int) { }
    258 #endif
    259256
    260257    void setLoadFinishTime(double finishTime) { m_loadFinishTime = finishTime; }
  • trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp

    r147387 r147730  
    491491    }
    492492
    493 #if PLATFORM(CHROMIUM)
    494     // FIXME: Temporarily leave main resource caching disabled for chromium, see https://bugs.webkit.org/show_bug.cgi?id=107962
    495     // Ensure main resources aren't preloaded, and other main resource loads are removed from cache to prevent reuse.
    496     if (type == CachedResource::MainResource) {
    497         ASSERT(policy != Use);
    498         ASSERT(policy != Revalidate);
    499         memoryCache()->remove(resource.get());
    500         if (request.forPreload())
    501             return 0;
    502     }
    503 #endif
    504 
    505493    if (!request.resourceRequest().url().protocolIsData())
    506494        m_validatedURLs.add(request.resourceRequest().url());
     
    845833{
    846834    bool delaySubresourceLoad = true;
    847 #if PLATFORM(IOS) || PLATFORM(CHROMIUM)
     835#if PLATFORM(IOS)
    848836    delaySubresourceLoad = false;
    849 #endif
    850 #if PLATFORM(CHROMIUM)
    851     // FIXME: All ports should take advantage of this, but first must support ResourceHandle::didChangePriority().
    852     if (type == CachedResource::ImageResource)
    853         request.setPriority(ResourceLoadPriorityVeryLow);
    854837#endif
    855838    if (delaySubresourceLoad) {
Note: See TracChangeset for help on using the changeset viewer.