WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Tweak for 2008-05-28
cairo_20080528.patch (text/plain), 19.96 KB, created by
Brent Fulgham
on 2008-05-28 13:35:10 PDT
(
hide
)
Description:
Tweak for 2008-05-28
Filename:
MIME Type:
Creator:
Brent Fulgham
Created:
2008-05-28 13:35:10 PDT
Size:
19.96 KB
patch
obsolete
>Index: WebKit/win/WebCookieManager.cpp >=================================================================== >--- WebKit/win/WebCookieManager.cpp (revision 34173) >+++ WebKit/win/WebCookieManager.cpp (working copy) >@@ -27,8 +27,12 @@ > #include "WebKitDLL.h" > #include "WebCookieManager.h" > >+#if USE(CFNETWORK) > #include <CFNetwork/CFHTTPCookiesPriv.h> > #include <WebCore/CookieStorageWin.h> >+#elif USE(CURL) >+#include "NotImplemented.h" >+#endif > > using namespace WebCore; > >@@ -36,9 +40,13 @@ using namespace WebCore; > > WebCookieManager* WebCookieManager::createInstance() > { >+#if USE(CFNETWORK) > WebCookieManager* manager = new WebCookieManager; > manager->AddRef(); > return manager; >+#else >+ return 0; >+#endif > } > > WebCookieManager::WebCookieManager() >@@ -56,6 +64,7 @@ WebCookieManager::~WebCookieManager() > > HRESULT STDMETHODCALLTYPE WebCookieManager::QueryInterface(REFIID riid, void** ppvObject) > { >+#if USE(CFNETWORK) > *ppvObject = 0; > if (IsEqualGUID(riid, IID_IUnknown)) > *ppvObject = static_cast<WebCookieManager*>(this); >@@ -66,6 +75,10 @@ HRESULT STDMETHODCALLTYPE WebCookieManag > > AddRef(); > return S_OK; >+#else >+ notImplemented(); >+ return E_FAIL; >+#endif > } > > ULONG STDMETHODCALLTYPE WebCookieManager::AddRef() >@@ -87,16 +100,26 @@ ULONG STDMETHODCALLTYPE WebCookieManager > HRESULT STDMETHODCALLTYPE WebCookieManager::cookieStorage( > /* [retval][out] */ CFHTTPCookieStorageRef* storage) > { >- if (!storage) >+#if USE(CFNETWORK) >+ if (!storage) > return E_POINTER; > > *storage = currentCookieStorage(); > return S_OK; >+#else >+ notImplemented(); >+ return E_FAIL; >+#endif > } > > HRESULT STDMETHODCALLTYPE WebCookieManager::setCookieStorage( > /* [in] */ CFHTTPCookieStorageRef storage) > { >+#if USE(CFNETWORK) > setCurrentCookieStorage(storage); > return S_OK; >+#else >+ notImplemented(); >+ return E_FAIL; >+#endif > } >Index: WebKit/win/WebDownload.cpp >=================================================================== >--- WebKit/win/WebDownload.cpp (revision 34173) >+++ WebKit/win/WebDownload.cpp (working copy) >@@ -43,7 +43,9 @@ > #include <sys/types.h> > > #pragma warning(push, 0) >+#if USE(CFNETWORK) > #include <WebCore/AuthenticationCF.h> >+#endif > #include <WebCore/BString.h> > #include <WebCore/NotImplemented.h> > #include <WebCore/ResourceError.h> >@@ -55,6 +57,7 @@ > > using namespace WebCore; > >+#if USE(CFNETWORK) > // CFURLDownload Callbacks ---------------------------------------------------------------- > static void didStartCallback(CFURLDownloadRef download, const void *clientInfo); > static CFURLRequestRef willSendRequestCallback(CFURLDownloadRef download, CFURLRequestRef request, CFURLResponseRef redirectionResponse, const void *clientInfo); >@@ -74,6 +77,7 @@ static UInt32 BundleMagicNumber = 0xDECA > > static CFDataRef extractResumeDataFromBundle(const String& bundlePath); > static HRESULT appendResumeDataToBundle(CFDataRef resumeData, const String& bundlePath); >+#endif > > // WebDownload ---------------------------------------------------------------- > >@@ -85,6 +89,7 @@ WebDownload::WebDownload() > > void WebDownload::init(ResourceHandle* handle, const ResourceRequest& request, const ResourceResponse& response, IWebDownloadDelegate* delegate) > { >+#if USE(CFNETWORK) > m_delegate = delegate ? delegate : DefaultDownloadDelegate::sharedInstance(); > CFURLConnectionRef connection = handle->connection(); > if (!connection) { >@@ -112,10 +117,12 @@ void WebDownload::init(ResourceHandle* h > // Either way, we need to release the connection to balance out ref counts > handle->releaseConnectionForDownload(); > CFRelease(connection); >+#endif > } > > void WebDownload::init(const KURL& url, IWebDownloadDelegate* delegate) > { >+#if USE(CFNETWORK) > m_delegate = delegate ? delegate : DefaultDownloadDelegate::sharedInstance(); > LOG_ERROR("Delegate is %p", m_delegate.get()); > >@@ -132,6 +139,7 @@ void WebDownload::init(const KURL& url, > CFURLDownloadScheduleDownloadWithRunLoop(m_download.get(), ResourceHandle::loaderRunLoop(), kCFRunLoopDefaultMode); > > LOG(Download, "WebDownload - Initialized download of url %s in WebDownload %p", url.string().utf8().data(), this); >+#endif > } > > WebDownload::~WebDownload() >@@ -204,6 +212,7 @@ HRESULT STDMETHODCALLTYPE WebDownload::i > /* [in] */ IWebURLRequest* request, > /* [in] */ IWebDownloadDelegate* delegate) > { >+#if USE(CFNETWORK) > COMPtr<WebMutableURLRequest> webRequest; > if (!request || FAILED(request->QueryInterface(&webRequest))) { > LOG(Download, "WebDownload - initWithRequest failed - not a WebMutableURLRequest"); >@@ -235,12 +244,17 @@ HRESULT STDMETHODCALLTYPE WebDownload::i > > LOG(Download, "WebDownload - initWithRequest complete, started download of url %s", webRequest->resourceRequest().url().string().utf8().data()); > return S_OK; >+#else >+ notImplemented(); >+ return E_FAIL; >+#endif > } > > HRESULT STDMETHODCALLTYPE WebDownload::initToResumeWithBundle( > /* [in] */ BSTR bundlePath, > /* [in] */ IWebDownloadDelegate* delegate) > { >+#if USE(CFNETWORK) > LOG(Download, "Attempting resume of download bundle %s", String(bundlePath, SysStringLen(bundlePath)).ascii().data()); > > RetainPtr<CFDataRef> resumeData(AdoptCF, extractResumeDataFromBundle(String(bundlePath, SysStringLen(bundlePath)))); >@@ -281,6 +295,10 @@ HRESULT STDMETHODCALLTYPE WebDownload::i > > LOG(Download, "WebDownload - initWithRequest complete, resumed download of bundle %s", String(bundlePath, SysStringLen(bundlePath)).ascii().data()); > return S_OK; >+#else >+ notImplemented(); >+ return E_FAIL; >+#endif > } > > HRESULT STDMETHODCALLTYPE WebDownload::canResumeDownloadDecodedWithEncodingMIMEType( >@@ -293,6 +311,7 @@ HRESULT STDMETHODCALLTYPE WebDownload::c > > HRESULT STDMETHODCALLTYPE WebDownload::start() > { >+#if USE(CFNETWORK) > LOG(Download, "WebDownload - Starting download (%p)", this); > if (!m_download) > return E_FAIL; >@@ -303,10 +322,15 @@ HRESULT STDMETHODCALLTYPE WebDownload::s > didStart(); > > return S_OK; >+#else >+ notImplemented(); >+ return E_FAIL; >+#endif > } > > HRESULT STDMETHODCALLTYPE WebDownload::cancel() > { >+#if USE(CFNETWORK) > LOG(Download, "WebDownload - Cancelling download (%p)", this); > if (!m_download) > return E_FAIL; >@@ -314,10 +338,15 @@ HRESULT STDMETHODCALLTYPE WebDownload::c > CFURLDownloadCancel(m_download.get()); > m_download = 0; > return S_OK; >+#else >+ notImplemented(); >+ return E_FAIL; >+#endif > } > > HRESULT STDMETHODCALLTYPE WebDownload::cancelForResume() > { >+#if USE(CFNETWORK) > LOG(Download, "WebDownload - Cancelling download (%p), writing resume information to file if possible", this); > ASSERT(m_download); > if (!m_download) >@@ -344,21 +373,31 @@ HRESULT STDMETHODCALLTYPE WebDownload::c > exit: > m_download = 0; > return hr; >+#else >+ notImplemented(); >+ return E_FAIL; >+#endif > } > > HRESULT STDMETHODCALLTYPE WebDownload::deletesFileUponFailure( > /* [out, retval] */ BOOL* result) > { >+#if USE(CFNETWORK) > if (!m_download) > return E_FAIL; > *result = CFURLDownloadDeletesUponFailure(m_download.get()); > return S_OK; >+#else >+ notImplemented(); >+ return E_FAIL; >+#endif > } > > HRESULT STDMETHODCALLTYPE WebDownload::bundlePathForTargetPath( > /* [in] */ BSTR targetPath, > /* [out, retval] */ BSTR* bundlePath) > { >+#if USE(CFNETWORK) > if (!targetPath) > return E_INVALIDARG; > >@@ -374,6 +413,10 @@ HRESULT STDMETHODCALLTYPE WebDownload::b > if (!*bundlePath) > return E_FAIL; > return S_OK; >+#else >+ notImplemented(); >+ return E_FAIL; >+#endif > } > > HRESULT STDMETHODCALLTYPE WebDownload::request( >@@ -390,16 +433,22 @@ HRESULT STDMETHODCALLTYPE WebDownload::r > HRESULT STDMETHODCALLTYPE WebDownload::setDeletesFileUponFailure( > /* [in] */ BOOL deletesFileUponFailure) > { >+#if USE(CFNETWORK) > if (!m_download) > return E_FAIL; > CFURLDownloadSetDeletesUponFailure(m_download.get(), !!deletesFileUponFailure); > return S_OK; >+#else >+ notImplemented(); >+ return E_FAIL; >+#endif > } > > HRESULT STDMETHODCALLTYPE WebDownload::setDestination( > /* [in] */ BSTR path, > /* [in] */ BOOL allowOverwrite) > { >+#if USE(CFNETWORK) > if (!m_download) > return E_FAIL; > >@@ -413,6 +462,10 @@ HRESULT STDMETHODCALLTYPE WebDownload::s > LOG(Download, "WebDownload - Set destination to %s", m_bundlePath.ascii().data()); > > return S_OK; >+#else >+ notImplemented(); >+ return E_FAIL; >+#endif > } > > // IWebURLAuthenticationChallengeSender ------------------------------------------------------------------- >@@ -420,6 +473,7 @@ HRESULT STDMETHODCALLTYPE WebDownload::s > HRESULT STDMETHODCALLTYPE WebDownload::cancelAuthenticationChallenge( > /* [in] */ IWebURLAuthenticationChallenge*) > { >+#if USE(CFNETWORK) > if (m_download) { > CFURLDownloadCancel(m_download.get()); > m_download = 0; >@@ -431,11 +485,16 @@ HRESULT STDMETHODCALLTYPE WebDownload::c > m_delegate->didFailWithError(this, webError.get()); > > return S_OK; >+#else >+ notImplemented(); >+ return E_FAIL; >+#endif > } > > HRESULT STDMETHODCALLTYPE WebDownload::continueWithoutCredentialForAuthenticationChallenge( > /* [in] */ IWebURLAuthenticationChallenge* challenge) > { >+#if USE(CFNETWORK) > COMPtr<WebURLAuthenticationChallenge> webChallenge(Query, challenge); > if (!webChallenge) > return E_NOINTERFACE; >@@ -443,12 +502,17 @@ HRESULT STDMETHODCALLTYPE WebDownload::c > if (m_download) > CFURLDownloadUseCredential(m_download.get(), 0, webChallenge->authenticationChallenge().cfURLAuthChallengeRef()); > return S_OK; >+#else >+ notImplemented(); >+ return E_FAIL; >+#endif > } > > HRESULT STDMETHODCALLTYPE WebDownload::useCredential( > /* [in] */ IWebURLCredential* credential, > /* [in] */ IWebURLAuthenticationChallenge* challenge) > { >+#if USE(CFNETWORK) > COMPtr<WebURLAuthenticationChallenge> webChallenge(Query, challenge); > if (!webChallenge) > return E_NOINTERFACE; >@@ -462,8 +526,13 @@ HRESULT STDMETHODCALLTYPE WebDownload::u > if (m_download) > CFURLDownloadUseCredential(m_download.get(), cfCredential.get(), webChallenge->authenticationChallenge().cfURLAuthChallengeRef()); > return S_OK; >+#else >+ notImplemented(); >+ return E_FAIL; >+#endif > } > >+#if USE(CFNETWORK) > // CFURLDownload Callbacks ------------------------------------------------------------------- > void WebDownload::didStart() > { >@@ -796,3 +865,4 @@ exit: > fclose(bundle); > return hr; > } >+#endif >Index: WebKit/win/WebDownload.h >=================================================================== >--- WebKit/win/WebDownload.h (revision 34173) >+++ WebKit/win/WebDownload.h (working copy) >@@ -104,6 +104,7 @@ public: > /* [in] */ IWebURLCredential* credential, > /* [in] */ IWebURLAuthenticationChallenge* challenge); > >+#if USE(CFNETWORK) > // CFURLDownload Callbacks > void didStart(); > CFURLRequestRef willSendRequest(CFURLRequestRef, CFURLResponseRef); >@@ -116,13 +117,16 @@ public: > void didCreateDestination(CFURLRef); > void didFinish(); > void didFail(CFErrorRef); >+#endif > > protected: > ULONG m_refCount; > > WebCore::String m_destination; > WebCore::String m_bundlePath; >+#if USE(CFNETWORK) > RetainPtr<CFURLDownloadRef> m_download; >+#endif > COMPtr<IWebMutableURLRequest> m_request; > COMPtr<IWebDownloadDelegate> m_delegate; > >Index: WebKit/win/WebFrame.cpp >=================================================================== >--- WebKit/win/WebFrame.cpp (revision 34173) >+++ WebKit/win/WebFrame.cpp (working copy) >@@ -1748,6 +1748,7 @@ HRESULT STDMETHODCALLTYPE WebFrame::spoo > headerAndFooterHeights(&headerHeight, &footerHeight); > GraphicsContext spoolCtx(pctx); > >+#if PLATFORM(CG) > for (UINT ii = startPage; ii < endPage; ii++) { > IntRect pageRect = m_pageRects[ii]; > >@@ -1791,6 +1792,7 @@ HRESULT STDMETHODCALLTYPE WebFrame::spoo > CGContextEndPage(pctx); > CGContextRestoreGState(pctx); > } >+#endif > > return S_OK; > } >Index: WebKit/win/WebKitGraphics.cpp >=================================================================== >--- WebKit/win/WebKitGraphics.cpp (revision 34173) >+++ WebKit/win/WebKitGraphics.cpp (working copy) >@@ -107,7 +107,11 @@ void WebDrawText(WebTextRenderInfo* info > > // Set shadow setting > if (info->structSize == sizeof(WebTextRenderInfo) && >+#if PLATFORM(CG) > (info->shadowOffset.cx || info->shadowOffset.cy || info->shadowBlur || info->shadowColor)) >+#elif PLATFORM(CAIRO) >+ (info->shadowOffset.cx || info->shadowOffset.cy || info->shadowBlur)) >+#endif > context.setShadow(info->shadowOffset, info->shadowBlur, info->shadowColor); > > WebCoreDrawTextAtPoint(context, drawString, info->pt, makeFont(*(info->description)), info->color, info->underlinedIndex); >Index: WebKit/win/WebKitGraphics.h >=================================================================== >--- WebKit/win/WebKitGraphics.h (revision 34173) >+++ WebKit/win/WebKitGraphics.h (working copy) >@@ -28,8 +28,14 @@ > > #include <windows.h> > >+#if PLATFORM(CG) > typedef struct CGColor* CGColorRef; > typedef struct CGContext* CGContextRef; >+#elif PLATFORM(CAIRO) >+#include "GraphicsContext.h" >+typedef WebCore::Color ColorRef; >+typedef struct _cairo* CairoContextRef; >+#endif > > typedef wchar_t WCHAR; > typedef __nullterminated const WCHAR* LPCWSTR; >@@ -47,18 +53,30 @@ struct WebFontDescription { > struct WebTextRenderInfo > { > DWORD structSize; >+#if PLATFORM(CG) > CGContextRef cgContext; >+#elif PLATFORM(CAIRO) >+ CairoContextRef cgContext; >+#endif > LPCTSTR text; > int length; > POINT pt; > const WebFontDescription* description; >+#if PLATFORM(CG) > CGColorRef color; >+#elif PLATFORM(CAIRO) >+ ColorRef color; >+#endif > int underlinedIndex; > bool drawAsPassword; > int overrideSmoothingLevel; // pass in -1 if caller does not want to override smoothing level > SIZE shadowOffset; > int shadowBlur; >+#if PLATFORM(CG) > CGColorRef shadowColor; >+#elif PLATFORM(CAIRO) >+ ColorRef shadowColor; >+#endif > }; > > void WebDrawText(WebTextRenderInfo*); >Index: WebKit/win/WebMutableURLRequest.cpp >=================================================================== >--- WebKit/win/WebMutableURLRequest.cpp (revision 34173) >+++ WebKit/win/WebMutableURLRequest.cpp (working copy) >@@ -37,6 +37,8 @@ > #include <WebCore/ResourceHandle.h> > #pragma warning(pop) > >+#include <wtf/RetainPtr.h> >+ > using namespace WebCore; > > // IWebURLRequest ---------------------------------------------------------------- >Index: WebKit/win/WebURLAuthenticationChallenge.cpp >=================================================================== >--- WebKit/win/WebURLAuthenticationChallenge.cpp (revision 34173) >+++ WebKit/win/WebURLAuthenticationChallenge.cpp (working copy) >@@ -147,9 +147,10 @@ HRESULT STDMETHODCALLTYPE WebURLAuthenti > > // FIXME: After we change AuthenticationChallenge to use "ResourceHandle" as the abstract "Sender" or "Source of this Auth Challenge", then we'll > // construct the AuthenticationChallenge with that as obtained from the webSender >- >+#if USE(CFNETWORK) > m_authenticationChallenge = AuthenticationChallenge(webSpace->protectionSpace(), webCredential->credential(), > previousFailureCount, webResponse->resourceResponse(), webError->resourceError()); >+#endif > return S_OK; > } > >Index: WebKit/win/WebURLAuthenticationChallengeSender.cpp >=================================================================== >--- WebKit/win/WebURLAuthenticationChallengeSender.cpp (revision 34173) >+++ WebKit/win/WebURLAuthenticationChallengeSender.cpp (working copy) >@@ -29,6 +29,7 @@ > #include "WebURLAuthenticationChallengeSender.h" > > #include "COMPtr.h" >+#include "NotImplemented.h" > #include "WebKit.h" > #include "WebURLAuthenticationChallenge.h" > #include "WebURLCredential.h" >@@ -98,29 +99,40 @@ ULONG STDMETHODCALLTYPE WebURLAuthentica > HRESULT STDMETHODCALLTYPE WebURLAuthenticationChallengeSender::cancelAuthenticationChallenge( > /* [in] */ IWebURLAuthenticationChallenge* challenge) > { >+#if USE(CFNETWORK) > COMPtr<WebURLAuthenticationChallenge> webChallenge(Query, challenge); > if (!webChallenge) > return E_FAIL; > > m_handle->receivedCancellation(webChallenge->authenticationChallenge()); > return S_OK; >+#else >+ notImplemented(); >+ return E_FAIL; >+#endif > } > > HRESULT STDMETHODCALLTYPE WebURLAuthenticationChallengeSender::continueWithoutCredentialForAuthenticationChallenge( > /* [in] */ IWebURLAuthenticationChallenge* challenge) > { >+#if USE(CFNETWORK) > COMPtr<WebURLAuthenticationChallenge> webChallenge(Query, challenge); > if (!webChallenge) > return E_FAIL; > > m_handle->receivedRequestToContinueWithoutCredential(webChallenge->authenticationChallenge()); > return S_OK; >+#else >+ notImplemented(); >+ return E_FAIL; >+#endif > } > > HRESULT STDMETHODCALLTYPE WebURLAuthenticationChallengeSender::useCredential( > /* [in] */ IWebURLCredential* credential, > /* [in] */ IWebURLAuthenticationChallenge* challenge) > { >+#if USE(CFNETWORK) > COMPtr<WebURLAuthenticationChallenge> webChallenge(Query, challenge); > if (!webChallenge) > return E_FAIL; >@@ -131,6 +143,10 @@ HRESULT STDMETHODCALLTYPE WebURLAuthenti > > m_handle->receivedCredential(webChallenge->authenticationChallenge(), webCredential->credential()); > return S_OK; >+#else >+ notImplemented(); >+ return E_FAIL; >+#endif > } > > // WebURLAuthenticationChallengeSender ---------------------------------------------------------------- >Index: WebKit/win/WebView.cpp >=================================================================== >--- WebKit/win/WebView.cpp (revision 34173) >+++ WebKit/win/WebView.cpp (working copy) >@@ -4103,9 +4103,11 @@ HRESULT updateSharedSettingsFromPreferen > if (FAILED(hr)) > return hr; > >+#if USE(CFNETWORK) > // Set cookie storage accept policy > if (CFHTTPCookieStorageRef cookieStorage = currentCookieStorage()) > CFHTTPCookieStorageSetCookieAcceptPolicy(cookieStorage, acceptPolicy); >+#endif > > return S_OK; > } >Index: WebKit/win/WebCoreSupport/WebDragClient.cpp >=================================================================== >--- WebKit/win/WebCoreSupport/WebDragClient.cpp (revision 34173) >+++ WebKit/win/WebCoreSupport/WebDragClient.cpp (working copy) >@@ -223,6 +223,7 @@ DragImageRef WebDragClient::createDragIm > return 0; > } > >+#if PLATFORM(CG) > CGContextRef contextRef; > image = allocImage(workingDC, imageSize, &contextRef); > if (!image) { >@@ -258,6 +259,7 @@ DragImageRef WebDragClient::createDragIm > WebCoreDrawDoubledTextAtPoint(context, label, textPos, labelFont, topColor, bottomColor); > > CGContextRelease(contextRef); >+#endif > DeleteDC(workingDC); > ReleaseDC(0, dc); > return image; >Index: WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp >=================================================================== >--- WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp (revision 34173) >+++ WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp (working copy) >@@ -30,6 +30,7 @@ > #include "WebFrameLoaderClient.h" > > #include "CFDictionaryPropertyBag.h" >+#include "NotImplemented.h" > #include "MarshallingHelpers.h" > #include "WebCachedPagePlatformData.h" > #include "WebChromeClient.h" >@@ -107,6 +108,7 @@ void WebFrameLoaderClient::assignIdentif > > void WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge(DocumentLoader* loader, unsigned long identifier, const AuthenticationChallenge& challenge) > { >+#if USE(CFNETWORK) > ASSERT(challenge.sourceHandle()); > > WebView* webView = m_webFrame->webView(); >@@ -120,6 +122,9 @@ void WebFrameLoaderClient::dispatchDidRe > // If the ResourceLoadDelegate doesn't exist or fails to handle the call, we tell the ResourceHandle > // to continue without credential - this is the best approximation of Mac behavior > challenge.sourceHandle()->receivedRequestToContinueWithoutCredential(challenge); >+#else >+ notImplemented(); >+#endif > } > > void WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge(DocumentLoader* loader, unsigned long identifier, const AuthenticationChallenge& challenge)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 17484
:
19268
|
19421
|
19596
|
21400
|
24590
|
25086
|
25087
|
25510
|
25535
|
25604
|
25963
|
26021
|
26111
|
26448
|
26615
|
26992
|
28910
|
30783
|
32669