<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[47363] trunk/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/47363">47363</a></dd>
<dt>Author</dt> <dd>ariya@webkit.org</dd>
<dt>Date</dt> <dd>2009-08-17 08:57:39 -0700 (Mon, 17 Aug 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>2009-08-13  Joseph Pecoraro  &lt;joepeck02@gmail.com&gt;

        Reviewed by Timothy Hatcher.

        Inspector: Improve Cookie DataGrid to Show Hidden Data
        https://bugs.webkit.org/show_bug.cgi?id=28269

        * English.lproj/localizedStrings.js: DataGrid Headers &quot;Name&quot;, &quot;Value&quot;, &quot;Size&quot;, ...
        * WebCore.gypi: added missing files

          Implemented Bindings for InspectorController.deleteCookie(name)

        * inspector/InspectorBackend.idl:
        * bindings/js/JSInspectorBackendCustom.cpp:
        (WebCore::JSInspectorBackend::cookies):
        (WebCore::JSInspectorBackend::deleteCookie):

          v8 Bindings Stubs

        * bindings/v8/custom/V8CustomBinding.h:
        * bindings/v8/custom/V8InspectorBackendCustom.cpp:
        (WebCore::CALLBACK_FUNC_DECL):

          Removed WebInspector.Cookie

        * inspector/front-end/Cookie.js: Removed.
        * inspector/front-end/inspector.html:
        * inspector/front-end/WebKit.qrc:

          Improved DataGrid and Kept Fallback Behavior for Platforms that don't
          yet provide access to raw cookies.

        * inspector/front-end/CookieItemsView.js:
        (WebInspector.CookieItemsView):
        (WebInspector.CookieItemsView.prototype.get statusBarItems):
        (WebInspector.CookieItemsView.prototype.update):
        (WebInspector.CookieItemsView.prototype.buildCookies):
        (WebInspector.CookieItemsView.prototype.dataGridForCookies):
        (WebInspector.CookieItemsView.prototype.fallbackUpdate.callback):
        (WebInspector.CookieItemsView.prototype.fallbackUpdate):
        (WebInspector.CookieItemsView.prototype.fallbackBuildCookiesFromString):
        (WebInspector.CookieItemsView.prototype.fallbackDataGridForCookies):
        (WebInspector.CookieItemsView.prototype._deleteButtonClicked):

          Interaction with the page through Injected Script (for fallback behavior)

        * inspector/front-end/DOMAgent.js:
        (InspectorController.getCookies):
        * inspector/front-end/InjectedScript.js:
        (InjectedScript.setStyleProperty): style fix
        (InjectedScript.getCookies):

          Allow alignment of text inside DataGrids.

        * inspector/front-end/DataGrid.js:
        (WebInspector.DataGrid):
        (WebInspector.DataGridNode.prototype.createCell):
        * inspector/front-end/DatabasesPanel.js:
        (WebInspector.DatabasesPanel.prototype.dataGridForDOMStorage):
        * inspector/front-end/inspector.css:

          Added deleteCookie(., ., String name)
          Modified getRawCookies to return a bool to know if its implemented

        * platform/CookieJar.h:

          Implemented deleteCookie for Macs

        * platform/mac/CookieJar.mm:
        (WebCore::getRawCookies):
        (WebCore::deleteCookie):

          Stub Implementations for Other Platforms

        * platform/haiku/CookieJarHaiku.cpp:
        (WebCore::getRawCookies):
        (WebCore::deleteCookie):
        * platform/network/chromium/CookieJarChromium.cpp:
        (WebCore::getRawCookies):
        (WebCore::deleteCookie):
        * platform/network/curl/CookieJarCurl.cpp:
        (WebCore::getRawCookies):
        (WebCore::deleteCookie):
        * platform/network/soup/CookieJarSoup.cpp:
        (WebCore::getRawCookies):
        (WebCore::deleteCookie):
        * platform/network/win/CookieJarCFNetWin.cpp:
        (WebCore::getRawCookies):
        (WebCore::deleteCookie):
        * platform/network/win/CookieJarWin.cpp:
        (WebCore::getRawCookies):
        (WebCore::deleteCookie):
        * platform/qt/CookieJarQt.cpp:
        (WebCore::getRawCookies):
        (WebCore::deleteCookie):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCoreWebCoregypi">trunk/WebCore/WebCore.gypi</a></li>
<li><a href="#trunkWebCorebindingsjsJSInspectorBackendCustomcpp">trunk/WebCore/bindings/js/JSInspectorBackendCustom.cpp</a></li>
<li><a href="#trunkWebCorebindingsv8customV8CustomBindingh">trunk/WebCore/bindings/v8/custom/V8CustomBinding.h</a></li>
<li><a href="#trunkWebCorebindingsv8customV8InspectorBackendCustomcpp">trunk/WebCore/bindings/v8/custom/V8InspectorBackendCustom.cpp</a></li>
<li><a href="#trunkWebCoreinspectorInspectorBackendidl">trunk/WebCore/inspector/InspectorBackend.idl</a></li>
<li><a href="#trunkWebCoreinspectorfrontendCookieItemsViewjs">trunk/WebCore/inspector/front-end/CookieItemsView.js</a></li>
<li><a href="#trunkWebCoreinspectorfrontendDOMAgentjs">trunk/WebCore/inspector/front-end/DOMAgent.js</a></li>
<li><a href="#trunkWebCoreinspectorfrontendDataGridjs">trunk/WebCore/inspector/front-end/DataGrid.js</a></li>
<li><a href="#trunkWebCoreinspectorfrontendDatabasesPaneljs">trunk/WebCore/inspector/front-end/DatabasesPanel.js</a></li>
<li><a href="#trunkWebCoreinspectorfrontendInjectedScriptjs">trunk/WebCore/inspector/front-end/InjectedScript.js</a></li>
<li><a href="#trunkWebCoreinspectorfrontendWebKitqrc">trunk/WebCore/inspector/front-end/WebKit.qrc</a></li>
<li><a href="#trunkWebCoreinspectorfrontendinspectorcss">trunk/WebCore/inspector/front-end/inspector.css</a></li>
<li><a href="#trunkWebCoreinspectorfrontendinspectorhtml">trunk/WebCore/inspector/front-end/inspector.html</a></li>
<li><a href="#trunkWebCoreplatformCookieJarh">trunk/WebCore/platform/CookieJar.h</a></li>
<li><a href="#trunkWebCoreplatformhaikuCookieJarHaikucpp">trunk/WebCore/platform/haiku/CookieJarHaiku.cpp</a></li>
<li><a href="#trunkWebCoreplatformmacCookieJarmm">trunk/WebCore/platform/mac/CookieJar.mm</a></li>
<li><a href="#trunkWebCoreplatformnetworkchromiumCookieJarChromiumcpp">trunk/WebCore/platform/network/chromium/CookieJarChromium.cpp</a></li>
<li><a href="#trunkWebCoreplatformnetworkcurlCookieJarCurlcpp">trunk/WebCore/platform/network/curl/CookieJarCurl.cpp</a></li>
<li><a href="#trunkWebCoreplatformnetworksoupCookieJarSoupcpp">trunk/WebCore/platform/network/soup/CookieJarSoup.cpp</a></li>
<li><a href="#trunkWebCoreplatformnetworkwinCookieJarCFNetWincpp">trunk/WebCore/platform/network/win/CookieJarCFNetWin.cpp</a></li>
<li><a href="#trunkWebCoreplatformnetworkwinCookieJarWincpp">trunk/WebCore/platform/network/win/CookieJarWin.cpp</a></li>
<li><a href="#trunkWebCoreplatformqtCookieJarQtcpp">trunk/WebCore/platform/qt/CookieJarQt.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkWebCoreinspectorfrontendCookiejs">trunk/WebCore/inspector/front-end/Cookie.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/ChangeLog        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -1,3 +1,100 @@
</span><ins>+2009-08-13  Joseph Pecoraro  &lt;joepeck02@gmail.com&gt;
+
+        Reviewed by Timothy Hatcher.
+
+        Inspector: Improve Cookie DataGrid to Show Hidden Data
+        https://bugs.webkit.org/show_bug.cgi?id=28269
+
+        * English.lproj/localizedStrings.js: DataGrid Headers &quot;Name&quot;, &quot;Value&quot;, &quot;Size&quot;, ...
+        * WebCore.gypi: added missing files
+
+          Implemented Bindings for InspectorController.deleteCookie(name)
+
+        * inspector/InspectorBackend.idl:
+        * bindings/js/JSInspectorBackendCustom.cpp:
+        (WebCore::JSInspectorBackend::cookies):
+        (WebCore::JSInspectorBackend::deleteCookie):
+
+          v8 Bindings Stubs
+
+        * bindings/v8/custom/V8CustomBinding.h:
+        * bindings/v8/custom/V8InspectorBackendCustom.cpp:
+        (WebCore::CALLBACK_FUNC_DECL):
+
+          Removed WebInspector.Cookie
+
+        * inspector/front-end/Cookie.js: Removed.
+        * inspector/front-end/inspector.html:
+        * inspector/front-end/WebKit.qrc:
+
+          Improved DataGrid and Kept Fallback Behavior for Platforms that don't
+          yet provide access to raw cookies.
+
+        * inspector/front-end/CookieItemsView.js:
+        (WebInspector.CookieItemsView):
+        (WebInspector.CookieItemsView.prototype.get statusBarItems):
+        (WebInspector.CookieItemsView.prototype.update):
+        (WebInspector.CookieItemsView.prototype.buildCookies):
+        (WebInspector.CookieItemsView.prototype.dataGridForCookies):
+        (WebInspector.CookieItemsView.prototype.fallbackUpdate.callback):
+        (WebInspector.CookieItemsView.prototype.fallbackUpdate):
+        (WebInspector.CookieItemsView.prototype.fallbackBuildCookiesFromString):
+        (WebInspector.CookieItemsView.prototype.fallbackDataGridForCookies):
+        (WebInspector.CookieItemsView.prototype._deleteButtonClicked):
+
+          Interaction with the page through Injected Script (for fallback behavior)
+
+        * inspector/front-end/DOMAgent.js:
+        (InspectorController.getCookies):
+        * inspector/front-end/InjectedScript.js:
+        (InjectedScript.setStyleProperty): style fix
+        (InjectedScript.getCookies):
+
+          Allow alignment of text inside DataGrids.
+
+        * inspector/front-end/DataGrid.js:
+        (WebInspector.DataGrid):
+        (WebInspector.DataGridNode.prototype.createCell):
+        * inspector/front-end/DatabasesPanel.js:
+        (WebInspector.DatabasesPanel.prototype.dataGridForDOMStorage):
+        * inspector/front-end/inspector.css:
+
+          Added deleteCookie(., ., String name)
+          Modified getRawCookies to return a bool to know if its implemented
+
+        * platform/CookieJar.h:
+
+
+          Implemented deleteCookie for Macs
+
+        * platform/mac/CookieJar.mm:
+        (WebCore::getRawCookies):
+        (WebCore::deleteCookie):
+
+          Stub Implementations for Other Platforms
+
+        * platform/haiku/CookieJarHaiku.cpp:
+        (WebCore::getRawCookies):
+        (WebCore::deleteCookie):
+        * platform/network/chromium/CookieJarChromium.cpp:
+        (WebCore::getRawCookies):
+        (WebCore::deleteCookie):
+        * platform/network/curl/CookieJarCurl.cpp:
+        (WebCore::getRawCookies):
+        (WebCore::deleteCookie):
+        * platform/network/soup/CookieJarSoup.cpp:
+        (WebCore::getRawCookies):
+        (WebCore::deleteCookie):
+        * platform/network/win/CookieJarCFNetWin.cpp:
+        (WebCore::getRawCookies):
+        (WebCore::deleteCookie):
+        * platform/network/win/CookieJarWin.cpp:
+        (WebCore::getRawCookies):
+        (WebCore::deleteCookie):
+        * platform/qt/CookieJarQt.cpp:
+        (WebCore::getRawCookies):
+        (WebCore::deleteCookie):
+
</ins><span class="cx"> 2009-08-17  Adam Treat  &lt;adam.treat@torchmobile.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Blind build fix for Leopard.
</span></span></pre></div>
<a id="trunkWebCoreWebCoregypi"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.gypi (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.gypi        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/WebCore.gypi        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -2539,6 +2539,7 @@
</span><span class="cx">             'platform/ContextMenu.cpp',
</span><span class="cx">             'platform/ContextMenu.h',
</span><span class="cx">             'platform/ContextMenuItem.h',
</span><ins>+            'platform/Cookie.h',
</ins><span class="cx">             'platform/CookieJar.h',
</span><span class="cx">             'platform/CrossThreadCopier.h',
</span><span class="cx">             'platform/CrossThreadCopier.cpp',
</span><span class="lines">@@ -3426,6 +3427,7 @@
</span><span class="cx">             'inspector/front-end/ChangesView.js',
</span><span class="cx">             'inspector/front-end/Color.js',
</span><span class="cx">             'inspector/front-end/ConsoleView.js',
</span><ins>+            'inspector/front-end/CookieItemsView.js',
</ins><span class="cx">             'inspector/front-end/Database.js',
</span><span class="cx">             'inspector/front-end/DatabaseQueryView.js',
</span><span class="cx">             'inspector/front-end/DatabasesPanel.js',
</span><span class="lines">@@ -3483,6 +3485,7 @@
</span><span class="cx">             'inspector/front-end/Images/clearConsoleButtonGlyph.png',
</span><span class="cx">             'inspector/front-end/Images/closeButtons.png',
</span><span class="cx">             'inspector/front-end/Images/consoleButtonGlyph.png',
</span><ins>+            'inspector/front-end/Images/cookie.png',
</ins><span class="cx">             'inspector/front-end/Images/database.png',
</span><span class="cx">             'inspector/front-end/Images/databasesIcon.png',
</span><span class="cx">             'inspector/front-end/Images/databaseTable.png',
</span></span></pre></div>
<a id="trunkWebCorebindingsjsJSInspectorBackendCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bindings/js/JSInspectorBackendCustom.cpp (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bindings/js/JSInspectorBackendCustom.cpp        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/bindings/js/JSInspectorBackendCustom.cpp        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -2,6 +2,7 @@
</span><span class="cx">  * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
</span><span class="cx">  * Copyright (C) 2008 Matt Lilek &lt;webkit@mattlilek.com&gt;
</span><span class="cx">  * Copyright (C) 2009 Google Inc. All rights reserved.
</span><ins>+ * Copyright (C) 2009 Joseph Pecoraro
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions are
</span><span class="lines">@@ -163,8 +164,11 @@
</span><span class="cx"> 
</span><span class="cx">     Document* document = ic-&gt;inspectedPage()-&gt;mainFrame()-&gt;document();
</span><span class="cx">     Vector&lt;Cookie&gt; cookies;
</span><del>-    getRawCookies(document, document-&gt;cookieURL(), cookies);
</del><ins>+    bool isImplemented = getRawCookies(document, document-&gt;cookieURL(), cookies);
</ins><span class="cx"> 
</span><ins>+    if (!isImplemented)
+        return jsUndefined();
+
</ins><span class="cx">     MarkedArgumentBuffer result;
</span><span class="cx">     Identifier nameIdentifier(exec, &quot;name&quot;);
</span><span class="cx">     Identifier valueIdentifier(exec, &quot;value&quot;);
</span><span class="lines">@@ -195,6 +199,25 @@
</span><span class="cx">     return constructArray(exec, result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSValue JSInspectorBackend::deleteCookie(ExecState* exec, const ArgList&amp; args)
+{
+    if (args.size() &lt; 1)
+        return jsUndefined();
+
+    InspectorController* ic = impl()-&gt;inspectorController();
+    if (!ic)
+        return jsUndefined();
+
+    String cookieName = args.at(0).toString(exec);
+    if (exec-&gt;hadException())
+        return jsUndefined();
+
+    Document* document = ic-&gt;inspectedPage()-&gt;mainFrame()-&gt;document();
+    WebCore::deleteCookie(document, document-&gt;cookieURL(), cookieName);
+
+    return jsUndefined();
+}
+
</ins><span class="cx"> JSValue JSInspectorBackend::setting(ExecState* exec, const ArgList&amp; args)
</span><span class="cx"> {
</span><span class="cx">     if (args.size() &lt; 1)
</span></span></pre></div>
<a id="trunkWebCorebindingsv8customV8CustomBindingh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bindings/v8/custom/V8CustomBinding.h (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bindings/v8/custom/V8CustomBinding.h        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/bindings/v8/custom/V8CustomBinding.h        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -403,6 +403,7 @@
</span><span class="cx">         DECLARE_CALLBACK(InspectorBackendInspectedWindow);
</span><span class="cx">         DECLARE_CALLBACK(InspectorBackendSetSetting);
</span><span class="cx">         DECLARE_CALLBACK(InspectorBackendCookies);
</span><ins>+        DECLARE_CALLBACK(InspectorBackendDeleteCookie);
</ins><span class="cx">         DECLARE_CALLBACK(InspectorBackendCurrentCallFrame);
</span><span class="cx">         DECLARE_CALLBACK(InspectorBackendDebuggerEnabled);
</span><span class="cx">         DECLARE_CALLBACK(InspectorBackendPauseOnExceptions);
</span></span></pre></div>
<a id="trunkWebCorebindingsv8customV8InspectorBackendCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bindings/v8/custom/V8InspectorBackendCustom.cpp (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bindings/v8/custom/V8InspectorBackendCustom.cpp        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/bindings/v8/custom/V8InspectorBackendCustom.cpp        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -211,6 +211,13 @@
</span><span class="cx">     return v8::Undefined();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+CALLBACK_FUNC_DECL(InspectorBackendDeleteCookie)
+{
+    INC_STATS(&quot;InspectorBackend.deleteCookie()&quot;);
+    // FIXME: Not yet implemented. (see WebCore/bindings/js/JSInspectorBackendCustom.cpp#deleteCookie)
+    return v8::Undefined();
+}
+
</ins><span class="cx"> CALLBACK_FUNC_DECL(InspectorBackendWrapCallback)
</span><span class="cx"> {
</span><span class="cx">     INC_STATS(&quot;InspectorBackend.wrapCallback()&quot;);
</span></span></pre></div>
<a id="trunkWebCoreinspectorInspectorBackendidl"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/InspectorBackend.idl (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/InspectorBackend.idl        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/inspector/InspectorBackend.idl        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -69,6 +69,7 @@
</span><span class="cx">         void storeLastActivePanel(in DOMString panelName);
</span><span class="cx"> 
</span><span class="cx">         [Custom] Array cookies();
</span><ins>+        [Custom] void deleteCookie(in DOMString cookieName);
</ins><span class="cx"> 
</span><span class="cx"> #if defined(ENABLE_JAVASCRIPT_DEBUGGER) &amp;&amp; ENABLE_JAVASCRIPT_DEBUGGER
</span><span class="cx">         boolean debuggerEnabled();
</span></span></pre></div>
<a id="trunkWebCoreinspectorfrontendCookiejs"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/inspector/front-end/Cookie.js (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/front-end/Cookie.js        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/inspector/front-end/Cookie.js        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -1,59 +0,0 @@
</span><del>-/*
- * 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.
- * 3.  Neither the name of Apple Computer, Inc. (&quot;Apple&quot;) nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; 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 OR ITS 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.
- */
-
-WebInspector.Cookie = function(key, value)
-{
-    this.key = key;
-    this.value = value;
-}
-
-WebInspector.Cookie.prototype = {
-    get key()
-    {
-        return this._key;
-    },
-
-    set key(x)
-    {
-        if (this._key === x)
-            return;
-        this._key = x;
-    },
-
-    get value()
-    {
-        return this._value;
-    },
-
-    set value(x)
-    {
-        if (this._value === x)
-            return;
-        this._value = x;
-    }
-}
</del></span></pre></div>
<a id="trunkWebCoreinspectorfrontendCookieItemsViewjs"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/front-end/CookieItemsView.js (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/front-end/CookieItemsView.js        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/inspector/front-end/CookieItemsView.js        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -31,6 +31,13 @@
</span><span class="cx"> {
</span><span class="cx">     WebInspector.View.call(this);
</span><span class="cx"> 
</span><ins>+    // Some Platforms have not yet implemented access to raw cookies
+    // Those platforms will return undefined instead of an Array
+    // For these platforms we:
+    //   - resort to document.cookie
+    //   - do not show the delete cookie status bar button
+    this._useFallback = typeof InspectorController.cookies() === &quot;undefined&quot;;
+
</ins><span class="cx">     this.element.addStyleClass(&quot;storage-view&quot;);
</span><span class="cx">     this.element.addStyleClass(&quot;table&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -45,7 +52,10 @@
</span><span class="cx"> WebInspector.CookieItemsView.prototype = {
</span><span class="cx">     get statusBarItems()
</span><span class="cx">     {
</span><del>-        return [this.refreshButton.element, this.deleteButton.element];
</del><ins>+        if (this._useFallback)
+            return [this.refreshButton.element];
+        else
+            return [this.refreshButton.element, this.deleteButton.element];
</ins><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     show: function(parentElement)
</span><span class="lines">@@ -62,6 +72,11 @@
</span><span class="cx"> 
</span><span class="cx">     update: function()
</span><span class="cx">     {
</span><ins>+        if (this._useFallback) {
+            this.fallbackUpdate();
+            return;
+        }
+
</ins><span class="cx">         this.element.removeChildren();
</span><span class="cx">         var dataGrid = this.dataGridForCookies();
</span><span class="cx">         if (dataGrid) {
</span><span class="lines">@@ -80,7 +95,149 @@
</span><span class="cx"> 
</span><span class="cx">     buildCookies: function()
</span><span class="cx">     {
</span><del>-        var rawCookieString = InspectorController.inspectedWindow().document.cookie;
</del><ins>+        var rawCookies = InspectorController.cookies();
+        var cookies = [];
+        for (var i = 0; i &lt; rawCookies.length; ++i) {
+            var cookie = rawCookies[i];
+            cookie.expires = new Date(cookie.expires);
+            cookies.push(cookie);
+        }
+
+        return cookies;
+    },
+
+    dataGridForCookies: function()
+    {
+        var cookies = this.buildCookies();
+        if (!cookies.length)
+            return null;
+
+        var columns = { 0: {}, 1: {}, 2: {}, 3: {}, 4: {}, 5: {}, 6: {}, 7: {} };
+        columns[0].title = WebInspector.UIString(&quot;Name&quot;);
+        columns[0].width = columns[0].title.length;
+        columns[1].title = WebInspector.UIString(&quot;Value&quot;);
+        columns[1].width = columns[1].title.length;
+        columns[2].title = WebInspector.UIString(&quot;Domain&quot;);
+        columns[2].width = columns[2].title.length;
+        columns[3].title = WebInspector.UIString(&quot;Path&quot;);
+        columns[3].width = columns[3].title.length;
+        columns[4].title = WebInspector.UIString(&quot;Expires&quot;);
+        columns[4].width = columns[4].title.length;
+        columns[5].title = WebInspector.UIString(&quot;Size&quot;);
+        columns[5].width = columns[5].title.length;
+        columns[5].aligned = &quot;right&quot;;
+        columns[6].title = WebInspector.UIString(&quot;HTTP&quot;);
+        columns[6].width = columns[6].title.length;
+        columns[6].aligned = &quot;centered&quot;;
+        columns[7].title = WebInspector.UIString(&quot;Secure&quot;);
+        columns[7].width = columns[7].title.length;
+        columns[7].aligned = &quot;centered&quot;;
+
+        function updateDataAndColumn(index, value) {
+            data[index] = value;
+            if (value.length &gt; columns[index].width)
+                columns[index].width = value.length;
+        }
+
+        var data;
+        var nodes = [];
+        for (var i = 0; i &lt; cookies.length; ++i) {
+            var cookie = cookies[i];
+            data = {};
+
+            updateDataAndColumn(0, cookie.name);
+            updateDataAndColumn(1, cookie.value);
+            updateDataAndColumn(2, cookie.domain);
+            updateDataAndColumn(3, cookie.path);
+            updateDataAndColumn(4, (cookie.session ? &quot;Session&quot; : cookie.expires.toGMTString()));
+            updateDataAndColumn(5, Number.bytesToString(cookie.size, WebInspector.UIString));
+            updateDataAndColumn(6, (cookie.httpOnly ? &quot;\u2713&quot; : &quot;&quot;)); // Checkmark
+            updateDataAndColumn(7, (cookie.secure ? &quot;\u2713&quot; : &quot;&quot;)); // Checkmark
+
+            var node = new WebInspector.DataGridNode(data, false);
+            node.cookie = cookie;
+            node.selectable = true;
+            nodes.push(node);
+        }
+
+        var totalColumnWidths = 0;
+        for (var columnIdentifier in columns)
+            totalColumnWidths += columns[columnIdentifier].width;
+
+        // Enforce the Value column (the 2nd column) to be a max of 33%
+        // tweaking the raw total width because may massively outshadow the others
+        var valueColumnWidth = columns[1].width;
+        if (valueColumnWidth / totalColumnWidths &gt; 0.33) {
+            totalColumnWidths -= valueColumnWidth;
+            totalColumnWidths *= 1.33;
+            columns[1].width = totalColumnWidths * 0.33;
+        }
+
+        // Calculate the percentage width for the columns.
+        const minimumPrecent = 6;
+        var recoupPercent = 0;
+        for (var columnIdentifier in columns) {
+            var width = columns[columnIdentifier].width;
+            width = Math.round((width / totalColumnWidths) * 100);
+            if (width &lt; minimumPrecent) {
+                recoupPercent += (minimumPrecent - width);
+                width = minimumPrecent;
+            }
+            columns[columnIdentifier].width = width;
+        }
+
+        // Enforce the minimum percentage width. (need to narrow total percentage due to earlier additions)
+        while (recoupPercent &gt; 0) {
+            for (var columnIdentifier in columns) {
+                if (columns[columnIdentifier].width &gt; minimumPrecent) {
+                    --columns[columnIdentifier].width;
+                    --recoupPercent;
+                    if (!recoupPercent)
+                        break;
+                }
+            }
+        }
+
+        for (var columnIdentifier in columns)
+            columns[columnIdentifier].width += &quot;%&quot;;
+
+        var dataGrid = new WebInspector.DataGrid(columns);
+        var length = nodes.length;
+        for (var i = 0; i &lt; length; ++i)
+            dataGrid.appendChild(nodes[i]);
+        if (length &gt; 0)
+            nodes[0].selected = true;
+
+        return dataGrid;
+    },
+
+    fallbackUpdate: function()
+    {
+        this.element.removeChildren();
+
+        var self = this;
+        function callback(rawCookieString) {
+            var cookies = self.fallbackBuildCookiesFromString(rawCookieString);
+            var dataGrid = self.fallbackDataGridForCookies(cookies);
+            if (dataGrid) {
+                self._dataGrid = dataGrid;
+                self.element.appendChild(dataGrid.element);
+                self.deleteButton.visible = true;
+            } else {
+                var emptyMsgElement = document.createElement(&quot;div&quot;);
+                emptyMsgElement.className = &quot;storage-table-empty&quot;;
+                emptyMsgElement.textContent = WebInspector.UIString(&quot;This site has no cookies.&quot;);
+                self.element.appendChild(emptyMsgElement);
+                self._dataGrid = null;
+                self.deleteButton.visible = false;
+            }
+        }
+
+        InspectorController.getCookies(callback);
+    },
+
+    fallbackBuildCookiesFromString: function(rawCookieString)
+    {
</ins><span class="cx">         var rawCookies = rawCookieString.split(/;\s*/);
</span><span class="cx">         var cookies = [];
</span><span class="cx"> 
</span><span class="lines">@@ -90,36 +247,36 @@
</span><span class="cx">                 var delimIndex = cookie.indexOf(&quot;=&quot;);
</span><span class="cx">                 var name = cookie.substring(0, delimIndex);
</span><span class="cx">                 var value = cookie.substring(delimIndex + 1);
</span><del>-                cookies.push(new WebInspector.Cookie(name, value));
-            }                
</del><ins>+                var size = name.length + value.length;
+                cookies.push({ name: name, value: value, size: size });
+            }
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         return cookies;
</span><span class="cx">     },
</span><span class="cx"> 
</span><del>-    dataGridForCookies: function()
</del><ins>+    fallbackDataGridForCookies: function(cookies)
</ins><span class="cx">     {
</span><del>-        var cookies = this.buildCookies();
</del><span class="cx">         if (!cookies.length)
</span><span class="cx">             return null;
</span><span class="cx"> 
</span><span class="cx">         var columns = {};
</span><span class="cx">         columns[0] = {};
</span><span class="cx">         columns[1] = {};
</span><del>-        columns[0].title = WebInspector.UIString(&quot;Key&quot;);
</del><ins>+        columns[0].title = WebInspector.UIString(&quot;Name&quot;);
</ins><span class="cx">         columns[0].width = columns[0].title.length;
</span><span class="cx">         columns[1].title = WebInspector.UIString(&quot;Value&quot;);
</span><del>-        columns[1].width = columns[0].title.length;
</del><ins>+        columns[1].width = columns[1].title.length;
</ins><span class="cx"> 
</span><span class="cx">         var nodes = [];
</span><span class="cx">         for (var i = 0; i &lt; cookies.length; ++i) {
</span><span class="cx">             var cookie = cookies[i];
</span><span class="cx">             var data = {};
</span><span class="cx"> 
</span><del>-            var key = cookie.key;
-            data[0] = key;
-            if (key.length &gt; columns[0].width)
-                columns[0].width = key.length;
</del><ins>+            var name = cookie.name;
+            data[0] = name;
+            if (name.length &gt; columns[0].width)
+                columns[0].width = name.length;
</ins><span class="cx"> 
</span><span class="cx">             var value = cookie.value;
</span><span class="cx">             data[1] = value;
</span><span class="lines">@@ -129,41 +286,38 @@
</span><span class="cx">             var node = new WebInspector.DataGridNode(data, false);
</span><span class="cx">             node.selectable = true;
</span><span class="cx">             nodes.push(node);
</span><del>-      }
</del><ins>+        }
</ins><span class="cx"> 
</span><del>-      var totalColumnWidths = columns[0].width + columns[1].width;
-      width = Math.round((columns[0].width * 100) / totalColumnWidths);
-      const minimumPrecent = 20;
-      if (width &lt; minimumPrecent)
-          width = minimumPrecent;
-      if (width &gt; 100 - minimumPrecent)
-          width = 100 - minimumPrecent;
-      columns[0].width = width;
-      columns[1].width = 100 - width;
-      columns[0].width += &quot;%&quot;;
-      columns[1].width += &quot;%&quot;;
</del><ins>+        var totalColumnWidths = columns[0].width + columns[1].width;
+        var width = Math.round((columns[0].width * 100) / totalColumnWidths);
+        const minimumPrecent = 20;
+        if (width &lt; minimumPrecent)
+            width = minimumPrecent;
+        if (width &gt; 100 - minimumPrecent)
+            width = 100 - minimumPrecent;
+        columns[0].width = width;
+        columns[1].width = 100 - width;
+        columns[0].width += &quot;%&quot;;
+        columns[1].width += &quot;%&quot;;
</ins><span class="cx"> 
</span><del>-      var dataGrid = new WebInspector.DataGrid(columns);
-      var length = nodes.length;
-      for (var i = 0; i &lt; length; ++i)
-          dataGrid.appendChild(nodes[i]);
-      if (length &gt; 0)
-          nodes[0].selected = true;
</del><ins>+        var dataGrid = new WebInspector.DataGrid(columns);
+        var length = nodes.length;
+        for (var i = 0; i &lt; length; ++i)
+            dataGrid.appendChild(nodes[i]);
+        if (length &gt; 0)
+            nodes[0].selected = true;
</ins><span class="cx"> 
</span><del>-      return dataGrid;
</del><ins>+        return dataGrid;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     _deleteButtonClicked: function(event)
</span><span class="cx">     {
</span><del>-        if (!this._dataGrid)
</del><ins>+        if (!this._dataGrid || this._useFallback)
</ins><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        var node = this._dataGrid.selectedNode;
-        var key = node.data[0].replace(/&quot;/,&quot;\\\&quot;&quot;);
-        var expire = &quot;Thu, 01 Jan 1970 00:00:00 GMT&quot;; // (new Date(0)).toGMTString();
-        var evalStr = &quot;document.cookie = \&quot;&quot;+ key + &quot;=; expires=&quot; + expire + &quot;; path=/\&quot;;&quot; +
-                      &quot;document.cookie = \&quot;&quot;+ key + &quot;=; expires=&quot; + expire + &quot;\&quot;;&quot;;
-        WebInspector.console.doEvalInWindow(evalStr, this.update.bind(this));
</del><ins>+        var cookie = this._dataGrid.selectedNode.cookie;
+        InspectorController.deleteCookie(cookie.name);
+        this.update();
</ins><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     _refreshButtonClicked: function(event)
</span></span></pre></div>
<a id="trunkWebCoreinspectorfrontendDOMAgentjs"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/front-end/DOMAgent.js (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/front-end/DOMAgent.js        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/inspector/front-end/DOMAgent.js        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -713,3 +713,10 @@
</span><span class="cx">         callback(InjectedScript.searchCanceled());
</span><span class="cx">     }, 0);
</span><span class="cx"> }
</span><ins>+
+InspectorController.getCookies = function(callback)
+{
+    setTimeout(function() {
+        callback(InjectedScript.getCookies());
+    }, 0);
+}
</ins></span></pre></div>
<a id="trunkWebCoreinspectorfrontendDataGridjs"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/front-end/DataGrid.js (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/front-end/DataGrid.js        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/inspector/front-end/DataGrid.js        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -39,6 +39,8 @@
</span><span class="cx">     this._dataTable.addEventListener(&quot;mousedown&quot;, this._mouseDownInDataTable.bind(this), true);
</span><span class="cx">     this._dataTable.addEventListener(&quot;click&quot;, this._clickInDataTable.bind(this), true);
</span><span class="cx"> 
</span><ins>+    this.aligned = {};
+
</ins><span class="cx">     var scrollContainer = document.createElement(&quot;div&quot;);
</span><span class="cx">     scrollContainer.className = &quot;data-container&quot;;
</span><span class="cx">     scrollContainer.appendChild(this._dataTable);
</span><span class="lines">@@ -78,6 +80,11 @@
</span><span class="cx">             cell.addStyleClass(&quot;sortable&quot;);
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        if (column.aligned) {
+            cell.addStyleClass(column.aligned);
+            this.aligned[columnIdentifier] = column.aligned;
+        }
+
</ins><span class="cx">         headerRow.appendChild(cell);
</span><span class="cx"> 
</span><span class="cx">         ++columnCount;
</span><span class="lines">@@ -752,6 +759,10 @@
</span><span class="cx">         var cell = document.createElement(&quot;td&quot;);
</span><span class="cx">         cell.className = columnIdentifier + &quot;-column&quot;;
</span><span class="cx"> 
</span><ins>+        var alignment = this.dataGrid.aligned[columnIdentifier];
+        if (alignment)
+            cell.addStyleClass(alignment);
+
</ins><span class="cx">         var div = document.createElement(&quot;div&quot;);
</span><span class="cx">         div.textContent = this.data[columnIdentifier];
</span><span class="cx">         cell.appendChild(div);
</span></span></pre></div>
<a id="trunkWebCoreinspectorfrontendDatabasesPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/front-end/DatabasesPanel.js (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/front-end/DatabasesPanel.js        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/inspector/front-end/DatabasesPanel.js        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -400,7 +400,7 @@
</span><span class="cx">         columns[0].title = WebInspector.UIString(&quot;Key&quot;);
</span><span class="cx">         columns[0].width = columns[0].title.length;
</span><span class="cx">         columns[1].title = WebInspector.UIString(&quot;Value&quot;);
</span><del>-        columns[1].width = columns[0].title.length;
</del><ins>+        columns[1].width = columns[1].title.length;
</ins><span class="cx"> 
</span><span class="cx">         var nodes = [];
</span><span class="cx">         
</span><span class="lines">@@ -423,7 +423,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         var totalColumnWidths = columns[0].width + columns[1].width;
</span><del>-        width = Math.round((columns[0].width * 100) / totalColumnWidths);
</del><ins>+        var width = Math.round((columns[0].width * 100) / totalColumnWidths);
</ins><span class="cx">         const minimumPrecent = 10;
</span><span class="cx">         if (width &lt; minimumPrecent)
</span><span class="cx">             width = minimumPrecent;
</span></span></pre></div>
<a id="trunkWebCoreinspectorfrontendInjectedScriptjs"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/front-end/InjectedScript.js (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/front-end/InjectedScript.js        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/inspector/front-end/InjectedScript.js        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -245,7 +245,8 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InjectedScript.setStyleProperty = function(styleId, name, value) {
</del><ins>+InjectedScript.setStyleProperty = function(styleId, name, value)
+{
</ins><span class="cx">     var style = InjectedScript._styles[styleId];
</span><span class="cx">     if (!style)
</span><span class="cx">         return false;
</span><span class="lines">@@ -768,6 +769,11 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+InjectedScript.getCookies = function()
+{
+    return InjectedScript._window().document.cookie;
+}
+
</ins><span class="cx"> InjectedScript._ensureCommandLineAPIInstalled = function(inspectedWindow)
</span><span class="cx"> {
</span><span class="cx">     var inspectedWindow = InjectedScript._window();
</span></span></pre></div>
<a id="trunkWebCoreinspectorfrontendWebKitqrc"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/front-end/WebKit.qrc (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/front-end/WebKit.qrc        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/inspector/front-end/WebKit.qrc        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -9,7 +9,6 @@
</span><span class="cx">     &lt;file&gt;ChangesView.js&lt;/file&gt;
</span><span class="cx">     &lt;file&gt;Color.js&lt;/file&gt;
</span><span class="cx">     &lt;file&gt;ConsoleView.js&lt;/file&gt;
</span><del>-    &lt;file&gt;Cookie.js&lt;/file&gt;
</del><span class="cx">     &lt;file&gt;CookieItemsView.js&lt;/file&gt;
</span><span class="cx">     &lt;file&gt;Database.js&lt;/file&gt;
</span><span class="cx">     &lt;file&gt;DatabaseQueryView.js&lt;/file&gt;
</span></span></pre></div>
<a id="trunkWebCoreinspectorfrontendinspectorcss"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/front-end/inspector.css (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/front-end/inspector.css        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/inspector/front-end/inspector.css        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -1789,6 +1789,14 @@
</span><span class="cx">     overflow: hidden;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+.data-grid .centered div {
+    text-align: center;
+}
+
+.data-grid .right div {
+    text-align: right;
+}
+
</ins><span class="cx"> .data-grid th.sortable div {
</span><span class="cx">     position: relative;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkWebCoreinspectorfrontendinspectorhtml"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/front-end/inspector.html (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/front-end/inspector.html        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/inspector/front-end/inspector.html        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -49,7 +49,6 @@
</span><span class="cx">     &lt;script type=&quot;text/javascript&quot; src=&quot;DOMStorageItemsView.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script type=&quot;text/javascript&quot; src=&quot;DataGrid.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script type=&quot;text/javascript&quot; src=&quot;DOMStorageDataGrid.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script type=&quot;text/javascript&quot; src=&quot;Cookie.js&quot;&gt;&lt;/script&gt;
</del><span class="cx">     &lt;script type=&quot;text/javascript&quot; src=&quot;CookieItemsView.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script type=&quot;text/javascript&quot; src=&quot;Script.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script type=&quot;text/javascript&quot; src=&quot;Breakpoint.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkWebCoreplatformCookieJarh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/CookieJar.h (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/CookieJar.h        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/platform/CookieJar.h        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -39,7 +39,8 @@
</span><span class="cx">     String cookies(const Document*, const KURL&amp;);
</span><span class="cx">     void setCookies(Document*, const KURL&amp;, const String&amp;);
</span><span class="cx">     bool cookiesEnabled(const Document*);
</span><del>-    void getRawCookies(const Document*, const KURL&amp;, Vector&lt;Cookie&gt;&amp;);
</del><ins>+    bool getRawCookies(const Document*, const KURL&amp;, Vector&lt;Cookie&gt;&amp;);
+    void deleteCookie(const Document*, const KURL&amp;, const String&amp;);
</ins><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCoreplatformhaikuCookieJarHaikucpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/haiku/CookieJarHaiku.cpp (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/haiku/CookieJarHaiku.cpp        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/platform/haiku/CookieJarHaiku.cpp        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -58,11 +58,17 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void getRawCookies(const Document*, const KURL&amp;, Vector&lt;Cookie&gt;&amp; rawCookies)
</del><ins>+bool getRawCookies(const Document*, const KURL&amp;, Vector&lt;Cookie&gt;&amp; rawCookies)
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: Not yet implemented
</span><span class="cx">     rawCookies.clear();
</span><ins>+    return false; // return true when implemented
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void deleteCookie(const Document*, const KURL&amp;, const String&amp;)
+{
+    // FIXME: Not yet implemented
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCoreplatformmacCookieJarmm"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/mac/CookieJar.mm (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/mac/CookieJar.mm        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/platform/mac/CookieJar.mm        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -117,7 +117,7 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void getRawCookies(const Document*, const KURL&amp; url, Vector&lt;Cookie&gt;&amp; rawCookies)
</del><ins>+bool getRawCookies(const Document*, const KURL&amp; url, Vector&lt;Cookie&gt;&amp; rawCookies)
</ins><span class="cx"> {
</span><span class="cx">     rawCookies.clear();
</span><span class="cx">     BEGIN_BLOCK_OBJC_EXCEPTIONS;
</span><span class="lines">@@ -141,6 +141,28 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     END_BLOCK_OBJC_EXCEPTIONS;
</span><ins>+    return true;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void deleteCookie(const Document*, const KURL&amp; url, const String&amp; cookieName)
+{
+    BEGIN_BLOCK_OBJC_EXCEPTIONS;
+
+    NSURL *cookieURL = url;
+    NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
+    NSArray *cookies = [cookieStorage cookiesForURL:cookieURL];
+    NSString *cookieNameString = (NSString *) cookieName;
+
+    NSUInteger count = [cookies count];
+    for (NSUInteger i = 0; i &lt; count; ++i) {
+        NSHTTPCookie *cookie = (NSHTTPCookie *)[cookies objectAtIndex:i];
+        if ([[cookie name] isEqualToString:cookieNameString]) {
+            [cookieStorage deleteCookie:cookie];
+            break;
+        }
+    }
+
+    END_BLOCK_OBJC_EXCEPTIONS;
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre></div>
<a id="trunkWebCoreplatformnetworkchromiumCookieJarChromiumcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/network/chromium/CookieJarChromium.cpp (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/network/chromium/CookieJarChromium.cpp        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/platform/network/chromium/CookieJarChromium.cpp        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -53,10 +53,16 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void getRawCookies(const Document*, const KURL&amp;, Vector&lt;Cookie&gt;&amp; rawCookies)
</del><ins>+bool getRawCookies(const Document*, const KURL&amp;, Vector&lt;Cookie&gt;&amp; rawCookies)
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: Not yet implemented
</span><span class="cx">     rawCookies.clear();
</span><ins>+    return false; // return true when implemented
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void deleteCookie(const Document*, const KURL&amp;, const String&amp;)
+{
+    // FIXME: Not yet implemented
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkWebCoreplatformnetworkcurlCookieJarCurlcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/network/curl/CookieJarCurl.cpp (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/network/curl/CookieJarCurl.cpp        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/platform/network/curl/CookieJarCurl.cpp        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -44,10 +44,16 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void getRawCookies(const Document*, const KURL&amp;, Vector&lt;Cookie&gt;&amp; rawCookies)
</del><ins>+bool getRawCookies(const Document*, const KURL&amp;, Vector&lt;Cookie&gt;&amp; rawCookies)
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: Not yet implemented
</span><span class="cx">     rawCookies.clear();
</span><ins>+    return false; // return true when implemented
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void deleteCookie(const Document*, const KURL&amp;, const String&amp;)
+{
+    // FIXME: Not yet implemented
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre></div>
<a id="trunkWebCoreplatformnetworksoupCookieJarSoupcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/network/soup/CookieJarSoup.cpp (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/network/soup/CookieJarSoup.cpp        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/platform/network/soup/CookieJarSoup.cpp        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -87,10 +87,16 @@
</span><span class="cx">     return defaultCookieJar();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void getRawCookies(const Document*, const KURL&amp;, Vector&lt;Cookie&gt;&amp; rawCookies)
</del><ins>+bool getRawCookies(const Document*, const KURL&amp;, Vector&lt;Cookie&gt;&amp; rawCookies)
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: Not yet implemented
</span><span class="cx">     rawCookies.clear();
</span><ins>+    return false; // return true when implemented
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void deleteCookie(const Document*, const KURL&amp;, const String&amp;)
+{
+    // FIXME: Not yet implemented
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre></div>
<a id="trunkWebCoreplatformnetworkwinCookieJarCFNetWincpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/network/win/CookieJarCFNetWin.cpp (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/network/win/CookieJarCFNetWin.cpp        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/platform/network/win/CookieJarCFNetWin.cpp        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -114,10 +114,16 @@
</span><span class="cx">     return policy == CFHTTPCookieStorageAcceptPolicyOnlyFromMainDocumentDomain || policy == CFHTTPCookieStorageAcceptPolicyAlways;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void getRawCookies(const Document*, const KURL&amp;, Vector&lt;Cookie&gt;&amp; rawCookies)
</del><ins>+bool getRawCookies(const Document*, const KURL&amp;, Vector&lt;Cookie&gt;&amp; rawCookies)
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: Not yet implemented
</span><span class="cx">     rawCookies.clear();
</span><ins>+    return false; // return true when implemented
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void deleteCookie(const Document*, const KURL&amp;, const String&amp;)
+{
+    // FIXME: Not yet implemented
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre></div>
<a id="trunkWebCoreplatformnetworkwinCookieJarWincpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/network/win/CookieJarWin.cpp (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/network/win/CookieJarWin.cpp        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/platform/network/win/CookieJarWin.cpp        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -64,10 +64,16 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void getRawCookies(const Document*, const KURL&amp;, Vector&lt;Cookie&gt;&amp; rawCookies)
</del><ins>+bool getRawCookies(const Document*, const KURL&amp;, Vector&lt;Cookie&gt;&amp; rawCookies)
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: Not yet implemented
</span><span class="cx">     rawCookies.clear();
</span><ins>+    return false; // return true when implemented
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void deleteCookie(const Document*, const KURL&amp;, const String&amp;)
+{
+    // FIXME: Not yet implemented
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre></div>
<a id="trunkWebCoreplatformqtCookieJarQtcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/qt/CookieJarQt.cpp (47362 => 47363)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/qt/CookieJarQt.cpp        2009-08-17 15:37:58 UTC (rev 47362)
+++ trunk/WebCore/platform/qt/CookieJarQt.cpp        2009-08-17 15:57:39 UTC (rev 47363)
</span><span class="lines">@@ -129,12 +129,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void getRawCookies(const Document*, const KURL&amp;, Vector&lt;Cookie&gt;&amp; rawCookies)
</del><ins>+bool getRawCookies(const Document*, const KURL&amp;, Vector&lt;Cookie&gt;&amp; rawCookies)
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: Not yet implemented
</span><span class="cx">     rawCookies.clear();
</span><ins>+    return false; // return true when implemented
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void deleteCookie(const Document*, const KURL&amp;, const String&amp;)
+{
+    // FIXME: Not yet implemented
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+}
+
</ins><span class="cx"> // vim: ts=4 sw=4 et
</span></span></pre>
</div>
</div>

</body>
</html>