Title: [138285] trunk/Source
Revision
138285
Author
[email protected]
Date
2012-12-20 12:26:43 -0800 (Thu, 20 Dec 2012)

Log Message

Rename shouldBufferData to dataBufferingPolicy
https://bugs.webkit.org/show_bug.cgi?id=105450

Reviewed by Alexey Proskuryakov.

No new tests, simple rename.

Source/WebCore:

* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::appendBytes):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didReceiveData):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadRequest):
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::setDataBufferingPolicy):
* loader/MainResourceLoader.h:
(MainResourceLoader):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::setDataBufferingPolicy):
(WebCore::ResourceLoader::addData):
(WebCore::ResourceLoader::willStopBufferingData):
* loader/ResourceLoader.h:
(ResourceLoader):
* loader/ResourceLoaderOptions.h:
(WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
(ResourceLoaderOptions):
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::data):
(WebCore::CachedRawResource::setDataBufferingPolicy):
(WebCore::CachedRawResource::canReuse):
* loader/cache/CachedRawResource.h:
(CachedRawResource):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::dataBufferingPolicy):
* loader/mac/ResourceLoaderMac.mm:
(WebCore::ResourceLoader::didReceiveDataArray):
* page/EventSource.cpp:
(WebCore::EventSource::connect):

Source/WebKit/chromium:

* src/AssociatedURLLoader.cpp:
(WebKit::AssociatedURLLoader::loadAsynchronously):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (138284 => 138285)


--- trunk/Source/WebCore/ChangeLog	2012-12-20 20:20:34 UTC (rev 138284)
+++ trunk/Source/WebCore/ChangeLog	2012-12-20 20:26:43 UTC (rev 138285)
@@ -1,3 +1,46 @@
+2012-12-20  Nate Chapin  <[email protected]>
+
+        Rename shouldBufferData to dataBufferingPolicy
+        https://bugs.webkit.org/show_bug.cgi?id=105450
+
+        Reviewed by Alexey Proskuryakov.
+
+        No new tests, simple rename.
+
+        * html/MediaDocument.cpp:
+        (WebCore::MediaDocumentParser::createDocumentStructure):
+        * html/PluginDocument.cpp:
+        (WebCore::PluginDocumentParser::appendBytes):
+        * inspector/InspectorResourceAgent.cpp:
+        (WebCore::InspectorResourceAgent::didReceiveData):
+        * loader/DocumentThreadableLoader.cpp:
+        (WebCore::DocumentThreadableLoader::loadRequest):
+        * loader/MainResourceLoader.cpp:
+        (WebCore::MainResourceLoader::setDataBufferingPolicy):
+        * loader/MainResourceLoader.h:
+        (MainResourceLoader):
+        * loader/ResourceLoader.cpp:
+        (WebCore::ResourceLoader::setDataBufferingPolicy):
+        (WebCore::ResourceLoader::addData):
+        (WebCore::ResourceLoader::willStopBufferingData):
+        * loader/ResourceLoader.h:
+        (ResourceLoader):
+        * loader/ResourceLoaderOptions.h:
+        (WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
+        (ResourceLoaderOptions):
+        * loader/cache/CachedRawResource.cpp:
+        (WebCore::CachedRawResource::data):
+        (WebCore::CachedRawResource::setDataBufferingPolicy):
+        (WebCore::CachedRawResource::canReuse):
+        * loader/cache/CachedRawResource.h:
+        (CachedRawResource):
+        * loader/cache/CachedResource.h:
+        (WebCore::CachedResource::dataBufferingPolicy):
+        * loader/mac/ResourceLoaderMac.mm:
+        (WebCore::ResourceLoader::didReceiveDataArray):
+        * page/EventSource.cpp:
+        (WebCore::EventSource::connect):
+
 2012-12-19  Dean Jackson  <[email protected]>
 
         Track menu in wrong location when fullscreen

Modified: trunk/Source/WebCore/html/MediaDocument.cpp (138284 => 138285)


--- trunk/Source/WebCore/html/MediaDocument.cpp	2012-12-20 20:20:34 UTC (rev 138284)
+++ trunk/Source/WebCore/html/MediaDocument.cpp	2012-12-20 20:26:43 UTC (rev 138285)
@@ -105,7 +105,7 @@
     if (!frame)
         return;
 
-    frame->loader()->activeDocumentLoader()->mainResourceLoader()->setShouldBufferData(DoNotBufferData);
+    frame->loader()->activeDocumentLoader()->mainResourceLoader()->setDataBufferingPolicy(DoNotBufferData);
 }
 
 void MediaDocumentParser::appendBytes(DocumentWriter*, const char*, size_t)

Modified: trunk/Source/WebCore/html/PluginDocument.cpp (138284 => 138285)


--- trunk/Source/WebCore/html/PluginDocument.cpp	2012-12-20 20:20:34 UTC (rev 138284)
+++ trunk/Source/WebCore/html/PluginDocument.cpp	2012-12-20 20:26:43 UTC (rev 138285)
@@ -130,7 +130,7 @@
             // In a plugin document, the main resource is the plugin. If we have a null widget, that means
             // the loading of the plugin was cancelled, which gives us a null mainResourceLoader(), so we
             // need to have this call in a null check of the widget or of mainResourceLoader().
-            frame->loader()->activeDocumentLoader()->mainResourceLoader()->setShouldBufferData(DoNotBufferData);
+            frame->loader()->activeDocumentLoader()->mainResourceLoader()->setDataBufferingPolicy(DoNotBufferData);
         }
     }
 }

Modified: trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp (138284 => 138285)


--- trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp	2012-12-20 20:20:34 UTC (rev 138284)
+++ trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp	2012-12-20 20:26:43 UTC (rev 138285)
@@ -291,7 +291,7 @@
 
     if (data) {
         NetworkResourcesData::ResourceData const* resourceData = m_resourcesData->data(requestId);
-        if (resourceData && !m_loadingXHRSynchronously && (!resourceData->cachedResource() || !resourceData->cachedResource()->shouldBufferData() || isErrorStatusCode(resourceData->httpStatusCode())))
+        if (resourceData && !m_loadingXHRSynchronously && (!resourceData->cachedResource() || resourceData->cachedResource()->dataBufferingPolicy() == DoNotBufferData || isErrorStatusCode(resourceData->httpStatusCode())))
             m_resourcesData->maybeAddResourceData(requestId, data, dataLength);
     }
 

Modified: trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp (138284 => 138285)


--- trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp	2012-12-20 20:20:34 UTC (rev 138284)
+++ trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp	2012-12-20 20:26:43 UTC (rev 138285)
@@ -371,7 +371,7 @@
             options.sendLoadCallbacks = DoNotSendCallbacks;
             options.sniffContent = DoNotSniffContent;
             // Keep buffering the data for the preflight request.
-            options.shouldBufferData = BufferData;
+            options.dataBufferingPolicy = BufferData;
         }
 
         CachedResourceRequest newRequest(request, options);

Modified: trunk/Source/WebCore/loader/MainResourceLoader.cpp (138284 => 138285)


--- trunk/Source/WebCore/loader/MainResourceLoader.cpp	2012-12-20 20:20:34 UTC (rev 138284)
+++ trunk/Source/WebCore/loader/MainResourceLoader.cpp	2012-12-20 20:26:43 UTC (rev 138285)
@@ -679,10 +679,10 @@
     return loader() ? loader()->defersLoading() : false;
 }
 
-void MainResourceLoader::setShouldBufferData(DataBufferingPolicy shouldBufferData)
+void MainResourceLoader::setDataBufferingPolicy(DataBufferingPolicy dataBufferingPolicy)
 {
     ASSERT(m_resource);
-    m_resource->setShouldBufferData(shouldBufferData);
+    m_resource->setDataBufferingPolicy(dataBufferingPolicy);
 }
 
 ResourceLoader* MainResourceLoader::loader() const

Modified: trunk/Source/WebCore/loader/MainResourceLoader.h (138284 => 138285)


--- trunk/Source/WebCore/loader/MainResourceLoader.h	2012-12-20 20:20:34 UTC (rev 138284)
+++ trunk/Source/WebCore/loader/MainResourceLoader.h	2012-12-20 20:26:43 UTC (rev 138285)
@@ -64,7 +64,7 @@
     PassRefPtr<ResourceBuffer> resourceData();
 
     void setDefersLoading(bool);
-    void setShouldBufferData(DataBufferingPolicy);
+    void setDataBufferingPolicy(DataBufferingPolicy);
 
 #if HAVE(RUNLOOP_TIMER)
     typedef RunLoopTimer<MainResourceLoader> MainResourceLoaderTimer;

Modified: trunk/Source/WebCore/loader/ResourceLoader.cpp (138284 => 138285)


--- trunk/Source/WebCore/loader/ResourceLoader.cpp	2012-12-20 20:20:34 UTC (rev 138284)
+++ trunk/Source/WebCore/loader/ResourceLoader.cpp	2012-12-20 20:26:43 UTC (rev 138285)
@@ -189,19 +189,19 @@
     return m_frame->loader();
 }
 
-void ResourceLoader::setShouldBufferData(DataBufferingPolicy shouldBufferData)
+void ResourceLoader::setDataBufferingPolicy(DataBufferingPolicy dataBufferingPolicy)
 { 
-    m_options.shouldBufferData = shouldBufferData; 
+    m_options.dataBufferingPolicy = dataBufferingPolicy; 
 
     // Reset any already buffered data
-    if (shouldBufferData == DoNotBufferData)
+    if (dataBufferingPolicy == DoNotBufferData)
         m_resourceData = 0;
 }
     
 
 void ResourceLoader::addData(const char* data, int length, bool allAtOnce)
 {
-    if (m_options.shouldBufferData == DoNotBufferData)
+    if (m_options.dataBufferingPolicy == DoNotBufferData)
         return;
 
     if (allAtOnce) {
@@ -299,7 +299,7 @@
 
 void ResourceLoader::willStopBufferingData(const char* data, int length)
 {
-    if (m_options.shouldBufferData == DoNotBufferData)
+    if (m_options.dataBufferingPolicy == DoNotBufferData)
         return;
 
     ASSERT(!m_resourceData);

Modified: trunk/Source/WebCore/loader/ResourceLoader.h (138284 => 138285)


--- trunk/Source/WebCore/loader/ResourceLoader.h	2012-12-20 20:20:34 UTC (rev 138284)
+++ trunk/Source/WebCore/loader/ResourceLoader.h	2012-12-20 20:26:43 UTC (rev 138285)
@@ -146,7 +146,7 @@
 
     const ResourceRequest& request() const { return m_request; }
 
-    void setShouldBufferData(DataBufferingPolicy);
+    void setDataBufferingPolicy(DataBufferingPolicy);
 
     virtual void reportMemoryUsage(MemoryObjectInfo*) const;
 

Modified: trunk/Source/WebCore/loader/ResourceLoaderOptions.h (138284 => 138285)


--- trunk/Source/WebCore/loader/ResourceLoaderOptions.h	2012-12-20 20:20:34 UTC (rev 138284)
+++ trunk/Source/WebCore/loader/ResourceLoaderOptions.h	2012-12-20 20:26:43 UTC (rev 138285)
@@ -61,11 +61,11 @@
 };
 
 struct ResourceLoaderOptions {
-    ResourceLoaderOptions() : sendLoadCallbacks(DoNotSendCallbacks), sniffContent(DoNotSniffContent), shouldBufferData(BufferData), allowCredentials(DoNotAllowStoredCredentials), crossOriginCredentialPolicy(DoNotAskClientForCrossOriginCredentials), securityCheck(DoSecurityCheck) { }
-    ResourceLoaderOptions(SendCallbackPolicy sendLoadCallbacks, ContentSniffingPolicy sniffContent, DataBufferingPolicy shouldBufferData, StoredCredentials allowCredentials, ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy, SecurityCheckPolicy securityCheck)
+    ResourceLoaderOptions() : sendLoadCallbacks(DoNotSendCallbacks), sniffContent(DoNotSniffContent), dataBufferingPolicy(BufferData), allowCredentials(DoNotAllowStoredCredentials), crossOriginCredentialPolicy(DoNotAskClientForCrossOriginCredentials), securityCheck(DoSecurityCheck) { }
+    ResourceLoaderOptions(SendCallbackPolicy sendLoadCallbacks, ContentSniffingPolicy sniffContent, DataBufferingPolicy dataBufferingPolicy, StoredCredentials allowCredentials, ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy, SecurityCheckPolicy securityCheck)
         : sendLoadCallbacks(sendLoadCallbacks)
         , sniffContent(sniffContent)
-        , shouldBufferData(shouldBufferData)
+        , dataBufferingPolicy(dataBufferingPolicy)
         , allowCredentials(allowCredentials)
         , crossOriginCredentialPolicy(crossOriginCredentialPolicy)
         , securityCheck(securityCheck)
@@ -73,7 +73,7 @@
     }
     SendCallbackPolicy sendLoadCallbacks;
     ContentSniffingPolicy sniffContent;
-    DataBufferingPolicy shouldBufferData;
+    DataBufferingPolicy dataBufferingPolicy;
     StoredCredentials allowCredentials; // Whether HTTP credentials and cookies are sent with the request.
     ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy; // Whether we will ask the client for credentials (if we allow credentials at all).
     SecurityCheckPolicy securityCheck;

Modified: trunk/Source/WebCore/loader/cache/CachedRawResource.cpp (138284 => 138285)


--- trunk/Source/WebCore/loader/cache/CachedRawResource.cpp	2012-12-20 20:20:34 UTC (rev 138284)
+++ trunk/Source/WebCore/loader/cache/CachedRawResource.cpp	2012-12-20 20:26:43 UTC (rev 138285)
@@ -51,19 +51,19 @@
         // If we are buffering data, then we are saving the buffer in m_data and need to manually
         // calculate the incremental data. If we are not buffering, then m_data will be null and
         // the buffer contains only the incremental data.
-        size_t previousDataLength = (m_options.shouldBufferData == BufferData) ? encodedSize() : 0;
+        size_t previousDataLength = (m_options.dataBufferingPolicy == BufferData) ? encodedSize() : 0;
         ASSERT(data->size() >= previousDataLength);
         incrementalData = data->data() + previousDataLength;
         incrementalDataLength = data->size() - previousDataLength;
     }
 
-    if (m_options.shouldBufferData == BufferData) {
+    if (m_options.dataBufferingPolicy == BufferData) {
         if (data)
             setEncodedSize(data->size());
         m_data = data;
     }
 
-    DataBufferingPolicy dataBufferingPolicy = m_options.shouldBufferData;
+    DataBufferingPolicy dataBufferingPolicy = m_options.dataBufferingPolicy;
     if (incrementalDataLength) {
         CachedResourceClientWalker<CachedRawResourceClient> w(m_clients);
         while (CachedRawResourceClient* c = w.next())
@@ -71,9 +71,9 @@
     }
     CachedResource::data(m_data, allDataReceived);
 
-    if (dataBufferingPolicy == BufferData && m_options.shouldBufferData == DoNotBufferData) {
+    if (dataBufferingPolicy == BufferData && m_options.dataBufferingPolicy == DoNotBufferData) {
         if (m_loader)
-            m_loader->setShouldBufferData(DoNotBufferData);
+            m_loader->setDataBufferingPolicy(DoNotBufferData);
         clear();
     }
 }
@@ -137,9 +137,9 @@
         m_loader->setDefersLoading(defers);
 }
 
-void CachedRawResource::setShouldBufferData(DataBufferingPolicy shouldBufferData)
+void CachedRawResource::setDataBufferingPolicy(DataBufferingPolicy dataBufferingPolicy)
 {
-    m_options.shouldBufferData = shouldBufferData;
+    m_options.dataBufferingPolicy = dataBufferingPolicy;
 }
 
 static bool shouldIgnoreHeaderForCacheReuse(AtomicString headerName)
@@ -162,7 +162,7 @@
 
 bool CachedRawResource::canReuse(const ResourceRequest& newRequest) const
 {
-    if (m_options.shouldBufferData == DoNotBufferData)
+    if (m_options.dataBufferingPolicy == DoNotBufferData)
         return false;
 
     if (m_resourceRequest.httpMethod() != newRequest.httpMethod())

Modified: trunk/Source/WebCore/loader/cache/CachedRawResource.h (138284 => 138285)


--- trunk/Source/WebCore/loader/cache/CachedRawResource.h	2012-12-20 20:20:34 UTC (rev 138284)
+++ trunk/Source/WebCore/loader/cache/CachedRawResource.h	2012-12-20 20:26:43 UTC (rev 138285)
@@ -40,7 +40,7 @@
     // This can be fixed by splitting CORS preflighting out of DocumentThreacableLoader.
     virtual void setDefersLoading(bool);
 
-    virtual void setShouldBufferData(DataBufferingPolicy);
+    virtual void setDataBufferingPolicy(DataBufferingPolicy);
     
     // FIXME: This is exposed for the InpsectorInstrumentation for preflights in DocumentThreadableLoader. It's also really lame.
     unsigned long identifier() const { return m_identifier; }

Modified: trunk/Source/WebCore/loader/cache/CachedResource.h (138284 => 138285)


--- trunk/Source/WebCore/loader/cache/CachedResource.h	2012-12-20 20:20:34 UTC (rev 138284)
+++ trunk/Source/WebCore/loader/cache/CachedResource.h	2012-12-20 20:26:43 UTC (rev 138285)
@@ -215,7 +215,7 @@
     bool loadFailedOrCanceled() { return !m_error.isNull(); }
 
     bool shouldSendResourceLoadCallbacks() const { return m_options.sendLoadCallbacks == SendCallbacks; }
-    bool shouldBufferData() const { return m_options.shouldBufferData == BufferData; }
+    DataBufferingPolicy dataBufferingPolicy() const { return m_options.dataBufferingPolicy; }
     
     virtual void destroyDecodedData() { }
 

Modified: trunk/Source/WebCore/loader/mac/ResourceLoaderMac.mm (138284 => 138285)


--- trunk/Source/WebCore/loader/mac/ResourceLoaderMac.mm	2012-12-20 20:20:34 UTC (rev 138284)
+++ trunk/Source/WebCore/loader/mac/ResourceLoaderMac.mm	2012-12-20 20:26:43 UTC (rev 138285)
@@ -82,7 +82,7 @@
         CFDataRef data = "" i));
         int dataLen = static_cast<int>(CFDataGetLength(data));
 
-        if (m_options.shouldBufferData == BufferData) {
+        if (m_options.dataBufferingPolicy == BufferData) {
             if (!m_resourceData)
                 m_resourceData = ResourceBuffer::create();
             m_resourceData->append(data);

Modified: trunk/Source/WebCore/page/EventSource.cpp (138284 => 138285)


--- trunk/Source/WebCore/page/EventSource.cpp	2012-12-20 20:20:34 UTC (rev 138284)
+++ trunk/Source/WebCore/page/EventSource.cpp	2012-12-20 20:26:43 UTC (rev 138285)
@@ -124,7 +124,7 @@
     options.allowCredentials = (origin->canRequest(m_url) || m_withCredentials) ? AllowStoredCredentials : DoNotAllowStoredCredentials;
     options.preflightPolicy = PreventPreflight;
     options.crossOriginRequestPolicy = UseAccessControl;
-    options.shouldBufferData = DoNotBufferData;
+    options.dataBufferingPolicy = DoNotBufferData;
     options.securityOrigin = origin;
 
     m_loader = ThreadableLoader::create(scriptExecutionContext(), this, request, options);

Modified: trunk/Source/WebKit/chromium/ChangeLog (138284 => 138285)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-12-20 20:20:34 UTC (rev 138284)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-12-20 20:26:43 UTC (rev 138285)
@@ -1,3 +1,15 @@
+2012-12-20  Nate Chapin  <[email protected]>
+
+        Rename shouldBufferData to dataBufferingPolicy
+        https://bugs.webkit.org/show_bug.cgi?id=105450
+
+        Reviewed by Alexey Proskuryakov.
+
+        No new tests, simple rename.
+
+        * src/AssociatedURLLoader.cpp:
+        (WebKit::AssociatedURLLoader::loadAsynchronously):
+
 2012-12-20  Dominic Mazzoni  <[email protected]>
 
         AX: support clickPoint in DRT for chromium

Modified: trunk/Source/WebKit/chromium/src/AssociatedURLLoader.cpp (138284 => 138285)


--- trunk/Source/WebKit/chromium/src/AssociatedURLLoader.cpp	2012-12-20 20:20:34 UTC (rev 138284)
+++ trunk/Source/WebKit/chromium/src/AssociatedURLLoader.cpp	2012-12-20 20:26:43 UTC (rev 138285)
@@ -344,7 +344,7 @@
         options.allowCredentials = m_options.allowCredentials ? AllowStoredCredentials : DoNotAllowStoredCredentials;
         options.preflightPolicy = m_options.forcePreflight ? ForcePreflight : ConsiderPreflight;
         options.crossOriginRequestPolicy = static_cast<WebCore::CrossOriginRequestPolicy>(m_options.crossOriginRequestPolicy);
-        options.shouldBufferData = DoNotBufferData;
+        options.dataBufferingPolicy = DoNotBufferData;
 
         const ResourceRequest& webcoreRequest = newRequest.toResourceRequest();
         Document* webcoreDocument = m_frameImpl->frame()->document();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to