diff options
| author | Steve Block <steveblock@google.com> | 2009-10-08 17:19:54 +0100 |
|---|---|---|
| committer | Steve Block <steveblock@google.com> | 2009-10-20 00:41:58 +0100 |
| commit | 231d4e3152a9c27a73b6ac7badbe6be673aa3ddf (patch) | |
| tree | a6c7e2d6cd7bfa7011cc39abbb436142d7a4a7c8 /WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm | |
| parent | e196732677050bd463301566a68a643b6d14b907 (diff) | |
| download | external_webkit-231d4e3152a9c27a73b6ac7badbe6be673aa3ddf.zip external_webkit-231d4e3152a9c27a73b6ac7badbe6be673aa3ddf.tar.gz external_webkit-231d4e3152a9c27a73b6ac7badbe6be673aa3ddf.tar.bz2 | |
Merge webkit.org at R49305 : Automatic merge by git.
Change-Id: I8968561bc1bfd72b8923b7118d3728579c6dbcc7
Diffstat (limited to 'WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm')
| -rw-r--r-- | WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm index a5a8a2d..232a6c4 100644 --- a/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm +++ b/WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm @@ -42,6 +42,7 @@ #import <WebCore/DocumentLoader.h> #import <WebCore/Frame.h> #import <WebCore/FrameLoader.h> +#import <WebCore/SecurityOrigin.h> #import <WebCore/WebCoreObjCExtras.h> #import <WebCore/WebCoreURLResponse.h> #import <WebKitSystemInterface.h> @@ -49,6 +50,7 @@ #import <wtf/StdLibExtras.h> using namespace WebCore; +using namespace std; #define WEB_REASON_NONE -1 @@ -159,7 +161,7 @@ WebNetscapePluginStream::WebNetscapePluginStream(NSURLRequest *request, NPP plug WebNetscapePluginView *view = (WebNetscapePluginView *)plugin->ndata; // This check has already been done by the plug-in view. - ASSERT(FrameLoader::canLoad([request URL], String(), core([view webFrame])->document())); + ASSERT(SecurityOrigin::canLoad([request URL], String(), core([view webFrame])->document())); ASSERT([request URL]); ASSERT(plugin); @@ -168,7 +170,7 @@ WebNetscapePluginStream::WebNetscapePluginStream(NSURLRequest *request, NPP plug streams().add(&m_stream, plugin); - if (core([view webFrame])->loader()->shouldHideReferrer([request URL], core([view webFrame])->loader()->outgoingReferrer())) + if (SecurityOrigin::shouldHideReferrer([request URL], core([view webFrame])->loader()->outgoingReferrer())) [m_request.get() _web_setHTTPReferrer:nil]; } @@ -522,7 +524,7 @@ void WebNetscapePluginStream::deliverData() m_deliverDataTimer.startOneShot(0); break; } else { - deliveryBytes = MIN(deliveryBytes, totalBytes - totalBytesDelivered); + deliveryBytes = min(deliveryBytes, totalBytes - totalBytesDelivered); NSData *subdata = [m_deliveryData.get() subdataWithRange:NSMakeRange(totalBytesDelivered, deliveryBytes)]; PluginStopDeferrer deferrer(m_pluginView.get()); deliveryBytes = m_pluginFuncs->write(m_plugin, &m_stream, m_offset, [subdata length], (void *)[subdata bytes]); @@ -531,7 +533,7 @@ void WebNetscapePluginStream::deliverData() cancelLoadAndDestroyStreamWithError(pluginCancelledConnectionError()); return; } - deliveryBytes = MIN((unsigned)deliveryBytes, [subdata length]); + deliveryBytes = min<int32>(deliveryBytes, [subdata length]); m_offset += deliveryBytes; totalBytesDelivered += deliveryBytes; LOG(Plugins, "NPP_Write responseURL=%@ bytes=%d total-delivered=%d/%d", m_responseURL.get(), deliveryBytes, m_offset, m_stream.end); |
