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):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@138285
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-12-20 Nate Chapin <japhet@chromium.org>
+
+ 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 <dino@apple.com>
Track menu in wrong location when fullscreen
if (!frame)
return;
- frame->loader()->activeDocumentLoader()->mainResourceLoader()->setShouldBufferData(DoNotBufferData);
+ frame->loader()->activeDocumentLoader()->mainResourceLoader()->setDataBufferingPolicy(DoNotBufferData);
}
void MediaDocumentParser::appendBytes(DocumentWriter*, const char*, size_t)
// 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);
}
}
}
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);
}
options.sendLoadCallbacks = DoNotSendCallbacks;
options.sniffContent = DoNotSniffContent;
// Keep buffering the data for the preflight request.
- options.shouldBufferData = BufferData;
+ options.dataBufferingPolicy = BufferData;
}
CachedResourceRequest newRequest(request, options);
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
PassRefPtr<ResourceBuffer> resourceData();
void setDefersLoading(bool);
- void setShouldBufferData(DataBufferingPolicy);
+ void setDataBufferingPolicy(DataBufferingPolicy);
#if HAVE(RUNLOOP_TIMER)
typedef RunLoopTimer<MainResourceLoader> MainResourceLoaderTimer;
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) {
void ResourceLoader::willStopBufferingData(const char* data, int length)
{
- if (m_options.shouldBufferData == DoNotBufferData)
+ if (m_options.dataBufferingPolicy == DoNotBufferData)
return;
ASSERT(!m_resourceData);
const ResourceRequest& request() const { return m_request; }
- void setShouldBufferData(DataBufferingPolicy);
+ void setDataBufferingPolicy(DataBufferingPolicy);
virtual void reportMemoryUsage(MemoryObjectInfo*) const;
};
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)
}
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;
// 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())
}
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();
}
}
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)
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())
// 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; }
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() { }
CFDataRef data = static_cast<CFDataRef>(CFArrayGetValueAtIndex(dataArray, 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);
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);
+2012-12-20 Nate Chapin <japhet@chromium.org>
+
+ 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 <dmazzoni@google.com>
AX: support clickPoint in DRT for chromium
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();