Changeset 147730 in webkit
- Timestamp:
- Apr 5, 2013 2:12:07 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 deleted
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r147721 r147730 1 2013-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 1 55 2013-04-05 Ryosuke Niwa <rniwa@webkit.org> 2 56 -
trunk/Source/WebCore/loader/DocumentLoader.cpp
r147530 r147730 568 568 // The memory cache doesn't understand the application cache or its caching rules. So if a main resource is served 569 569 // 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) 578 571 memoryCache()->remove(m_mainResource.get()); 579 572 -
trunk/Source/WebCore/loader/DocumentThreadableLoader.h
r144565 r147730 83 83 virtual void redirectReceived(CachedResource*, ResourceRequest&, const ResourceResponse&); 84 84 virtual void notifyFinished(CachedResource*); 85 #if PLATFORM(CHROMIUM)86 virtual void dataDownloaded(CachedResource*, int);87 #endif88 85 89 86 void didReceiveResponse(unsigned long identifier, const ResourceResponse&); -
trunk/Source/WebCore/loader/FrameLoader.cpp
r147260 r147730 233 233 , m_shouldCallCheckLoadComplete(false) 234 234 , m_opener(0) 235 #if PLATFORM(CHROMIUM)236 , m_didAccessInitialDocument(false)237 , m_didAccessInitialDocumentTimer(this, &FrameLoader::didAccessInitialDocumentTimerFired)238 #endif239 235 , m_didPerformFirstNavigation(false) 240 236 , m_loadingFromCachedPage(false) … … 885 881 mimeType = mimeTypeFromURL(url); 886 882 887 #if !PLATFORM(MAC) && !PLATFORM( CHROMIUM) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does Chromium or EFL883 #if !PLATFORM(MAC) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does Chromium or EFL 888 884 if (mimeType.isEmpty()) { 889 885 String decodedPath = decodeURLEscapeSequences(url.path()); … … 895 891 return ObjectContentFrame; // Go ahead and hope that we can display the content. 896 892 897 #if !PLATFORM(MAC) && !PLATFORM( CHROMIUM) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does Chromium or EFL893 #if !PLATFORM(MAC) && !PLATFORM(EFL) // Mac has no PluginDatabase, nor does Chromium or EFL 898 894 bool plugInSupportsMIMEType = PluginDatabase::installedPlugins()->isMIMETypeRegistered(mimeType); 899 895 #else … … 1581 1577 return m_documentLoader.get(); 1582 1578 } 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 #endif1600 1579 1601 1580 bool FrameLoader::isLoading() const -
trunk/Source/WebCore/loader/FrameLoader.h
r147260 r147730 138 138 void clear(Document* newDocument, bool clearWindowProperties = true, bool clearScriptObjects = true, bool clearFrameView = true); 139 139 140 #if PLATFORM(CHROMIUM)141 void didAccessInitialDocument();142 void didAccessInitialDocumentTimerFired(Timer<FrameLoader>*);143 #endif144 145 140 bool isLoading() const; 146 141 bool frameHasLoaded() const; … … 438 433 HashSet<Frame*> m_openedFrames; 439 434 440 #if PLATFORM(CHROMIUM)441 bool m_didAccessInitialDocument;442 Timer<FrameLoader> m_didAccessInitialDocumentTimer;443 #endif444 435 bool m_didPerformFirstNavigation; 445 436 bool m_loadingFromCachedPage; -
trunk/Source/WebCore/loader/FrameLoaderClient.h
r145914 r147730 210 210 virtual void updateGlobalHistoryItemForPage() { } 211 211 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 spoof215 // is now possible.216 virtual void didAccessInitialDocument() { }217 #endif218 219 212 // This frame has set its opener to null, disowning it for the lifetime of the frame. 220 213 // See http://html.spec.whatwg.org/#dom-opener. -
trunk/Source/WebCore/loader/PingLoader.cpp
r144568 r147730 60 60 61 61 ResourceRequest request(url); 62 #if PLATFORM( CHROMIUM) || PLATFORM(BLACKBERRY)62 #if PLATFORM(BLACKBERRY) 63 63 request.setTargetType(ResourceRequest::TargetIsImage); 64 64 #endif … … 79 79 { 80 80 ResourceRequest request(pingURL); 81 #if PLATFORM( CHROMIUM) || PLATFORM(BLACKBERRY)81 #if PLATFORM(BLACKBERRY) 82 82 request.setTargetType(ResourceRequest::TargetIsSubresource); 83 83 #endif … … 110 110 { 111 111 ResourceRequest request(reportURL); 112 #if PLATFORM( CHROMIUM) || PLATFORM(BLACKBERRY)112 #if PLATFORM(BLACKBERRY) 113 113 request.setTargetType(ResourceRequest::TargetIsSubresource); 114 114 #endif -
trunk/Source/WebCore/loader/ResourceLoadScheduler.cpp
r141635 r147730 43 43 #include <wtf/text/CString.h> 44 44 45 #if PLATFORM(CHROMIUM)46 #define REQUEST_MANAGEMENT_ENABLED 047 #else48 #define REQUEST_MANAGEMENT_ENABLED 149 #endif50 51 45 namespace WebCore { 52 46 53 #if REQUEST_MANAGEMENT_ENABLED54 47 static const unsigned maxRequestsInFlightForNonHTTPProtocols = 20; 55 48 // Match the parallel connection count used by the networking layer. 56 49 static unsigned maxRequestsInFlightPerHost; 57 #else58 static const unsigned maxRequestsInFlightForNonHTTPProtocols = 10000;59 static const unsigned maxRequestsInFlightPerHost = 10000;60 #endif61 50 62 51 ResourceLoadScheduler::HostInformation* ResourceLoadScheduler::hostForURL(const KURL& url, CreateHostPolicy createHostPolicy) … … 108 97 , m_isSerialLoadingEnabled(false) 109 98 { 110 #if REQUEST_MANAGEMENT_ENABLED111 99 maxRequestsInFlightPerHost = initializeMaximumHTTPConnectionCountPerHost(); 112 #endif113 100 } 114 101 … … 137 124 ASSERT(resourceLoader); 138 125 ASSERT(priority != ResourceLoadPriorityUnresolved); 139 #if !REQUEST_MANAGEMENT_ENABLED140 priority = ResourceLoadPriorityHighest;141 #endif142 126 143 127 LOG(ResourceLoading, "ResourceLoadScheduler::load resource %p '%s'", resourceLoader, resourceLoader->url().string().latin1().data()); -
trunk/Source/WebCore/loader/ResourceLoader.h
r145820 r147730 134 134 virtual bool shouldCacheResponse(ResourceHandle*, CFCachedURLResponseRef) OVERRIDE; 135 135 #endif 136 #if PLATFORM(CHROMIUM)137 virtual void didDownloadData(ResourceHandle*, int);138 virtual void didDownloadData(int);139 #endif140 136 141 137 const KURL& url() const { return m_request.url(); } -
trunk/Source/WebCore/loader/SubresourceLoader.h
r145820 r147730 73 73 virtual void didReceiveDataArray(CFArrayRef) OVERRIDE; 74 74 #endif 75 #if PLATFORM(CHROMIUM)76 virtual void didDownloadData(int) OVERRIDE;77 #endif78 75 virtual void releaseResources() OVERRIDE; 79 76 -
trunk/Source/WebCore/loader/ThreadableLoaderClient.h
r138083 r147730 53 53 virtual bool isDocumentThreadableLoaderClient() { return false; } 54 54 55 #if PLATFORM(CHROMIUM)56 virtual void didDownloadData(int /*dataLength*/) { }57 #endif58 59 55 protected: 60 56 ThreadableLoaderClient() { } -
trunk/Source/WebCore/loader/ThreadableLoaderClientWrapper.h
r138083 r147730 115 115 } 116 116 117 #if PLATFORM(CHROMIUM)118 void didDownloadData(int dataLength)119 {120 if (m_client)121 m_client->didDownloadData(dataLength);122 }123 #endif124 125 117 protected: 126 118 explicit ThreadableLoaderClientWrapper(ThreadableLoaderClient* client) -
trunk/Source/WebCore/loader/appcache/ApplicationCacheHost.h
r110564 r147730 48 48 class ResourceResponse; 49 49 class SubstituteData; 50 #if PLATFORM(CHROMIUM)51 class ApplicationCacheHostInternal;52 #else53 50 class ApplicationCache; 54 51 class ApplicationCacheGroup; 55 52 class ApplicationCacheResource; 56 53 class ApplicationCacheStorage; 57 #endif58 54 59 55 class ApplicationCacheHost { … … 156 152 #endif 157 153 158 #if !PLATFORM(CHROMIUM)159 154 bool shouldLoadResourceFromApplicationCache(const ResourceRequest&, ApplicationCacheResource*&); 160 155 bool getApplicationCacheFallbackResource(const ResourceRequest&, ApplicationCacheResource*&, ApplicationCache* = 0); 161 #endif162 156 163 157 private: … … 179 173 void dispatchDOMEvent(EventID, int progressTotal, int progressDone); 180 174 181 #if PLATFORM(CHROMIUM)182 friend class ApplicationCacheHostInternal;183 OwnPtr<ApplicationCacheHostInternal> m_internal;184 #else185 175 friend class ApplicationCacheGroup; 186 176 friend class ApplicationCacheStorage; … … 203 193 // This is the application cache the main resource was loaded from (if any). 204 194 RefPtr<ApplicationCache> m_mainResourceApplicationCache; 205 #endif206 195 }; 207 196 -
trunk/Source/WebCore/loader/cache/CachedRawResource.h
r146626 r147730 63 63 virtual void responseReceived(const ResourceResponse&); 64 64 virtual void didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent); 65 #if PLATFORM(CHROMIUM)66 virtual void didDownloadData(int);67 #endif68 65 69 66 virtual void switchClientsToRevalidatedResource() OVERRIDE; … … 97 94 virtual void dataReceived(CachedResource*, const char* /* data */, int /* length */) { } 98 95 virtual void redirectReceived(CachedResource*, ResourceRequest&, const ResourceResponse&) { } 99 #if PLATFORM(CHROMIUM)100 virtual void dataDownloaded(CachedResource*, int) { }101 #endif102 96 }; 103 97 -
trunk/Source/WebCore/loader/cache/CachedResource.cpp
r147267 r147730 153 153 } 154 154 155 #if PLATFORM( CHROMIUM) || PLATFORM(BLACKBERRY)155 #if PLATFORM(BLACKBERRY) 156 156 static ResourceRequest::TargetType cachedResourceTypeToTargetType(CachedResource::Type type) 157 157 { … … 312 312 m_loading = true; 313 313 314 #if PLATFORM( CHROMIUM) || PLATFORM(BLACKBERRY)314 #if PLATFORM(BLACKBERRY) 315 315 if (m_resourceRequest.targetType() == ResourceRequest::TargetIsUnspecified) 316 316 m_resourceRequest.setTargetType(cachedResourceTypeToTargetType(type())); -
trunk/Source/WebCore/loader/cache/CachedResource.h
r146544 r147730 254 254 255 255 virtual void didSendData(unsigned long long /* bytesSent */, unsigned long long /* totalBytesToBeSent */) { } 256 #if PLATFORM(CHROMIUM)257 virtual void didDownloadData(int) { }258 #endif259 256 260 257 void setLoadFinishTime(double finishTime) { m_loadFinishTime = finishTime; } -
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp
r147387 r147730 491 491 } 492 492 493 #if PLATFORM(CHROMIUM)494 // FIXME: Temporarily leave main resource caching disabled for chromium, see https://bugs.webkit.org/show_bug.cgi?id=107962495 // 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 #endif504 505 493 if (!request.resourceRequest().url().protocolIsData()) 506 494 m_validatedURLs.add(request.resourceRequest().url()); … … 845 833 { 846 834 bool delaySubresourceLoad = true; 847 #if PLATFORM(IOS) || PLATFORM(CHROMIUM)835 #if PLATFORM(IOS) 848 836 delaySubresourceLoad = false; 849 #endif850 #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);854 837 #endif 855 838 if (delaySubresourceLoad) {
Note: See TracChangeset
for help on using the changeset viewer.