WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Fix Extra Semicolons in Haiku
cookie_8.patch (text/plain), 17.79 KB, created by
Joseph Pecoraro
on 2009-08-13 08:33:37 PDT
(
hide
)
Description:
Fix Extra Semicolons in Haiku
Filename:
MIME Type:
Creator:
Joseph Pecoraro
Created:
2009-08-13 08:33:37 PDT
Size:
17.79 KB
patch
obsolete
>diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog >index e5f27a3..a36bc06 100644 >--- a/WebCore/ChangeLog >+++ b/WebCore/ChangeLog >@@ -1,3 +1,53 @@ >+2009-08-12 Joseph Pecoraro <joepeck02@gmail.com> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Inspector: Show Hidden Cookie Data >+ https://bugs.webkit.org/show_bug.cgi?id=28185 >+ >+ Added new file Cookie.h to the WebCore XCode >+ >+ * WebCore.xcodeproj/project.pbxproj: >+ >+ InspectorController.cookies() binding >+ >+ * bindings/js/JSInspectorBackendCustom.cpp: >+ (WebCore::JSInspectorBackend::cookies): >+ * inspector/InspectorBackend.idl: >+ >+ Struct for static Cookie information >+ (name, value, path, domain, expires, httpOnly, secure, session) >+ >+ * platform/Cookie.h: Added. >+ (WebCore::Cookie::Cookie): >+ >+ Getter for the a list of raw Cookies >+ getRawCookies(., ., out Vector<Cookie>) >+ >+ * platform/CookieJar.h: >+ >+ Implementation of getRawCookies for the mac platform. >+ >+ * platform/mac/CookieJar.mm: >+ (WebCore::getRawCookies): >+ >+ Stub other CookieJar implementations to satisfy the interface. >+ >+ * platform/haiku/CookieJarHaiku.cpp: >+ (WebCore::getRawCookies): >+ * platform/network/chromium/CookieJarChromium.cpp: >+ (WebCore::getRawCookies): >+ * platform/network/curl/CookieJarCurl.cpp: >+ (WebCore::getRawCookies): >+ * platform/network/soup/CookieJarSoup.cpp: >+ (WebCore::getRawCookies): >+ * platform/network/win/CookieJarCFNetWin.cpp: >+ (WebCore::getRawCookies): >+ * platform/network/win/CookieJarWin.cpp: >+ (WebCore::getRawCookies): >+ * platform/qt/CookieJarQt.cpp: >+ (WebCore::getRawCookies): >+ > 2009-08-12 George Wright <george.wright@torchmobile.com> > > Reviewed by David Hyatt. >diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj >index 303a2bc..36986c4 100644 >--- a/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -4399,6 +4399,7 @@ > D23CA55D0AB0EAAE005108A5 /* JSRangeException.h in Headers */ = {isa = PBXBuildFile; fileRef = D23CA55C0AB0EAAE005108A5 /* JSRangeException.h */; }; > D23CA55F0AB0EAB6005108A5 /* JSRangeException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D23CA55E0AB0EAB6005108A5 /* JSRangeException.cpp */; }; > D23CA56C0AB0EB8D005108A5 /* RangeException.h in Headers */ = {isa = PBXBuildFile; fileRef = D23CA56B0AB0EB8D005108A5 /* RangeException.h */; }; >+ D8B6152F1032495100C8554A /* Cookie.h in Headers */ = {isa = PBXBuildFile; fileRef = D8B6152E1032495100C8554A /* Cookie.h */; }; > DB23C2CB0A508D29002489EB /* IndentOutdentCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DB23C2C90A508D29002489EB /* IndentOutdentCommand.cpp */; }; > DB23C2CC0A508D29002489EB /* IndentOutdentCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = DB23C2CA0A508D29002489EB /* IndentOutdentCommand.h */; }; > DD05FE0D0B8BA3C6009ACDFE /* WebCoreObjCExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = DD05FE0B0B8BA3C6009ACDFE /* WebCoreObjCExtras.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -9330,6 +9331,7 @@ > D23CA55C0AB0EAAE005108A5 /* JSRangeException.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSRangeException.h; sourceTree = "<group>"; }; > D23CA55E0AB0EAB6005108A5 /* JSRangeException.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSRangeException.cpp; sourceTree = "<group>"; }; > D23CA56B0AB0EB8D005108A5 /* RangeException.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RangeException.h; sourceTree = "<group>"; }; >+ D8B6152E1032495100C8554A /* Cookie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Cookie.h; sourceTree = "<group>"; }; > DB23C2C90A508D29002489EB /* IndentOutdentCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IndentOutdentCommand.cpp; sourceTree = "<group>"; }; > DB23C2CA0A508D29002489EB /* IndentOutdentCommand.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IndentOutdentCommand.h; sourceTree = "<group>"; }; > DD05FE0B0B8BA3C6009ACDFE /* WebCoreObjCExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebCoreObjCExtras.h; sourceTree = "<group>"; }; >@@ -14132,6 +14134,7 @@ > 93B6A0E70B0BCA6700F5027A /* ContextMenu.cpp */, > 93B6A0E50B0BCA5C00F5027A /* ContextMenu.h */, > 06027CAC0B1CBFC000884B2D /* ContextMenuItem.h */, >+ D8B6152E1032495100C8554A /* Cookie.h */, > 9352088109BD45E900F2038D /* CookieJar.h */, > 2E4346560F546A9900B0F1BA /* CrossThreadCopier.cpp */, > 2E4346570F546A9900B0F1BA /* CrossThreadCopier.h */, >@@ -17259,6 +17262,7 @@ > 49484FCE102CF23C00187DD3 /* CanvasStyle.h in Headers */, > 416E29A6102FA962007FC14E /* WorkerReportingProxy.h in Headers */, > B5C1123C102B6C4600096578 /* SQLTransactionCoordinator.h in Headers */, >+ D8B6152F1032495100C8554A /* Cookie.h in Headers */, > ); > runOnlyForDeploymentPostprocessing = 0; > }; >diff --git a/WebCore/bindings/js/JSInspectorBackendCustom.cpp b/WebCore/bindings/js/JSInspectorBackendCustom.cpp >index b2eb2d1..b078016 100644 >--- a/WebCore/bindings/js/JSInspectorBackendCustom.cpp >+++ b/WebCore/bindings/js/JSInspectorBackendCustom.cpp >@@ -34,6 +34,8 @@ > #include "JSInspectorBackend.h" > > #include "Console.h" >+#include "Cookie.h" >+#include "CookieJar.h" > #if ENABLE(DATABASE) > #include "Database.h" > #include "JSDatabase.h" >@@ -158,6 +160,46 @@ JSValue JSInspectorBackend::inspectedWindow(ExecState*, const ArgList&) > return JSInspectedObjectWrapper::wrap(inspectedWindow->globalExec(), inspectedWindow); > } > >+JSValue JSInspectorBackend::cookies(ExecState* exec, const ArgList&) >+{ >+ InspectorController* ic = impl()->inspectorController(); >+ if (!ic) >+ return jsUndefined(); >+ >+ Document* document = ic->inspectedPage()->mainFrame()->document(); >+ Vector<Cookie> cookies; >+ getRawCookies(document, document->cookieURL(), cookies); >+ >+ MarkedArgumentBuffer result; >+ Identifier nameIdentifier(exec, "name"); >+ Identifier valueIdentifier(exec, "value"); >+ Identifier domainIdentifier(exec, "domain"); >+ Identifier pathIdentifier(exec, "path"); >+ Identifier expiresIdentifier(exec, "expires"); >+ Identifier sizeIdentifier(exec, "size"); >+ Identifier httpOnlyIdentifier(exec, "httpOnly"); >+ Identifier secureIdentifier(exec, "secure"); >+ Identifier sessionIdentifier(exec, "session"); >+ >+ unsigned length = cookies.size(); >+ for (unsigned i = 0; i < length; ++i) { >+ const Cookie& cookie = cookies[i]; >+ JSObject* cookieObject = constructEmptyObject(exec); >+ cookieObject->putDirect(nameIdentifier, jsString(exec, cookie.name)); >+ cookieObject->putDirect(valueIdentifier, jsString(exec, cookie.value)); >+ cookieObject->putDirect(domainIdentifier, jsString(exec, cookie.domain)); >+ cookieObject->putDirect(pathIdentifier, jsString(exec, cookie.path)); >+ cookieObject->putDirect(expiresIdentifier, jsNumber(exec, cookie.expires)); >+ cookieObject->putDirect(sizeIdentifier, jsNumber(exec, cookie.name.length() + cookie.value.length())); >+ cookieObject->putDirect(httpOnlyIdentifier, jsBoolean(cookie.httpOnly)); >+ cookieObject->putDirect(secureIdentifier, jsBoolean(cookie.secure)); >+ cookieObject->putDirect(sessionIdentifier, jsBoolean(cookie.session)); >+ result.append(cookieObject); >+ } >+ >+ return constructArray(exec, result); >+} >+ > JSValue JSInspectorBackend::setting(ExecState* exec, const ArgList& args) > { > if (args.size() < 1) >diff --git a/WebCore/inspector/InspectorBackend.idl b/WebCore/inspector/InspectorBackend.idl >index bae1f26..769a208 100644 >--- a/WebCore/inspector/InspectorBackend.idl >+++ b/WebCore/inspector/InspectorBackend.idl >@@ -68,6 +68,8 @@ module core { > void disableResourceTracking(in boolean always); > void storeLastActivePanel(in DOMString panelName); > >+ [Custom] Array cookies(); >+ > #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER > boolean debuggerEnabled(); > void enableDebugger(in boolean always); >diff --git a/WebCore/platform/Cookie.h b/WebCore/platform/Cookie.h >new file mode 100644 >index 0000000..f646d3a >--- /dev/null >+++ b/WebCore/platform/Cookie.h >@@ -0,0 +1,60 @@ >+/* >+ * Copyright (C) 2009 Joseph Pecoraro. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef Cookie_h >+#define Cookie_h >+ >+#include "PlatformString.h" >+ >+namespace WebCore { >+ >+ struct Cookie { >+ Cookie(const String& name, const String& value, const String& domain, >+ const String& path, double expires, bool httpOnly, bool secure, >+ bool session) >+ : name(name) >+ , value(value) >+ , domain(domain) >+ , path(path) >+ , expires(expires) >+ , httpOnly(httpOnly) >+ , secure(secure) >+ , session(session) >+ { >+ } >+ >+ String name; >+ String value; >+ String domain; >+ String path; >+ double expires; >+ bool httpOnly; >+ bool secure; >+ bool session; >+ }; >+ >+} >+ >+#endif >diff --git a/WebCore/platform/CookieJar.h b/WebCore/platform/CookieJar.h >index 6159386..bce640d 100644 >--- a/WebCore/platform/CookieJar.h >+++ b/WebCore/platform/CookieJar.h >@@ -26,15 +26,20 @@ > #ifndef CookieJar_h > #define CookieJar_h > >+#include <wtf/Vector.h> >+ > namespace WebCore { > >+ class Document; > class KURL; > class String; >- class Document; >+ >+ struct Cookie; > > String cookies(const Document*, const KURL&); > void setCookies(Document*, const KURL&, const String&); > bool cookiesEnabled(const Document*); >+ void getRawCookies(const Document*, const KURL&, Vector<Cookie>&); > > } > >diff --git a/WebCore/platform/haiku/CookieJarHaiku.cpp b/WebCore/platform/haiku/CookieJarHaiku.cpp >index 73519d7..fc5639b 100644 >--- a/WebCore/platform/haiku/CookieJarHaiku.cpp >+++ b/WebCore/platform/haiku/CookieJarHaiku.cpp >@@ -29,6 +29,7 @@ > #include "config.h" > #include "CookieJar.h" > >+#include "Cookie.h" > #include "KURL.h" > #include "PlatformString.h" > #include "StringHash.h" >@@ -41,12 +42,12 @@ namespace WebCore { > // FIXME: Shouldn't this be saved to and restored from disk too? > static HashMap<String, String> cookieJar; > >-void setCookies(const KURL& url, const KURL& /*policyURL*/, const String& value) >+void setCookies(Document*, const KURL& url, const String& value) > { > cookieJar.set(url.string(), value); > } > >-String cookies(const KURL& url) >+String cookies(const Document*, const KURL& url) > { > return cookieJar.get(url.string()); > } >@@ -57,5 +58,11 @@ bool cookiesEnabled() > return true; > } > >+void getRawCookies(const Document*, const KURL&, Vector<Cookie>& rawCookies) >+{ >+ // FIXME: Not yet implemented >+ rawCookies.clear(); >+} >+ > } // namespace WebCore > >diff --git a/WebCore/platform/mac/CookieJar.mm b/WebCore/platform/mac/CookieJar.mm >index d8df601..06391ed 100644 >--- a/WebCore/platform/mac/CookieJar.mm >+++ b/WebCore/platform/mac/CookieJar.mm >@@ -27,6 +27,7 @@ > #import "CookieJar.h" > > #import "BlockExceptions.h" >+#import "Cookie.h" > #import "Document.h" > #import "KURL.h" > #import <wtf/RetainPtr.h> >@@ -116,4 +117,30 @@ bool cookiesEnabled(const Document*) > return false; > } > >+void getRawCookies(const Document*, const KURL& url, Vector<Cookie>& rawCookies) >+{ >+ rawCookies.clear(); >+ BEGIN_BLOCK_OBJC_EXCEPTIONS; >+ >+ NSURL *cookieURL = url; >+ NSArray *cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:cookieURL]; >+ >+ NSUInteger count = [cookies count]; >+ rawCookies.reserveCapacity(count); >+ for (NSUInteger i = 0; i < count; ++i) { >+ NSHTTPCookie *cookie = (NSHTTPCookie *)[cookies objectAtIndex:i]; >+ NSString *name = [cookie name]; >+ NSString *value = [cookie value]; >+ NSString *domain = [cookie domain]; >+ NSString *path = [cookie path]; >+ NSTimeInterval expires = [[cookie expiresDate] timeIntervalSince1970] * 1000; >+ bool httpOnly = [cookie isHTTPOnly]; >+ bool secure = [cookie isSecure]; >+ bool session = [cookie isSessionOnly]; >+ rawCookies.uncheckedAppend(Cookie(name, value, domain, path, expires, httpOnly, secure, session)); >+ } >+ >+ END_BLOCK_OBJC_EXCEPTIONS; >+} >+ > } >diff --git a/WebCore/platform/network/chromium/CookieJarChromium.cpp b/WebCore/platform/network/chromium/CookieJarChromium.cpp >index 65be451..5f36a77 100644 >--- a/WebCore/platform/network/chromium/CookieJarChromium.cpp >+++ b/WebCore/platform/network/chromium/CookieJarChromium.cpp >@@ -31,6 +31,7 @@ > #include "config.h" > #include "CookieJar.h" > >+#include "Cookie.h" > #include "ChromiumBridge.h" > #include "Document.h" > >@@ -52,4 +53,10 @@ bool cookiesEnabled(const Document*) > return true; > } > >+void getRawCookies(const Document*, const KURL&, Vector<Cookie>& rawCookies) >+{ >+ // FIXME: Not yet implemented >+ rawCookies.clear(); >+} >+ > } // namespace WebCore >diff --git a/WebCore/platform/network/curl/CookieJarCurl.cpp b/WebCore/platform/network/curl/CookieJarCurl.cpp >index 5ac0f9c..38aed6e 100644 >--- a/WebCore/platform/network/curl/CookieJarCurl.cpp >+++ b/WebCore/platform/network/curl/CookieJarCurl.cpp >@@ -17,6 +17,7 @@ > #include "config.h" > #include "CookieJar.h" > >+#include "Cookie.h" > #include "Document.h" > #include "KURL.h" > #include "PlatformString.h" >@@ -43,4 +44,10 @@ bool cookiesEnabled(const Document* /*document*/) > return true; > } > >+void getRawCookies(const Document*, const KURL&, Vector<Cookie>& rawCookies) >+{ >+ // FIXME: Not yet implemented >+ rawCookies.clear(); >+} >+ > } >diff --git a/WebCore/platform/network/soup/CookieJarSoup.cpp b/WebCore/platform/network/soup/CookieJarSoup.cpp >index 705fdf2..3c7a113 100644 >--- a/WebCore/platform/network/soup/CookieJarSoup.cpp >+++ b/WebCore/platform/network/soup/CookieJarSoup.cpp >@@ -21,6 +21,7 @@ > #include "config.h" > #include "CookieJarSoup.h" > >+#include "Cookie.h" > #include "CString.h" > #include "Document.h" > #include "KURL.h" >@@ -86,4 +87,10 @@ bool cookiesEnabled(const Document* /*document*/) > return defaultCookieJar(); > } > >+void getRawCookies(const Document*, const KURL&, Vector<Cookie>& rawCookies) >+{ >+ // FIXME: Not yet implemented >+ rawCookies.clear(); >+} >+ > } >diff --git a/WebCore/platform/network/win/CookieJarCFNetWin.cpp b/WebCore/platform/network/win/CookieJarCFNetWin.cpp >index af9e3f3..3a1f57a 100644 >--- a/WebCore/platform/network/win/CookieJarCFNetWin.cpp >+++ b/WebCore/platform/network/win/CookieJarCFNetWin.cpp >@@ -26,6 +26,7 @@ > #include "config.h" > #include "CookieJar.h" > >+#include "Cookie.h" > #include "CookieStorageWin.h" > #include "Document.h" > #include "KURL.h" >@@ -113,4 +114,10 @@ bool cookiesEnabled(const Document* /*document*/) > return policy == CFHTTPCookieStorageAcceptPolicyOnlyFromMainDocumentDomain || policy == CFHTTPCookieStorageAcceptPolicyAlways; > } > >+void getRawCookies(const Document*, const KURL&, Vector<Cookie>& rawCookies) >+{ >+ // FIXME: Not yet implemented >+ rawCookies.clear(); >+} >+ > } >diff --git a/WebCore/platform/network/win/CookieJarWin.cpp b/WebCore/platform/network/win/CookieJarWin.cpp >index 41d12d9..eb70e7a 100644 >--- a/WebCore/platform/network/win/CookieJarWin.cpp >+++ b/WebCore/platform/network/win/CookieJarWin.cpp >@@ -26,6 +26,7 @@ > #include "config.h" > #include "CookieJar.h" > >+#include "Cookie.h" > #include "KURL.h" > #include "PlatformString.h" > #include "Document.h" >@@ -35,7 +36,6 @@ > > namespace WebCore { > >- > void setCookies(Document* /*document*/, const KURL& url, const String& value) > { > // FIXME: Deal with document->firstPartyForCookies(). >@@ -64,4 +64,10 @@ bool cookiesEnabled(const Document* /*document*/) > return true; > } > >+void getRawCookies(const Document*, const KURL&, Vector<Cookie>& rawCookies) >+{ >+ // FIXME: Not yet implemented >+ rawCookies.clear(); >+} >+ > } >diff --git a/WebCore/platform/qt/CookieJarQt.cpp b/WebCore/platform/qt/CookieJarQt.cpp >index 40d9309..69f65e2 100644 >--- a/WebCore/platform/qt/CookieJarQt.cpp >+++ b/WebCore/platform/qt/CookieJarQt.cpp >@@ -28,6 +28,7 @@ > #include "config.h" > #include "CookieJar.h" > >+#include "Cookie.h" > #include "Document.h" > #include "KURL.h" > #include "PlatformString.h" >@@ -128,6 +129,12 @@ bool cookiesEnabled(const Document* document) > #endif > } > >+void getRawCookies(const Document*, const KURL&, Vector<Cookie>& rawCookies) >+{ >+ // FIXME: Not yet implemented >+ rawCookies.clear(); >+} >+ > } > > // vim: ts=4 sw=4 et
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 28185
:
34592
|
34634
|
34660
|
34679
|
34692
|
34713
|
34742
|
34744
|
34746
|
34749