WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-99340-20121108091623.patch (text/plain), 67.91 KB, created by
Mark Pilgrim (Google)
on 2012-11-08 06:18:27 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Mark Pilgrim (Google)
Created:
2012-11-08 06:18:27 PST
Size:
67.91 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 133891) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,122 @@ >+2012-11-08 Mark Pilgrim <pilgrim@chromium.org> >+ >+ [Chromium] Remove cookie-related functions from PlatformSupport >+ https://bugs.webkit.org/show_bug.cgi?id=99340 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!). >+ >+ No new tests (OOPS!). >+ >+ * Modules/websockets/WebSocketChannel.cpp: >+ (WebCore::WebSocketChannel::processBuffer): >+ * Modules/websockets/WebSocketHandshake.cpp: >+ (WebCore::WebSocketHandshake::clientHandshakeMessage): >+ (WebCore::WebSocketHandshake::clientHandshakeRequest): >+ * WebCore.exp.in: >+ * dom/Document.cpp: >+ (WebCore::Document::cookie): >+ (WebCore::Document::setCookie): >+ (WebCore): >+ (WebCore::Document::cookiesEnabled): >+ * dom/Document.h: >+ (Document): >+ * inspector/InspectorPageAgent.cpp: >+ (WebCore::InspectorPageAgent::getCookies): >+ (WebCore::InspectorPageAgent::deleteCookie): >+ * loader/FrameLoaderClient.h: >+ (WebCore): >+ (FrameLoaderClient): >+ (WebCore::FrameLoaderClient::cookieJar): >+ * page/Navigator.cpp: >+ (WebCore::Navigator::cookieEnabled): >+ * platform/CookieJar.h: >+ (WebCore): >+ (CookieJar): >+ (WebCore::CookieJar::CookieJar): >+ * platform/chromium/PlatformSupport.h: >+ (PlatformSupport): >+ * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: >+ (WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime): >+ * platform/mac/CookieJar.mm: >+ (WebCore::CookieJar::cookies): >+ (WebCore::CookieJar::cookieRequestHeaderFieldValue): >+ (WebCore::CookieJar::setCookies): >+ (WebCore::CookieJar::cookiesEnabled): >+ (WebCore::CookieJar::getRawCookies): >+ (WebCore::CookieJar::deleteCookie): >+ (WebCore::CookieJar::getHostnamesWithCookies): >+ (WebCore::CookieJar::deleteCookiesForHostname): >+ (WebCore::CookieJar::deleteAllCookies): >+ * platform/network/cf/CookieJarCFNet.cpp: >+ (WebCore::CookieJar::setCookies): >+ (WebCore::CookieJar::cookies): >+ (WebCore::CookieJar::cookieRequestHeaderFieldValue): >+ (WebCore::CookieJar::cookiesEnabled): >+ (WebCore::CookieJar::getRawCookies): >+ (WebCore::CookieJar::deleteCookie): >+ (WebCore::CookieJar::getHostnamesWithCookies): >+ (WebCore::CookieJar::deleteCookiesForHostname): >+ (WebCore::CookieJar::deleteAllCookies): >+ * platform/network/chromium/CookieJarChromium.cpp: >+ (WebCore::CookieJar::setCookies): >+ (WebCore::CookieJar::cookies): >+ (WebCore::CookieJar::cookieRequestHeaderFieldValue): >+ (WebCore::CookieJar::cookiesEnabled): >+ (WebCore::CookieJar::getRawCookies): >+ (WebCore::CookieJar::deleteCookie): >+ (WebCore::CookieJar::getHostnamesWithCookies): >+ (WebCore::CookieJar::deleteCookiesForHostname): >+ (WebCore::CookieJar::deleteAllCookies): >+ * platform/network/curl/CookieJarCurl.cpp: >+ (WebCore): >+ (WebCore::CookieJar::setCookies): >+ (WebCore::CookieJar::cookies): >+ (WebCore::CookieJar::cookieRequestHeaderFieldValue): >+ (WebCore::CookieJar::cookiesEnabled): >+ (WebCore::CookieJar::getRawCookies): >+ (WebCore::CookieJar::deleteCookie): >+ (WebCore::CookieJar::getHostnamesWithCookies): >+ (WebCore::CookieJar::deleteCookiesForHostname): >+ (WebCore::CookieJar::deleteAllCookies): >+ * platform/network/soup/CookieJarSoup.cpp: >+ (WebCore::cookieJarForContext): >+ (WebCore::CookieJar::setCookies): >+ (WebCore::cookiesForContext): >+ (WebCore::CookieJar::cookies): >+ (WebCore::CookieJar::cookieRequestHeaderFieldValue): >+ (WebCore::CookieJar::cookiesEnabled): >+ (WebCore::CookieJar::getRawCookies): >+ (WebCore::CookieJar::deleteCookie): >+ (WebCore::CookieJar::getHostnamesWithCookies): >+ (WebCore::CookieJar::deleteCookiesForHostname): >+ (WebCore::CookieJar::deleteAllCookies): >+ * platform/network/win/CookieJarWin.cpp: >+ (WebCore): >+ (WebCore::CookieJar::setCookies): >+ (WebCore::CookieJar::cookies): >+ (WebCore::CookieJar::cookieRequestHeaderFieldValue): >+ (WebCore::CookieJar::cookiesEnabled): >+ (WebCore::CookieJar::getRawCookies): >+ (WebCore::CookieJar::deleteCookie): >+ (WebCore::CookieJar::getHostnamesWithCookies): >+ (WebCore::CookieJar::deleteCookiesForHostname): >+ (WebCore::CookieJar::deleteAllCookies): >+ * platform/qt/CookieJarQt.cpp: >+ (WebCore::CookieJar::setCookies): >+ (WebCore::CookieJar::cookies): >+ (WebCore::CookieJar::cookieRequestHeaderFieldValue): >+ (WebCore::CookieJar::cookiesEnabled): >+ (WebCore::CookieJar::getRawCookies): >+ (WebCore::CookieJar::deleteCookie): >+ (WebCore::CookieJar::getHostnamesWithCookies): >+ (WebCore::CookieJar::deleteCookiesForHostname): >+ (WebCore::CookieJar::deleteAllCookies): >+ * plugins/PluginView.cpp: >+ (WebCore::PluginView::getValueForURL): >+ (WebCore::PluginView::setValueForURL): >+ > 2012-11-08 Laszlo Gombos <l.gombos@samsung.com> > > [EFL] Remove non-variable options from the build system >Index: Source/WebCore/WebCore.exp.in >=================================================================== >--- Source/WebCore/WebCore.exp.in (revision 133885) >+++ Source/WebCore/WebCore.exp.in (working copy) >@@ -83,7 +83,6 @@ __ZN7WebCore10ScrollView24windowResizerR > __ZN7WebCore10ScrollView8addChildEN3WTF10PassRefPtrINS_6WidgetEEE > __ZN7WebCore10ShadowRoot6createEPNS_7ElementERi > __ZN7WebCore10deleteFileERKN3WTF6StringE >-__ZN7WebCore10setCookiesEPNS_8DocumentERKNS_4KURLERKN3WTF6StringE > __ZN7WebCore10toDocumentEN3JSC7JSValueE > __ZN7WebCore11BitmapImageC1EP7CGImagePNS_13ImageObserverE > __ZN7WebCore11BitmapImageC1EPNS_13ImageObserverE >@@ -269,6 +268,11 @@ __ZN7WebCore14FrameSelectionC1EPNS_5Fram > __ZN7WebCore14LoaderStrategy21resourceLoadSchedulerEv > __ZN7WebCore14PluginDocument10pluginNodeEv > __ZNK7WebCore5Frame25trackedRepaintRectsAsTextEv >+__ZN7WebCore9CookieJar10setCookiesERKNS_4KURLES3_RKN3WTF6StringE >+__ZN7WebCore9CookieJar16deleteAllCookiesEv >+__ZN7WebCore9CookieJar23getHostnamesWithCookiesERN3WTF7HashSetINS1_6StringENS1_10StringHashENS1_10HashTraitsIS3_EEEE >+__ZN7WebCore9CookieJar24deleteCookiesForHostnameERKN3WTF6StringE >+__ZN7WebCore9CookieJar7cookiesERKNS_4KURLES3_ > __ZN7WebCore9FrameView17setTracksRepaintsEb > __ZN7WebCore9FrameView20resetTrackedRepaintsEv > __ZN7WebCore14PluginDocument12pluginWidgetEv >@@ -463,7 +467,6 @@ __ZN7WebCore16VisibleSelectionC1ERKNS_15 > __ZN7WebCore16VisibleSelectionC1ERKNS_15VisiblePositionEb > __ZN7WebCore16createFullMarkupEPKNS_4NodeE > __ZN7WebCore16createFullMarkupEPKNS_5RangeE >-__ZN7WebCore16deleteAllCookiesEv > __ZN7WebCore16enclosingIntRectERKNS_9FloatRectE > __ZN7WebCore16isEndOfParagraphERKNS_15VisiblePositionENS_27EditingBoundaryCrossingRuleE > __ZN7WebCore16isUserVisibleURLEP8NSString >@@ -622,7 +625,6 @@ __ZN7WebCore23createFragmentFromNodesEPN > __ZN7WebCore23dataForURLComponentTypeEP5NSURLl > __ZN7WebCore23decodeHostNameWithRangeEP8NSString8_NSRange > __ZN7WebCore23encodeHostNameWithRangeEP8NSString8_NSRange >-__ZN7WebCore23getHostnamesWithCookiesERN3WTF7HashSetINS0_6StringENS0_10StringHashENS0_10HashTraitsIS2_EEEE > __ZN7WebCore24BinaryPropertyListWriter17writePropertyListEv > __ZN7WebCore24CachedResourceHandleBase11setResourceEPNS_14CachedResourceE > __ZN7WebCore24ComposedShadowTreeWalker10firstChildEv >@@ -641,7 +643,6 @@ __ZN7WebCore24FrameDestructionObserverC2 > __ZN7WebCore24FrameDestructionObserverD2Ev > __ZN7WebCore24createFragmentFromMarkupEPNS_8DocumentERKN3WTF6StringES5_NS_27FragmentScriptingPermissionE > __ZN7WebCore24decodeURLEscapeSequencesERKN3WTF6StringE >-__ZN7WebCore24deleteCookiesForHostnameERKN3WTF6StringE > __ZN7WebCore24fileSystemRepresentationERKN3WTF6StringE > __ZN7WebCore24notifyHistoryItemChangedE > __ZN7WebCore25HistoryPropertyListWriter11releaseDataEv >@@ -876,7 +877,6 @@ __ZN7WebCore7RunLoop9TimerBaseD2Ev > __ZN7WebCore7TextRun19allowsRoundingHacksEv > __ZN7WebCore7TextRun21s_allowsRoundingHacksE > __ZN7WebCore7TextRun22setAllowsRoundingHacksEb >-__ZN7WebCore7cookiesEPKNS_8DocumentERKNS_4KURLE > __ZN7WebCore7jsArrayEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEN3WTF10PassRefPtrINS_13DOMStringListEEE > __ZN7WebCore7makeRGBEiii > __ZN7WebCore7replaceERN3WTF6StringERKNS_17RegularExpressionERKS1_ >Index: Source/WebCore/Modules/websockets/WebSocketChannel.cpp >=================================================================== >--- Source/WebCore/Modules/websockets/WebSocketChannel.cpp (revision 133809) >+++ Source/WebCore/Modules/websockets/WebSocketChannel.cpp (working copy) >@@ -430,7 +430,7 @@ bool WebSocketChannel::processBuffer() > if (m_identifier) > InspectorInstrumentation::didReceiveWebSocketHandshakeResponse(m_document, m_identifier, m_handshake->serverHandshakeResponse()); > if (!m_handshake->serverSetCookie().isEmpty()) { >- if (cookiesEnabled(m_document)) { >+ if (m_document->cookiesEnabled()) { > ExceptionCode ec; // Exception (for sandboxed documents) ignored. > m_document->setCookie(m_handshake->serverSetCookie(), ec); > } >Index: Source/WebCore/Modules/websockets/WebSocketHandshake.cpp >=================================================================== >--- Source/WebCore/Modules/websockets/WebSocketHandshake.cpp (revision 133809) >+++ Source/WebCore/Modules/websockets/WebSocketHandshake.cpp (working copy) >@@ -39,6 +39,9 @@ > #include "Cookie.h" > #include "CookieJar.h" > #include "Document.h" >+#include "Frame.h" >+#include "FrameLoader.h" >+#include "FrameLoaderClient.h" > #include "HTTPHeaderMap.h" > #include "HTTPParsers.h" > #include "KURL.h" >@@ -200,7 +203,10 @@ CString WebSocketHandshake::clientHandsh > KURL url = httpURLForAuthenticationAndCookies(); > if (m_context->isDocument()) { > Document* document = static_cast<Document*>(m_context); >- String cookie = cookieRequestHeaderFieldValue(document, url); >+ String cookie; >+ Frame* frame = document->frame(); >+ if (frame) >+ cookie = frame->loader()->client()->cookieJar().cookieRequestHeaderFieldValue(url, document->firstPartyForCookies()); > if (!cookie.isEmpty()) > fields.append("Cookie: " + cookie); > // Set "Cookie2: <cookie>" if cookies 2 exists for url? >@@ -249,7 +255,12 @@ PassRefPtr<WebSocketHandshakeRequest> We > KURL url = httpURLForAuthenticationAndCookies(); > if (m_context->isDocument()) { > Document* document = static_cast<Document*>(m_context); >- String cookie = cookieRequestHeaderFieldValue(document, url); >+ String cookie; >+ Frame* frame = document->frame(); >+ if (frame) { >+ CookieJar cookieJar = frame->loader()->client()->cookieJar(); >+ cookie = cookieJar.cookieRequestHeaderFieldValue(url, document->firstPartyForCookies()); >+ } > if (!cookie.isEmpty()) > request->addHeaderField("Cookie", cookie); > // Set "Cookie2: <cookie>" if cookies 2 exists for url? >Index: Source/WebCore/dom/Document.cpp >=================================================================== >--- Source/WebCore/dom/Document.cpp (revision 133885) >+++ Source/WebCore/dom/Document.cpp (working copy) >@@ -3814,7 +3814,9 @@ String Document::cookie(ExceptionCode& e > if (cookieURL.isEmpty()) > return String(); > >- return cookies(this, cookieURL); >+ if (!frame()) >+ return String(); >+ return frame()->loader()->client()->cookieJar().cookies(cookieURL, this->firstPartyForCookies()); > } > > void Document::setCookie(const String& value, ExceptionCode& ec) >@@ -3835,7 +3837,23 @@ void Document::setCookie(const String& v > if (cookieURL.isEmpty()) > return; > >- setCookies(this, cookieURL, value); >+ if (!frame()) >+ return; >+ frame()->loader()->client()->cookieJar().setCookies(cookieURL, this->firstPartyForCookies(), value); >+} >+ >+bool Document::cookiesEnabled() >+{ >+ if (!page()) >+ return false; >+ >+ if (!page()->settings()->cookieEnabled()) >+ return false; >+ >+ if (!frame()) >+ return false; >+ >+ return frame()->loader()->client()->cookieJar().cookiesEnabled(this->cookieURL(), this->firstPartyForCookies()); > } > > String Document::referrer() const >Index: Source/WebCore/dom/Document.h >=================================================================== >--- Source/WebCore/dom/Document.h (revision 133809) >+++ Source/WebCore/dom/Document.h (working copy) >@@ -823,6 +823,7 @@ public: > > String cookie(ExceptionCode&) const; > void setCookie(const String&, ExceptionCode&); >+ bool cookiesEnabled(); > > String referrer() const; > >Index: Source/WebCore/inspector/InspectorPageAgent.cpp >=================================================================== >--- Source/WebCore/inspector/InspectorPageAgent.cpp (revision 133809) >+++ Source/WebCore/inspector/InspectorPageAgent.cpp (working copy) >@@ -49,6 +49,8 @@ > #include "Document.h" > #include "DocumentLoader.h" > #include "Frame.h" >+#include "FrameLoader.h" >+#include "FrameLoaderClient.h" > #include "FrameView.h" > #include "GeolocationController.h" > #include "GeolocationError.h" >@@ -509,9 +511,10 @@ void InspectorPageAgent::getCookies(Erro > for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext(mainFrame())) { > Document* document = frame->document(); > Vector<KURL> allURLs = allResourcesURLsForFrame(frame); >+ CookieJar cookieJar = frame->loader()->client()->cookieJar(); > for (Vector<KURL>::const_iterator it = allURLs.begin(); it != allURLs.end(); ++it) { > Vector<Cookie> docCookiesList; >- rawCookiesImplemented = getRawCookies(document, KURL(ParsedURLString, *it), docCookiesList); >+ rawCookiesImplemented = cookieJar.getRawCookies(KURL(ParsedURLString, *it), document->firstPartyForCookies(), docCookiesList); > if (!rawCookiesImplemented) { > // FIXME: We need duplication checking for the String representation of cookies. > ExceptionCode ec = 0; >@@ -547,8 +550,9 @@ void InspectorPageAgent::deleteCookie(Er > continue; > > Vector<KURL> allURLs = allResourcesURLsForFrame(frame); >+ CookieJar cookieJar = frame->loader()->client()->cookieJar(); > for (Vector<KURL>::const_iterator it = allURLs.begin(); it != allURLs.end(); ++it) >- WebCore::deleteCookie(document, KURL(ParsedURLString, *it), cookieName); >+ cookieJar.deleteCookie(KURL(ParsedURLString, *it), cookieName); > } > } > >Index: Source/WebCore/loader/FrameLoaderClient.h >=================================================================== >--- Source/WebCore/loader/FrameLoaderClient.h (revision 133809) >+++ Source/WebCore/loader/FrameLoaderClient.h (working copy) >@@ -30,6 +30,7 @@ > #ifndef FrameLoaderClient_h > #define FrameLoaderClient_h > >+#include "CookieJar.h" > #include "FrameLoaderTypes.h" > #include "IconURL.h" > #include "LayoutMilestones.h" >@@ -64,6 +65,7 @@ namespace WebCore { > class AuthenticationChallenge; > class CachedFrame; > class Color; >+ class CookieJar; > class DOMWindowExtension; > class DOMWrapperWorld; > class DocumentLoader; >@@ -353,6 +355,8 @@ namespace WebCore { > #if ENABLE(REQUEST_AUTOCOMPLETE) > virtual void didRequestAutocomplete(PassRefPtr<FormState>) = 0; > #endif >+ >+ virtual CookieJar cookieJar() { return CookieJar(); } > }; > > } // namespace WebCore >Index: Source/WebCore/page/Navigator.cpp >=================================================================== >--- Source/WebCore/page/Navigator.cpp (revision 133809) >+++ Source/WebCore/page/Navigator.cpp (working copy) >@@ -23,7 +23,6 @@ > #include "config.h" > #include "Navigator.h" > >-#include "CookieJar.h" > #include "DOMMimeTypeArray.h" > #include "DOMPluginArray.h" > #include "Document.h" >@@ -118,7 +117,7 @@ bool Navigator::cookieEnabled() const > if (m_frame->page() && !m_frame->page()->settings()->cookieEnabled()) > return false; > >- return cookiesEnabled(m_frame->document()); >+ return m_frame->document()->cookiesEnabled(); > } > > bool Navigator::javaEnabled() const >Index: Source/WebCore/platform/CookieJar.h >=================================================================== >--- Source/WebCore/platform/CookieJar.h (revision 133809) >+++ Source/WebCore/platform/CookieJar.h (working copy) >@@ -26,6 +26,12 @@ > #ifndef CookieJar_h > #define CookieJar_h > >+#if PLATFORM(CHROMIUM) >+#include <public/WebCookieJar.h> >+#endif >+#if PLATFORM(QT) || PLATFORM(EFL) || PLATFORM(GTK) >+#include "NetworkingContext.h" >+#endif > #include <wtf/Forward.h> > #include <wtf/HashSet.h> > #include <wtf/text/WTFString.h> >@@ -33,25 +39,54 @@ > > namespace WebCore { > >-class Document; > class KURL; > struct Cookie; > >-// These two functions implement document.cookie API, with special rules for HttpOnly cookies. >-String cookies(const Document*, const KURL&); >-void setCookies(Document*, const KURL&, const String&); >- >-// These methods use current cookie storage, thus taking private browsing mode into account. >-bool cookiesEnabled(const Document*); >-String cookieRequestHeaderFieldValue(const Document*, const KURL&); >-bool getRawCookies(const Document*, const KURL&, Vector<Cookie>&); >-void deleteCookie(const Document*, const KURL&, const String&); >- >-// These functions always access default cookie storage, not taking private browsing mode into account. >-void getHostnamesWithCookies(HashSet<String>& hostnames); >-void deleteCookiesForHostname(const String& hostname); >-void deleteAllCookies(); >+class CookieJar { >+public: >+ CookieJar() >+ { >+#if PLATFORM(CHROMIUM) >+ m_webCookieJar = 0; >+#endif >+#if PLATFORM(QT) || PLATFORM(EFL) || PLATFORM(GTK) >+ m_networkingContext = 0; >+#endif >+ }; >+#if PLATFORM(CHROMIUM) >+ explicit CookieJar(WebKit::WebCookieJar* webCookieJar) >+ { >+ m_webCookieJar = webCookieJar; >+ }; >+#endif >+#if PLATFORM(QT) || PLATFORM(EFL) || PLATFORM(GTK) >+ explicit CookieJar(NetworkingContext* context) >+ { >+ m_networkingContext = context; >+ }; >+#endif >+ >+ // cookies omits HttpOnly cookies. >+ String cookies(const KURL&, const KURL&); >+ String cookieRequestHeaderFieldValue(const KURL&, const KURL&); >+ void setCookies(const KURL&, const KURL&, const String&); >+ bool cookiesEnabled(const KURL&, const KURL&); >+ bool getRawCookies(const KURL&, const KURL&, Vector<Cookie>&); >+ void deleteCookie(const KURL&, const String&); >+ >+ void getHostnamesWithCookies(HashSet<String>& hostnames); >+ void deleteCookiesForHostname(const String& hostname); >+ void deleteAllCookies(); >+ >+private: >+#if PLATFORM(CHROMIUM) >+ WebKit::WebCookieJar* m_webCookieJar; >+#endif >+#if PLATFORM(QT) || PLATFORM(EFL) || PLATFORM(GTK) >+ NetworkingContext* m_networkingContext; >+#endif >+}; > >-} >+} // namespace WebCore > > #endif >Index: Source/WebCore/platform/chromium/PlatformSupport.h >=================================================================== >--- Source/WebCore/platform/chromium/PlatformSupport.h (revision 133809) >+++ Source/WebCore/platform/chromium/PlatformSupport.h (working copy) >@@ -78,14 +78,6 @@ struct FontRenderStyle; > > class PlatformSupport { > public: >- // Cookies ------------------------------------------------------------ >- static void setCookies(const Document*, const KURL&, const String& value); >- static String cookies(const Document*, const KURL&); >- static String cookieRequestHeaderFieldValue(const Document*, const KURL&); >- static bool rawCookies(const Document*, const KURL&, Vector<Cookie>&); >- static void deleteCookie(const Document*, const KURL&, const String& cookieName); >- static bool cookiesEnabled(const Document*); >- > // Font --------------------------------------------------------------- > #if OS(WINDOWS) > static bool ensureFontLoaded(HFONT); >Index: Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp >=================================================================== >--- Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp (revision 133809) >+++ Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp (working copy) >@@ -32,6 +32,8 @@ > #include "CookieJar.h" > #include "DocumentLoader.h" > #include "Frame.h" >+#include "FrameLoader.h" >+#include "FrameLoaderClient.h" > #include "FrameView.h" > #include "GraphicsContext.h" > #include "KURL.h" >@@ -268,7 +270,7 @@ void MediaPlayerPrivateQuickTimeVisualCo > > KURL movieURL = KURL(KURL(), url); > Vector<Cookie> documentCookies; >- if (!getRawCookies(frame->document(), movieURL, documentCookies)) >+ if (!frame->loader()->client()->cookieJar().getRawCookies(movieURL, document->firstPartyForCookies(), documentCookies)) > return; > > for (size_t ndx = 0; ndx < documentCookies.size(); ndx++) { >Index: Source/WebCore/platform/mac/CookieJar.mm >=================================================================== >--- Source/WebCore/platform/mac/CookieJar.mm (revision 133809) >+++ Source/WebCore/platform/mac/CookieJar.mm (working copy) >@@ -61,7 +61,7 @@ static RetainPtr<NSArray> filterCookies( > return filteredCookies; > } > >-String cookies(const Document*, const KURL& url) >+String CookieJar::cookies(const KURL& url, const KURL& /*firstPartyForCookies*/) > { > BEGIN_BLOCK_OBJC_EXCEPTIONS; > >@@ -72,7 +72,7 @@ String cookies(const Document*, const KU > return String(); > } > >-String cookieRequestHeaderFieldValue(const Document*, const KURL& url) >+String CookieJar::cookieRequestHeaderFieldValue(const KURL& url, const KURL& /*firstPartyForCookies*/) > { > BEGIN_BLOCK_OBJC_EXCEPTIONS; > >@@ -83,7 +83,7 @@ String cookieRequestHeaderFieldValue(con > return String(); > } > >-void setCookies(Document* document, const KURL& url, const String& cookieStr) >+void CookieJar::setCookies(const KURL& url, const KURL& firstPartyForCookies, const String& cookieStr) > { > BEGIN_BLOCK_OBJC_EXCEPTIONS; > >@@ -100,12 +100,12 @@ void setCookies(Document* document, cons > RetainPtr<NSArray> filteredCookies = filterCookies([NSHTTPCookie cookiesWithResponseHeaderFields:[NSDictionary dictionaryWithObject:cookieString forKey:@"Set-Cookie"] forURL:cookieURL]); > ASSERT([filteredCookies.get() count] <= 1); > >- wkSetHTTPCookiesForURL(currentCFHTTPCookieStorage().get(), filteredCookies.get(), cookieURL, document->firstPartyForCookies()); >+ wkSetHTTPCookiesForURL(currentCFHTTPCookieStorage().get(), filteredCookies.get(), cookieURL, firstPartyForCookies); > > END_BLOCK_OBJC_EXCEPTIONS; > } > >-bool cookiesEnabled(const Document*) >+bool CookieJar::cookiesEnabled(const KURL& /*url*/, const KURL& /*firstPartyForCookies*/) > { > BEGIN_BLOCK_OBJC_EXCEPTIONS; > >@@ -116,7 +116,7 @@ bool cookiesEnabled(const Document*) > return false; > } > >-bool getRawCookies(const Document*, const KURL& url, Vector<Cookie>& rawCookies) >+bool CookieJar::getRawCookies(const KURL& url, const KURL& /*firstPartyForCookies*/, Vector<Cookie>& rawCookies) > { > rawCookies.clear(); > BEGIN_BLOCK_OBJC_EXCEPTIONS; >@@ -135,7 +135,7 @@ bool getRawCookies(const Document*, cons > return true; > } > >-void deleteCookie(const Document*, const KURL& url, const String& cookieName) >+void CookieJar::deleteCookie(const KURL& url, const String& cookieName) > { > BEGIN_BLOCK_OBJC_EXCEPTIONS; > >@@ -155,7 +155,7 @@ void deleteCookie(const Document*, const > END_BLOCK_OBJC_EXCEPTIONS; > } > >-void getHostnamesWithCookies(HashSet<String>& hostnames) >+void CookieJar::getHostnamesWithCookies(HashSet<String>& hostnames) > { > BEGIN_BLOCK_OBJC_EXCEPTIONS; > >@@ -167,7 +167,7 @@ void getHostnamesWithCookies(HashSet<Str > END_BLOCK_OBJC_EXCEPTIONS; > } > >-void deleteCookiesForHostname(const String& hostname) >+void CookieJar::deleteCookiesForHostname(const String& hostname) > { > BEGIN_BLOCK_OBJC_EXCEPTIONS; > >@@ -184,7 +184,7 @@ void deleteCookiesForHostname(const Stri > END_BLOCK_OBJC_EXCEPTIONS; > } > >-void deleteAllCookies() >+void CookieJar::deleteAllCookies() > { > wkDeleteAllHTTPCookies(defaultCFHTTPCookieStorage().get()); > } >Index: Source/WebCore/platform/network/cf/CookieJarCFNet.cpp >=================================================================== >--- Source/WebCore/platform/network/cf/CookieJarCFNet.cpp (revision 133809) >+++ Source/WebCore/platform/network/cf/CookieJarCFNet.cpp (working copy) >@@ -30,7 +30,6 @@ > > #include "Cookie.h" > #include "CookieStorageCFNet.h" >-#include "Document.h" > #include "KURL.h" > #include "ResourceHandle.h" > #include "SoftLinking.h" >@@ -95,7 +94,7 @@ static RetainPtr<CFArrayRef> filterCooki > return filteredCookies; > } > >-void setCookies(Document* document, const KURL& url, const String& value) >+void CookieJar::setCookies(const KURL& url, const KURL& firstPartyForCookies, const String& value) > { > // <rdar://problem/5632883> CFHTTPCookieStorage stores an empty cookie, which would be sent as "Cookie: =". > if (value.isEmpty()) >@@ -106,7 +105,7 @@ void setCookies(Document* document, cons > return; > > RetainPtr<CFURLRef> urlCF(AdoptCF, url.createCFURL()); >- RetainPtr<CFURLRef> firstPartyForCookiesCF(AdoptCF, document->firstPartyForCookies().createCFURL()); >+ RetainPtr<CFURLRef> firstPartyForCookiesCF(AdoptCF, firstPartyForCookies.createCFURL()); > > // <http://bugs.webkit.org/show_bug.cgi?id=6531>, <rdar://4409034> > // cookiesWithResponseHeaderFields doesn't parse cookies without a value >@@ -123,7 +122,7 @@ void setCookies(Document* document, cons > CFHTTPCookieStorageSetCookies(cookieStorage.get(), filterCookies(cookiesCF.get()).get(), urlCF.get(), firstPartyForCookiesCF.get()); > } > >-String cookies(const Document* /*document*/, const KURL& url) >+String CookieJar::cookies(const KURL& url, const KURL& /*firstPartyForCookies*/) > { > RetainPtr<CFHTTPCookieStorageRef> cookieStorage = currentCFHTTPCookieStorage(); > if (!cookieStorage) >@@ -137,7 +136,7 @@ String cookies(const Document* /*documen > return (CFStringRef)CFDictionaryGetValue(headerCF.get(), s_cookieCF); > } > >-String cookieRequestHeaderFieldValue(const Document* /*document*/, const KURL& url) >+String CookieJar::cookieRequestHeaderFieldValue(const KURL& url, const KURL& /*firstPartyForCookies*/) > { > RetainPtr<CFHTTPCookieStorageRef> cookieStorage = currentCFHTTPCookieStorage(); > if (!cookieStorage) >@@ -151,7 +150,7 @@ String cookieRequestHeaderFieldValue(con > return (CFStringRef)CFDictionaryGetValue(headerCF.get(), s_cookieCF); > } > >-bool cookiesEnabled(const Document* /*document*/) >+bool CookieJar::cookiesEnabled(const KURL& /*url*/, const KURL& /*firstPartyForCookies*/) > { > CFHTTPCookieStorageAcceptPolicy policy = CFHTTPCookieStorageAcceptPolicyOnlyFromMainDocumentDomain; > if (RetainPtr<CFHTTPCookieStorageRef> cookieStorage = currentCFHTTPCookieStorage()) >@@ -159,7 +158,7 @@ bool cookiesEnabled(const Document* /*do > return policy == CFHTTPCookieStorageAcceptPolicyOnlyFromMainDocumentDomain || policy == CFHTTPCookieStorageAcceptPolicyAlways; > } > >-bool getRawCookies(const Document*, const KURL& url, Vector<Cookie>& rawCookies) >+bool CookieJar::getRawCookies(const KURL& url, const KURL& /*firstPartyForCookies*/, Vector<Cookie>& rawCookies) > { > rawCookies.clear(); > RetainPtr<CFHTTPCookieStorageRef> cookieStorage = currentCFHTTPCookieStorage(); >@@ -193,7 +192,7 @@ bool getRawCookies(const Document*, cons > return true; > } > >-void deleteCookie(const Document*, const KURL& url, const String& name) >+void CookieJar::deleteCookie(const KURL& url, const String& name) > { > RetainPtr<CFHTTPCookieStorageRef> cookieStorage = currentCFHTTPCookieStorage(); > if (!cookieStorage) >@@ -214,7 +213,7 @@ void deleteCookie(const Document*, const > } > } > >-void getHostnamesWithCookies(HashSet<String>& hostnames) >+void CookieJar::getHostnamesWithCookies(HashSet<String>& hostnames) > { > RetainPtr<CFHTTPCookieStorageRef> cookieStorage = defaultCFHTTPCookieStorage(); > if (!cookieStorage) >@@ -232,7 +231,7 @@ void getHostnamesWithCookies(HashSet<Str > } > } > >-void deleteCookiesForHostname(const String& hostname) >+void CookieJar::deleteCookiesForHostname(const String& hostname) > { > RetainPtr<CFHTTPCookieStorageRef> cookieStorage = defaultCFHTTPCookieStorage(); > if (!cookieStorage) >@@ -251,7 +250,7 @@ void deleteCookiesForHostname(const Stri > } > } > >-void deleteAllCookies() >+void CookieJar::deleteAllCookies() > { > RetainPtr<CFHTTPCookieStorageRef> cookieStorage = defaultCFHTTPCookieStorage(); > if (!cookieStorage) >Index: Source/WebCore/platform/network/chromium/CookieJarChromium.cpp >=================================================================== >--- Source/WebCore/platform/network/chromium/CookieJarChromium.cpp (revision 133809) >+++ Source/WebCore/platform/network/chromium/CookieJarChromium.cpp (working copy) >@@ -32,52 +32,74 @@ > #include "CookieJar.h" > > #include "Cookie.h" >-#include "Document.h" >-#include "PlatformSupport.h" >+#include <public/WebCookie.h> >+#include <public/WebCookieJar.h> >+#include <public/WebString.h> >+#include <public/WebURL.h> >+#include <public/WebVector.h> > > namespace WebCore { > >-void setCookies(Document* document, const KURL& url, const String& value) >+void CookieJar::setCookies(const KURL& url, const KURL& firstPartyForCookies, const String& value) > { >- PlatformSupport::setCookies(document, url, value); >+ if (m_webCookieJar) >+ m_webCookieJar->setCookie(url, firstPartyForCookies, value); > } > >-String cookies(const Document* document, const KURL& url) >+String CookieJar::cookies(const KURL& url, const KURL& firstPartyForCookies) > { >- return PlatformSupport::cookies(document, url); >+ if (!m_webCookieJar) >+ return String(); >+ return m_webCookieJar->cookies(url, firstPartyForCookies); > } > >-String cookieRequestHeaderFieldValue(const Document* document, const KURL& url) >+String CookieJar::cookieRequestHeaderFieldValue(const KURL& url, const KURL& firstPartyForCookies) > { >- return PlatformSupport::cookieRequestHeaderFieldValue(document, url); >+ if (!m_webCookieJar) >+ return String(); >+ return m_webCookieJar->cookieRequestHeaderFieldValue(url, firstPartyForCookies); > } > >-bool cookiesEnabled(const Document* document) >+bool CookieJar::cookiesEnabled(const KURL& url, const KURL& firstPartyForCookies) > { >- return PlatformSupport::cookiesEnabled(document); >+ if (!m_webCookieJar) >+ return false; >+ return m_webCookieJar->cookiesEnabled(url, firstPartyForCookies); > } > >-bool getRawCookies(const Document* document, const KURL& url, Vector<Cookie>& rawCookies) >+bool CookieJar::getRawCookies(const KURL& url, const KURL& firstPartyForCookies, Vector<Cookie>& rawCookies) > { >- return PlatformSupport::rawCookies(document, url, rawCookies); >+ rawCookies.clear(); >+ WebKit::WebVector<WebKit::WebCookie> webCookies; >+ >+ if (m_webCookieJar) >+ m_webCookieJar->rawCookies(url, firstPartyForCookies, webCookies); >+ >+ for (unsigned i = 0; i < webCookies.size(); ++i) { >+ const WebKit::WebCookie& webCookie = webCookies[i]; >+ Cookie cookie(webCookie.name, webCookie.value, webCookie.domain, webCookie.path, webCookie.expires, webCookie.httpOnly, webCookie.secure, webCookie.session); >+ rawCookies.append(cookie); >+ } >+ return true; > } > >-void deleteCookie(const Document* document, const KURL& url, const String& cookieName) >+void CookieJar::deleteCookie(const KURL& url, const String& cookieName) > { >- return PlatformSupport::deleteCookie(document, url, cookieName); >+ if (m_webCookieJar) >+ m_webCookieJar->deleteCookie(url, cookieName); > } > >-void getHostnamesWithCookies(HashSet<String>& hostnames) >+void CookieJar::getHostnamesWithCookies(HashSet<String>& /*hostnames*/) > { > // FIXME: Not yet implemented > } > >-void deleteCookiesForHostname(const String& hostname) >+void CookieJar::deleteCookiesForHostname(const String& /*hostname*/) > { > // FIXME: Not yet implemented > } > >-void deleteAllCookies() >+void CookieJar::deleteAllCookies() > { > // FIXME: Not yet implemented > } >Index: Source/WebCore/platform/network/curl/CookieJarCurl.cpp >=================================================================== >--- Source/WebCore/platform/network/curl/CookieJarCurl.cpp (revision 133809) >+++ Source/WebCore/platform/network/curl/CookieJarCurl.cpp (working copy) >@@ -18,7 +18,6 @@ > #include "CookieJar.h" > > #include "Cookie.h" >-#include "Document.h" > #include "KURL.h" > #include <wtf/HashMap.h> > #include <wtf/text/StringHash.h> >@@ -26,52 +25,52 @@ > > namespace WebCore { > >-static HashMap<String, String> cookieJar; >+static HashMap<String, String> s_cookieJar; > >-void setCookies(Document* /*document*/, const KURL& url, const String& value) >+void CookieJar::setCookies(const KURL& url, const KURL& /*firstPartyForCookies*/, const String& value) > { >- cookieJar.set(url.string(), value); >+ s_cookieJar.set(url.string(), value); > } > >-String cookies(const Document* /*document*/, const KURL& url) >+String CookieJar::cookies(const KURL& url, const KURL& /*firstPartyForCookies*/) > { >- return cookieJar.get(url.string()); >+ return s_cookieJar.get(url.string()); > } > >-String cookieRequestHeaderFieldValue(const Document* /*document*/, const KURL& url) >+String CookieJar::cookieRequestHeaderFieldValue(const KURL& url, const KURL& /*firstPartyForCookies*/) > { > // FIXME: include HttpOnly cookie. >- return cookieJar.get(url.string()); >+ return s_cookieJar.get(url.string()); > } > >-bool cookiesEnabled(const Document* /*document*/) >+bool CookieJar::cookiesEnabled(const KURL& /*url*/, const KURL& /*firstPartyForCookies*/) > { > return true; > } > >-bool getRawCookies(const Document*, const KURL&, Vector<Cookie>& rawCookies) >+bool CookieJar::getRawCookies(const KURL& /*url*/, const KURL& /*firstPartyForCookies*/, Vector<Cookie>& rawCookies) > { > // FIXME: Not yet implemented > rawCookies.clear(); > return false; // return true when implemented > } > >-void deleteCookie(const Document*, const KURL&, const String&) >+void CookieJar::deleteCookie(const KURL& /*url*/, const String& /*cookieName*/) > { > // FIXME: Not yet implemented > } > >-void getHostnamesWithCookies(HashSet<String>& hostnames) >+void CookieJar::getHostnamesWithCookies(HashSet<String>& /*hostnames*/) > { > // FIXME: Not yet implemented > } > >-void deleteCookiesForHostname(const String& hostname) >+void CookieJar::deleteCookiesForHostname(const String& /*hostname*/) > { > // FIXME: Not yet implemented > } > >-void deleteAllCookies() >+void CookieJar::deleteAllCookies() > { > // FIXME: Not yet implemented > } >Index: Source/WebCore/platform/network/soup/CookieJarSoup.cpp >=================================================================== >--- Source/WebCore/platform/network/soup/CookieJarSoup.cpp (revision 133809) >+++ Source/WebCore/platform/network/soup/CookieJarSoup.cpp (working copy) >@@ -22,6 +22,7 @@ > #include "CookieJarSoup.h" > > #include "Cookie.h" >+#include "CookieJar.h" > #include "Document.h" > #include "Frame.h" > #include "FrameLoader.h" >@@ -34,17 +35,8 @@ > > namespace WebCore { > >-static SoupCookieJar* cookieJarForDocument(const Document* document) >+static SoupCookieJar* cookieJarForContext(const NetworkingContext* context) > { >- if (!document) >- return 0; >- const Frame* frame = document->frame(); >- if (!frame) >- return 0; >- const FrameLoader* loader = frame->loader(); >- if (!loader) >- return 0; >- const NetworkingContext* context = loader->networkingContext(); > if (!context) > return 0; > return SOUP_COOKIE_JAR(soup_session_get_feature(context->soupSession(), SOUP_TYPE_COOKIE_JAR)); >@@ -86,14 +78,14 @@ static inline bool httpOnlyCookieExists( > return false; > } > >-void setCookies(Document* document, const KURL& url, const String& value) >+void CookieJar::setCookies(const KURL& url, const KURL& firstPartyForCookies, const String& value) > { >- SoupCookieJar* jar = cookieJarForDocument(document); >+ SoupCookieJar* jar = cookieJarForContext(m_networkingContext); > if (!jar) > return; > > GOwnPtr<SoupURI> origin(soup_uri_new(url.string().utf8().data())); >- GOwnPtr<SoupURI> firstParty(soup_uri_new(document->firstPartyForCookies().string().utf8().data())); >+ GOwnPtr<SoupURI> firstParty(soup_uri_new(firstPartyForCookies.string().utf8().data())); > > // Get existing cookies for this origin. > GSList* existingCookies = soup_cookie_jar_get_cookie_list(jar, origin.get(), TRUE); >@@ -120,9 +112,9 @@ void setCookies(Document* document, cons > soup_cookies_free(existingCookies); > } > >-static String cookiesForDocument(const Document* document, const KURL& url, bool forHTTPHeader) >+static String cookiesForContext(const NetworkingContext* context, const KURL& url, bool forHTTPHeader) > { >- SoupCookieJar* jar = cookieJarForDocument(document); >+ SoupCookieJar* jar = cookieJarForContext(context); > if (!jar) > return String(); > >@@ -131,25 +123,25 @@ static String cookiesForDocument(const D > return String::fromUTF8(cookies.get()); > } > >-String cookies(const Document* document, const KURL& url) >+String CookieJar::cookies(const KURL& url, const KURL& /*firstPartyForCookies*/) > { >- return cookiesForDocument(document, url, false); >+ return cookiesForContext(m_networkingContext, url, false); > } > >-String cookieRequestHeaderFieldValue(const Document* document, const KURL& url) >+String CookieJar::cookieRequestHeaderFieldValue(const KURL& url, const KURL& /*firstPartyForCookies*/) > { >- return cookiesForDocument(document, url, true); >+ return cookiesForContext(m_networkingContext, url, true); > } > >-bool cookiesEnabled(const Document* document) >+bool CookieJar::cookiesEnabled(const KURL& /*url*/, const KURL& /*firstPartyForCookies*/) > { >- return !!cookieJarForDocument(document); >+ return !!m_networkingContext; > } > >-bool getRawCookies(const Document* document, const KURL& url, Vector<Cookie>& rawCookies) >+bool CookieJar::getRawCookies(const KURL& url, const KURL& /*firstPartyForCookies*/, Vector<Cookie>& rawCookies) > { > rawCookies.clear(); >- SoupCookieJar* jar = cookieJarForDocument(document); >+ SoupCookieJar* jar = cookieJarForContext(m_networkingContext); > if (!jar) > return false; > >@@ -170,9 +162,9 @@ bool getRawCookies(const Document* docum > return true; > } > >-void deleteCookie(const Document* document, const KURL& url, const String& name) >+void CookieJar::deleteCookie(const KURL& url, const String& name) > { >- SoupCookieJar* jar = cookieJarForDocument(document); >+ SoupCookieJar* jar = cookieJarForContext(m_networkingContext); > if (!jar) > return; > >@@ -191,7 +183,7 @@ void deleteCookie(const Document* docume > } > } > >-void getHostnamesWithCookies(HashSet<String>& hostnames) >+void CookieJar::getHostnamesWithCookies(HashSet<String>& hostnames) > { > SoupCookieJar* cookieJar = soupCookieJar(); > GOwnPtr<GSList> cookies(soup_cookie_jar_all_cookies(cookieJar)); >@@ -203,7 +195,7 @@ void getHostnamesWithCookies(HashSet<Str > } > } > >-void deleteCookiesForHostname(const String& hostname) >+void CookieJar::deleteCookiesForHostname(const String& hostname) > { > CString hostNameString = hostname.utf8(); > SoupCookieJar* cookieJar = soupCookieJar(); >@@ -216,7 +208,7 @@ void deleteCookiesForHostname(const Stri > } > } > >-void deleteAllCookies() >+void CookieJar::deleteAllCookies() > { > SoupCookieJar* cookieJar = soupCookieJar(); > GOwnPtr<GSList> cookies(soup_cookie_jar_all_cookies(cookieJar)); >Index: Source/WebCore/platform/network/win/CookieJarWin.cpp >=================================================================== >--- Source/WebCore/platform/network/win/CookieJarWin.cpp (revision 133809) >+++ Source/WebCore/platform/network/win/CookieJarWin.cpp (working copy) >@@ -28,7 +28,6 @@ > > #include "Cookie.h" > #include "KURL.h" >-#include "Document.h" > #include "ResourceHandle.h" > #include <windows.h> > #include <Wininet.h> >@@ -36,15 +35,16 @@ > > namespace WebCore { > >-void setCookies(Document* /*document*/, const KURL& url, const String& value) >+ >+void CookieJar::setCookies(const KURL& url, const KURL& /*firstPartyForCookies*/, const String& value) > { >- // FIXME: Deal with document->firstPartyForCookies(). >+ // FIXME: Deal with firstPartyForCookies. > String str = url.string(); > String val = value; > InternetSetCookie(str.charactersWithNullTermination(), 0, val.charactersWithNullTermination()); > } > >-String cookies(const Document* /*document*/, const KURL& url) >+String CookieJar::cookies(const KURL& url, const KURL& /*firstPartyForCookies*/) > { > String str = url.string(); > >@@ -63,40 +63,40 @@ String cookies(const Document* /*documen > return String::adopt(buffer); > } > >-String cookieRequestHeaderFieldValue(const Document* document, const KURL& url) >+String CookieJar::cookieRequestHeaderFieldValue(const KURL& url, const KURL& firstPartyForCookies) > { > // FIXME: include HttpOnly cookie >- return cookies(document, url); >+ return cookies(url, firstPartyForCookies); > } > >-bool cookiesEnabled(const Document* /*document*/) >+bool CookieJar::cookiesEnabled(const KURL& /*url*/, const KURL& /*firstPartyForCookies*/) > { > return true; > } > >-bool getRawCookies(const Document*, const KURL&, Vector<Cookie>& rawCookies) >+bool CookieJar::getRawCookies(const KURL& /*url*/, const KURL& /*firstPartyForCookies*/, Vector<Cookie>& rawCookies) > { > // FIXME: Not yet implemented > rawCookies.clear(); > return false; // return true when implemented > } > >-void deleteCookie(const Document*, const KURL&, const String&) >+void CookieJar::deleteCookie(const KURL& /*url*/, const String& /*cookieName*/) > { > // FIXME: Not yet implemented > } > >-void getHostnamesWithCookies(HashSet<String>& hostnames) >+void CookieJar::getHostnamesWithCookies(HashSet<String>& /*hostnames*/) > { > // FIXME: Not yet implemented > } > >-void deleteCookiesForHostname(const String& hostname) >+void CookieJar::deleteCookiesForHostname(const String& /*hostname*/) > { > // FIXME: Not yet implemented > } > >-void deleteAllCookies() >+void CookieJar::deleteAllCookies() > { > // FIXME: Not yet implemented > } >Index: Source/WebCore/platform/qt/CookieJarQt.cpp >=================================================================== >--- Source/WebCore/platform/qt/CookieJarQt.cpp (revision 133809) >+++ Source/WebCore/platform/qt/CookieJarQt.cpp (working copy) >@@ -31,9 +31,6 @@ > > #include "Cookie.h" > #include "CookieJar.h" >-#include "Document.h" >-#include "Frame.h" >-#include "FrameLoader.h" > #include "KURL.h" > #include "NetworkingContext.h" > #include "ThirdPartyCookiesQt.h" >@@ -49,31 +46,17 @@ namespace WebCore { > > static SharedCookieJarQt* s_sharedCookieJarQt = 0; > >-static NetworkingContext* networkingContext(const Document* document) >+void CookieJar::setCookies(const KURL& url, const KURL& firstPartyForCookies, const String& value) > { >- if (!document) >- return 0; >- Frame* frame = document->frame(); >- if (!frame) >- return 0; >- FrameLoader* loader = frame->loader(); >- if (!loader) >- return 0; >- return loader->networkingContext(); >-} >- >-void setCookies(Document* document, const KURL& url, const String& value) >-{ >- NetworkingContext* context = networkingContext(document); >- if (!context) >+ if (!m_networkingContext) > return; >- QNetworkCookieJar* jar = context->networkAccessManager()->cookieJar(); >+ QNetworkCookieJar* jar = m_networkingContext->networkAccessManager()->cookieJar(); > if (!jar) > return; > > QUrl urlForCookies(url); >- QUrl firstPartyUrl(document->firstPartyForCookies()); >- if (!thirdPartyCookiePolicyPermits(context, urlForCookies, firstPartyUrl)) >+ QUrl firstPartyUrl(firstPartyForCookies); >+ if (!thirdPartyCookiePolicyPermits(m_networkingContext, urlForCookies, firstPartyUrl)) > return; > > QList<QNetworkCookie> cookies = QNetworkCookie::parseCookies(QString(value).toLatin1()); >@@ -88,16 +71,15 @@ void setCookies(Document* document, cons > jar->setCookiesFromUrl(cookies, urlForCookies); > } > >-String cookies(const Document* document, const KURL& url) >+String CookieJar::cookies(const KURL& url, const KURL& firstPartyForCookies) > { >- NetworkingContext* context = networkingContext(document); >- if (!context) >+ if (!m_networkingContext) > return String(); >- QNetworkCookieJar* jar = context->networkAccessManager()->cookieJar(); >+ QNetworkCookieJar* jar = m_networkingContext->networkAccessManager()->cookieJar(); > > QUrl urlForCookies(url); >- QUrl firstPartyUrl(document->firstPartyForCookies()); >- if (!thirdPartyCookiePolicyPermits(context, urlForCookies, firstPartyUrl)) >+ QUrl firstPartyUrl(firstPartyForCookies); >+ if (!thirdPartyCookiePolicyPermits(m_networkingContext, urlForCookies, firstPartyUrl)) > return String(); > > QList<QNetworkCookie> cookies = jar->cookiesForUrl(urlForCookies); >@@ -114,12 +96,11 @@ String cookies(const Document* document, > return resultCookies.join(QLatin1String("; ")); > } > >-String cookieRequestHeaderFieldValue(const Document* document, const KURL &url) >+String CookieJar::cookieRequestHeaderFieldValue(const KURL& url, const KURL& /*firstPartyForCookies*/) > { >- NetworkingContext* context = networkingContext(document); >- if (!context) >+ if (!m_networkingContext) > return String(); >- QNetworkCookieJar* jar = context->networkAccessManager()->cookieJar(); >+ QNetworkCookieJar* jar = m_networkingContext->networkAccessManager()->cookieJar(); > > QList<QNetworkCookie> cookies = jar->cookiesForUrl(QUrl(url)); > if (cookies.isEmpty()) >@@ -132,41 +113,40 @@ String cookieRequestHeaderFieldValue(con > return resultCookies.join(QLatin1String("; ")); > } > >-bool cookiesEnabled(const Document* document) >+bool CookieJar::cookiesEnabled(const KURL& /*url*/, const KURL& /*firstPartyForCookies*/) > { >- NetworkingContext* context = networkingContext(document); >- if (!context) >+ if (!m_networkingContext) > return false; >- return context->networkAccessManager()->cookieJar(); >+ return m_networkingContext->networkAccessManager()->cookieJar(); > } > >-bool getRawCookies(const Document*, const KURL&, Vector<Cookie>& rawCookies) >+bool CookieJar::getRawCookies(const KURL& /*url*/, const KURL& /*firstPartyForCookies*/, Vector<Cookie>& rawCookies) > { > // FIXME: Not yet implemented > rawCookies.clear(); > return false; // return true when implemented > } > >-void deleteCookie(const Document*, const KURL&, const String&) >+void CookieJar::deleteCookie(const KURL& /*url*/, const String& /*cookieName*/) > { > // FIXME: Not yet implemented > } > >-void getHostnamesWithCookies(HashSet<String>& hostnames) >+void CookieJar::getHostnamesWithCookies(HashSet<String>& hostnames) > { > SharedCookieJarQt* jar = SharedCookieJarQt::shared(); > if (jar) > jar->getHostnamesWithCookies(hostnames); > } > >-void deleteCookiesForHostname(const String& hostname) >+void CookieJar::deleteCookiesForHostname(const String& hostname) > { > SharedCookieJarQt* jar = SharedCookieJarQt::shared(); > if (jar) > jar->deleteCookiesForHostname(hostname); > } > >-void deleteAllCookies() >+void CookieJar::deleteAllCookies() > { > SharedCookieJarQt* jar = SharedCookieJarQt::shared(); > if (jar) >Index: Source/WebCore/plugins/PluginView.cpp >=================================================================== >--- Source/WebCore/plugins/PluginView.cpp (revision 133809) >+++ Source/WebCore/plugins/PluginView.cpp (working copy) >@@ -1392,7 +1392,7 @@ NPError PluginView::getValueForURL(NPNUR > if (u.isValid()) { > Frame* frame = getFrame(parentFrame(), m_element); > if (frame) { >- const CString cookieStr = cookies(frame->document(), u).utf8(); >+ const CString cookieStr = frame->loader()->client()->cookieJar().cookies(u, frame->document()->firstPartyForCookies()).utf8(); > if (!cookieStr.isNull()) { > const int size = cookieStr.length(); > *value = static_cast<char*>(NPN_MemAlloc(size+1)); >@@ -1454,7 +1454,7 @@ NPError PluginView::setValueForURL(NPNUR > const String cookieStr = String::fromUTF8(value, len); > Frame* frame = getFrame(parentFrame(), m_element); > if (frame && !cookieStr.isEmpty()) >- setCookies(frame->document(), u, cookieStr); >+ frame->loader()->client()->cookieJar().setCookies(u, frame->document()->firstPartyForCookies(), cookieStr); > } else > result = NPERR_INVALID_URL; > break; >Index: Source/WebKit2/ChangeLog >=================================================================== >--- Source/WebKit2/ChangeLog (revision 133891) >+++ Source/WebKit2/ChangeLog (working copy) >@@ -1,3 +1,20 @@ >+2012-11-08 Mark Pilgrim <pilgrim@chromium.org> >+ >+ [Chromium] Remove cookie-related functions from PlatformSupport >+ https://bugs.webkit.org/show_bug.cgi?id=99340 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!). >+ >+ * WebProcess/Cookies/WebCookieManager.cpp: >+ (WebKit::WebCookieManager::getHostnamesWithCookies): >+ (WebKit::WebCookieManager::deleteCookiesForHostname): >+ (WebKit::WebCookieManager::deleteAllCookies): >+ * WebProcess/Plugins/PluginView.cpp: >+ (WebKit::PluginView::cookiesForURL): >+ (WebKit::PluginView::setCookiesForURL): >+ > 2012-11-08 Simon Hausmann <simon.hausmann@digia.com> > > [Qt] Fix build without WebKit1 >Index: Source/WebKit2/WebProcess/Cookies/WebCookieManager.cpp >=================================================================== >--- Source/WebKit2/WebProcess/Cookies/WebCookieManager.cpp (revision 133809) >+++ Source/WebKit2/WebProcess/Cookies/WebCookieManager.cpp (working copy) >@@ -57,7 +57,7 @@ void WebCookieManager::getHostnamesWithC > > HashSet<String> hostnames; > >- WebCore::getHostnamesWithCookies(hostnames); >+ WebCore::CookieJar().getHostnamesWithCookies(hostnames); > > Vector<String> hostnameList; > copyToVector(hostnames, hostnameList); >@@ -69,14 +69,14 @@ void WebCookieManager::deleteCookiesForH > { > WebProcess::LocalTerminationDisabler terminationDisabler(WebProcess::shared()); > >- WebCore::deleteCookiesForHostname(hostname); >+ WebCore::CookieJar().deleteCookiesForHostname(hostname); > } > > void WebCookieManager::deleteAllCookies() > { > WebProcess::LocalTerminationDisabler terminationDisabler(WebProcess::shared()); > >- WebCore::deleteAllCookies(); >+ WebCore::CookieJar().deleteAllCookies(); > } > > void WebCookieManager::startObservingCookieChanges() >Index: Source/WebKit2/WebProcess/Plugins/PluginView.cpp >=================================================================== >--- Source/WebKit2/WebProcess/Plugins/PluginView.cpp (revision 133809) >+++ Source/WebKit2/WebProcess/Plugins/PluginView.cpp (working copy) >@@ -1309,12 +1309,19 @@ String PluginView::proxiesForURL(const S > > String PluginView::cookiesForURL(const String& urlString) > { >- return cookies(m_pluginElement->document(), KURL(KURL(), urlString)); >+ Document* document = m_pluginElement->document(); >+ Frame* frame = document->frame(); >+ if (!frame) >+ return String(); >+ return frame->loader()->client()->cookieJar().cookies(KURL(KURL(), urlString), document->firstPartyForCookies()); > } > > void PluginView::setCookiesForURL(const String& urlString, const String& cookieString) > { >- setCookies(m_pluginElement->document(), KURL(KURL(), urlString), cookieString); >+ Document* document = m_pluginElement->document(); >+ Frame* frame = document->frame(); >+ if (frame) >+ frame->loader()->client()->cookieJar().setCookies(KURL(KURL(), urlString), document->firstPartyForCookies(), cookieString); > } > > bool PluginView::getAuthenticationInfo(const ProtectionSpace& protectionSpace, String& username, String& password) >Index: Source/WebKit/chromium/ChangeLog >=================================================================== >--- Source/WebKit/chromium/ChangeLog (revision 133891) >+++ Source/WebKit/chromium/ChangeLog (working copy) >@@ -1,3 +1,20 @@ >+2012-11-08 Mark Pilgrim <pilgrim@chromium.org> >+ >+ [Chromium] Remove cookie-related functions from PlatformSupport >+ https://bugs.webkit.org/show_bug.cgi?id=99340 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!). >+ >+ * src/FrameLoaderClientImpl.cpp: >+ (WebKit::FrameLoaderClientImpl::cookieJar): >+ (WebKit): >+ * src/FrameLoaderClientImpl.h: >+ (FrameLoaderClientImpl): >+ * src/PlatformSupport.cpp: >+ (WebCore): >+ > 2012-11-08 Yury Semikhatsky <yurys@chromium.org> > > Web Inspector: move front-end methods called from native part to InspectorFrontendAPI >Index: Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp >=================================================================== >--- Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp (revision 133809) >+++ Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp (working copy) >@@ -1662,4 +1662,14 @@ void FrameLoaderClientImpl::didRequestAu > } > #endif > >+WebCore::CookieJar FrameLoaderClientImpl::cookieJar() >+{ >+ if (!m_webFrame || !m_webFrame->client()) >+ return WebCore::CookieJar(0); >+ WebCookieJar* webCookieJar = m_webFrame->client()->cookieJar(m_webFrame); >+ if (!webCookieJar) >+ webCookieJar = WebKit::Platform::current()->cookieJar(); >+ return WebCore::CookieJar(webCookieJar); >+} >+ > } // namespace WebKit >Index: Source/WebKit/chromium/src/FrameLoaderClientImpl.h >=================================================================== >--- Source/WebKit/chromium/src/FrameLoaderClientImpl.h (revision 133809) >+++ Source/WebKit/chromium/src/FrameLoaderClientImpl.h (working copy) >@@ -229,6 +229,8 @@ public: > virtual void didRequestAutocomplete(PassRefPtr<WebCore::FormState>) OVERRIDE; > #endif > >+ virtual WebCore::CookieJar cookieJar() OVERRIDE; >+ > private: > void makeDocumentView(); > >Index: Source/WebKit/chromium/src/PlatformSupport.cpp >=================================================================== >--- Source/WebKit/chromium/src/PlatformSupport.cpp (revision 133809) >+++ Source/WebKit/chromium/src/PlatformSupport.cpp (working copy) >@@ -100,86 +100,6 @@ using namespace WebKit; > > namespace WebCore { > >-static WebCookieJar* getCookieJar(const Document* document) >-{ >- WebFrameImpl* frameImpl = WebFrameImpl::fromFrame(document->frame()); >- if (!frameImpl || !frameImpl->client()) >- return 0; >- WebCookieJar* cookieJar = frameImpl->client()->cookieJar(frameImpl); >- if (!cookieJar) >- cookieJar = WebKit::Platform::current()->cookieJar(); >- return cookieJar; >-} >- >-// Cookies -------------------------------------------------------------------- >- >-void PlatformSupport::setCookies(const Document* document, const KURL& url, >- const String& value) >-{ >- WebCookieJar* cookieJar = getCookieJar(document); >- if (cookieJar) >- cookieJar->setCookie(url, document->firstPartyForCookies(), value); >-} >- >-String PlatformSupport::cookies(const Document* document, const KURL& url) >-{ >- String result; >- WebCookieJar* cookieJar = getCookieJar(document); >- if (cookieJar) >- result = cookieJar->cookies(url, document->firstPartyForCookies()); >- return result; >-} >- >-String PlatformSupport::cookieRequestHeaderFieldValue(const Document* document, >- const KURL& url) >-{ >- String result; >- WebCookieJar* cookieJar = getCookieJar(document); >- if (cookieJar) >- result = cookieJar->cookieRequestHeaderFieldValue(url, document->firstPartyForCookies()); >- return result; >-} >- >-bool PlatformSupport::rawCookies(const Document* document, const KURL& url, Vector<Cookie>& rawCookies) >-{ >- rawCookies.clear(); >- WebVector<WebCookie> webCookies; >- >- WebCookieJar* cookieJar = getCookieJar(document); >- if (cookieJar) >- cookieJar->rawCookies(url, document->firstPartyForCookies(), webCookies); >- >- for (unsigned i = 0; i < webCookies.size(); ++i) { >- const WebCookie& webCookie = webCookies[i]; >- Cookie cookie(webCookie.name, >- webCookie.value, >- webCookie.domain, >- webCookie.path, >- webCookie.expires, >- webCookie.httpOnly, >- webCookie.secure, >- webCookie.session); >- rawCookies.append(cookie); >- } >- return true; >-} >- >-void PlatformSupport::deleteCookie(const Document* document, const KURL& url, const String& cookieName) >-{ >- WebCookieJar* cookieJar = getCookieJar(document); >- if (cookieJar) >- cookieJar->deleteCookie(url, cookieName); >-} >- >-bool PlatformSupport::cookiesEnabled(const Document* document) >-{ >- bool result = false; >- WebCookieJar* cookieJar = getCookieJar(document); >- if (cookieJar) >- result = cookieJar->cookiesEnabled(document->cookieURL(), document->firstPartyForCookies()); >- return result; >-} >- > // Font ----------------------------------------------------------------------- > > #if OS(WINDOWS) >Index: Source/WebKit/efl/ChangeLog >=================================================================== >--- Source/WebKit/efl/ChangeLog (revision 133891) >+++ Source/WebKit/efl/ChangeLog (working copy) >@@ -1,3 +1,19 @@ >+2012-11-08 Mark Pilgrim <pilgrim@chromium.org> >+ >+ [Chromium] Remove cookie-related functions from PlatformSupport >+ https://bugs.webkit.org/show_bug.cgi?id=99340 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!). >+ >+ * WebCoreSupport/FrameLoaderClientEfl.cpp: >+ (WebCore::FrameLoaderClientEfl::cookieJar): >+ (WebCore): >+ * WebCoreSupport/FrameLoaderClientEfl.h: >+ (WebCore): >+ (FrameLoaderClientEfl): >+ > 2012-11-07 Emil A Eklund <eae@chromium.org> > > Unreviewed EFL build fix. >Index: Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp >=================================================================== >--- Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp (revision 133809) >+++ Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp (working copy) >@@ -1053,4 +1053,14 @@ PassRefPtr<FrameNetworkingContext> Frame > return FrameNetworkingContextEfl::create(EWKPrivate::coreFrame(m_frame), m_frame); > } > >+WebCore::CookieJar FrameLoaderClientEfl::cookieJar() >+{ >+ if (!m_frame) >+ return WebCore::CookieJar(0); >+ WebCore::Frame* frame = EWKPrivate::coreFrame(m_frame); >+ if (!frame || !frame->loader()) >+ return WebCore::CookieJar(0); >+ return WebCore::CookieJar(frame->loader()->networkingContext()); >+} >+ > } >Index: Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h >=================================================================== >--- Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h (revision 133809) >+++ Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h (working copy) >@@ -33,6 +33,7 @@ > #ifndef FrameLoaderClientEfl_h > #define FrameLoaderClientEfl_h > >+#include "CookieJar.h" > #include "EWebKit.h" > #include "FrameLoaderClient.h" > #include "PluginView.h" >@@ -41,6 +42,7 @@ > > namespace WebCore { > >+class CookieJar; > class FormState; > > class FrameLoaderClientEfl : public FrameLoaderClient { >@@ -210,6 +212,9 @@ class FrameLoaderClientEfl : public Fram > virtual void download(ResourceHandle*, const ResourceRequest&, const ResourceResponse&); > > virtual PassRefPtr<WebCore::FrameNetworkingContext> createNetworkingContext(); >+ >+ virtual WebCore::CookieJar cookieJar() OVERRIDE; >+ > private: > bool isLoadingMainFrame() const { return m_frame == ewk_view_frame_main_get(m_view); } > >Index: Source/WebKit/gtk/ChangeLog >=================================================================== >--- Source/WebKit/gtk/ChangeLog (revision 133891) >+++ Source/WebKit/gtk/ChangeLog (working copy) >@@ -1,3 +1,18 @@ >+2012-11-08 Mark Pilgrim <pilgrim@chromium.org> >+ >+ [Chromium] Remove cookie-related functions from PlatformSupport >+ https://bugs.webkit.org/show_bug.cgi?id=99340 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!). >+ >+ * WebCoreSupport/FrameLoaderClientGtk.cpp: >+ (WebKit::FrameLoaderClient::cookieJar): >+ (WebKit): >+ * WebCoreSupport/FrameLoaderClientGtk.h: >+ (FrameLoaderClient): >+ > 2012-11-05 Simon Fraser <simon.fraser@apple.com> > > Fix layer borders to cleaning appear and disappear on switching >Index: Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp >=================================================================== >--- Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp (revision 133809) >+++ Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp (working copy) >@@ -1261,4 +1261,14 @@ PassRefPtr<FrameNetworkingContext> Frame > return FrameNetworkingContextGtk::create(core(m_frame)); > } > >+WebCore::CookieJar FrameLoaderClient::cookieJar() >+{ >+ if (!m_frame) >+ return WebCore::CookieJar(0); >+ WebCore::Frame* frame = core(m_frame); >+ if (!frame || !frame->loader()) >+ return WebCore::CookieJar(0); >+ return WebCore::CookieJar(frame->loader()->networkingContext()); >+} >+ > } >Index: Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h >=================================================================== >--- Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h (revision 133809) >+++ Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h (working copy) >@@ -30,6 +30,7 @@ > #ifndef FrameLoaderClientGtk_h > #define FrameLoaderClientGtk_h > >+#include "CookieJar.h" > #include "FrameLoaderClient.h" > #include "ResourceResponse.h" > #include "PluginView.h" >@@ -188,6 +189,8 @@ namespace WebKit { > > virtual PassRefPtr<WebCore::FrameNetworkingContext> createNetworkingContext(); > >+ virtual WebCore::CookieJar cookieJar() OVERRIDE; >+ > private: > WebKitWebFrame* m_frame; > WebCore::ResourceResponse m_response; >Index: Source/WebKit/mac/ChangeLog >=================================================================== >--- Source/WebKit/mac/ChangeLog (revision 133891) >+++ Source/WebKit/mac/ChangeLog (working copy) >@@ -1,3 +1,19 @@ >+2012-11-08 Mark Pilgrim <pilgrim@chromium.org> >+ >+ [Chromium] Remove cookie-related functions from PlatformSupport >+ https://bugs.webkit.org/show_bug.cgi?id=99340 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!). >+ >+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm: >+ (WebKit::NetscapePluginInstanceProxy::getCookies): >+ (WebKit::NetscapePluginInstanceProxy::setCookies): >+ * Plugins/WebNetscapePluginView.mm: >+ (-[WebNetscapePluginView getVariable:forURL:value:length:]): >+ (-[WebNetscapePluginView setVariable:forURL:value:length:]): >+ > 2012-11-07 Andreas Kling <akling@apple.com> > > Remove build-webkit dependency on Java SDK for Apple Mac WebKit. >Index: Source/WebKit/mac/Plugins/WebNetscapePluginView.mm >=================================================================== >--- Source/WebKit/mac/Plugins/WebNetscapePluginView.mm (revision 133809) >+++ Source/WebKit/mac/Plugins/WebNetscapePluginView.mm (working copy) >@@ -61,6 +61,7 @@ > #import <WebCore/Element.h> > #import <WebCore/Frame.h> > #import <WebCore/FrameLoader.h> >+#import <WebCore/FrameLoaderClient.h> > #import <WebCore/FrameTree.h> > #import <WebCore/FrameView.h> > #import <WebCore/HTMLPlugInElement.h> >@@ -2216,7 +2217,7 @@ - (NPError)getVariable:(NPNURLVariable)v > break; > > if (Frame* frame = core([self webFrame])) { >- String cookieString = cookies(frame->document(), URL); >+ String cookieString = frame->loader()->client()->cookieJar().cookies(URL, frame->document()->firstPartyForCookies()); > CString cookieStringUTF8 = cookieString.utf8(); > if (cookieStringUTF8.isNull()) > return NPERR_GENERIC_ERROR; >@@ -2270,7 +2271,7 @@ - (NPError)setVariable:(NPNURLVariable)v > break; > > if (Frame* frame = core([self webFrame])) { >- setCookies(frame->document(), URL, cookieString); >+ frame->loader()->client()->cookieJar().setCookies(URL, frame->document()->firstPartyForCookies(), cookieString); > return NPERR_NO_ERROR; > } > >Index: Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm >=================================================================== >--- Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm (revision 133809) >+++ Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm (working copy) >@@ -51,6 +51,7 @@ > #import <WebCore/DocumentLoader.h> > #import <WebCore/Frame.h> > #import <WebCore/FrameLoader.h> >+#import <WebCore/FrameLoaderClient.h> > #import <WebCore/FrameTree.h> > #import <WebCore/KURL.h> > #import <WebCore/ProxyServer.h> >@@ -1515,7 +1516,7 @@ bool NetscapePluginInstanceProxy::getCoo > return false; > > if (Frame* frame = core([m_pluginView webFrame])) { >- String cookieString = cookies(frame->document(), url); >+ String cookieString = frame->loader()->client()->cookieJar().cookies(url, frame->document()->firstPartyForCookies()); > WTF::CString cookieStringUTF8 = cookieString.utf8(); > if (cookieStringUTF8.isNull()) > return false; >@@ -1543,7 +1544,7 @@ bool NetscapePluginInstanceProxy::setCoo > if (!cookieString) > return false; > >- WebCore::setCookies(frame->document(), url, cookieString); >+ frame->loader()->client()->cookieJar().setCookies(url, frame->document()->firstPartyForCookies(), cookieString); > return true; > } > >Index: Source/WebKit/qt/ChangeLog >=================================================================== >--- Source/WebKit/qt/ChangeLog (revision 133891) >+++ Source/WebKit/qt/ChangeLog (working copy) >@@ -1,3 +1,19 @@ >+2012-11-08 Mark Pilgrim <pilgrim@chromium.org> >+ >+ [Chromium] Remove cookie-related functions from PlatformSupport >+ https://bugs.webkit.org/show_bug.cgi?id=99340 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!). >+ >+ * WebCoreSupport/FrameLoaderClientQt.cpp: >+ (WebCore::FrameLoaderClientQt::cookieJar): >+ (WebCore): >+ * WebCoreSupport/FrameLoaderClientQt.h: >+ (WebCore): >+ (FrameLoaderClientQt): >+ > 2012-11-07 Allan Sandfeld Jensen <allan.jensen@digia.com> > > [Qt] Open link in this window action >Index: Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp >=================================================================== >--- Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp (revision 133809) >+++ Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp (working copy) >@@ -1676,6 +1676,13 @@ void FrameLoaderClientQt::emitLoadFinish > emit m_webFrame->loadFinished(ok); > } > >+WebCore::CookieJar FrameLoaderClientQt::cookieJar() >+{ >+ if (!m_frame || !m_frame->loader()) >+ return WebCore::CookieJar(0); >+ return WebCore::CookieJar(m_frame->loader()->networkingContext()); >+} >+ > } > > #include "moc_FrameLoaderClientQt.cpp" >Index: Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h >=================================================================== >--- Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h (revision 133809) >+++ Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h (working copy) >@@ -31,6 +31,7 @@ > #define FrameLoaderClientQt_h > > >+#include "CookieJar.h" > #include "Frame.h" > #include "FrameLoader.h" > #include "FrameLoaderClient.h" >@@ -53,6 +54,7 @@ class QWebFrame; > namespace WebCore { > > class AuthenticationChallenge; >+class CookieJar; > class DocumentLoader; > class Element; > class FormState; >@@ -227,6 +229,8 @@ public: > > const KURL& lastRequestedUrl() const { return m_lastRequestedUrl; } > >+ virtual WebCore::CookieJar cookieJar() OVERRIDE; >+ > static bool dumpFrameLoaderCallbacks; > static bool dumpProgressFinishedCallback; > static bool dumpUserGestureInFrameLoaderCallbacks;
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 99340
:
168741
|
169674
|
169683
|
170450
|
170456
|
170459
|
171274
|
171280
|
171282
|
171284
|
171287
|
171290
|
171293
|
171296
|
171684
|
171848
|
171875
|
171908
|
172373
|
172384
|
172862
|
172878
|
173031
|
174188
|
174206
|
174675
|
174753