Changeset 47656 in webkit


Ignore:
Timestamp:
Aug 21, 2009 6:53:56 PM (15 years ago)
Author:
Joseph Pecoraro
Message:

2009-08-19 Joseph Pecoraro <Joseph Pecoraro>

Reviewed by Timothy Hatcher.

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

Removed Custom Bindings

  • bindings/js/JSInspectorBackendCustom.cpp:
  • bindings/v8/custom/V8CustomBinding.h:
  • bindings/v8/custom/V8InspectorBackendCustom.cpp:
  • inspector/InspectorBackend.cpp:

Made Non-Custom Bindings in the Backend

(WebCore::InspectorBackend::getCookies):
(WebCore::InspectorBackend::deleteCookie):

  • inspector/InspectorBackend.h:
  • inspector/InspectorBackend.idl:
  • inspector/InspectorController.cpp: (WebCore::InspectorController::deleteCookie):
  • inspector/InspectorController.h:

Build the Cookie ScriptObjects, handles using document.cookie in
case the platform hasn't implemented raw cookie access.

  • inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getCookies): (WebCore::InspectorDOMAgent::buildObjectForCookie): (WebCore::InspectorDOMAgent::buildArrayForCookies):
  • inspector/InspectorDOMAgent.h:

Complete the Asynchronous Calls

  • inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::didGetCookies):
  • inspector/InspectorFrontend.h:

Asynchronous Functions to get Cookie Data

  • inspector/front-end/DOMAgent.js: (WebInspector.Cookies.getCookiesAsync): (WebInspector.Cookies.buildCookiesFromString): fallback behavior

Refactor to use the Asynchronous Functions

  • inspector/front-end/CookieItemsView.js: (WebInspector.CookieItemsView): (WebInspector.CookieItemsView.prototype.get statusBarItems): (WebInspector.CookieItemsView.prototype.update.callback): (WebInspector.CookieItemsView.prototype.update): (WebInspector.CookieItemsView.prototype.simpleDataGridForCookies): (WebInspector.CookieItemsView.prototype._deleteButtonClicked):

Cleaned/Commented Related Code

(InspectorController.searchCanceled):

  • inspector/front-end/InjectedScript.js:
  • platform/Cookie.h:
  • English.lproj/localizedStrings.js: the new strings that were supposed to have gone in last time
Location:
trunk/WebCore
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r47655 r47656  
     12009-08-19  Joseph Pecoraro  <joepeck@webkit.org>
     2
     3        Reviewed by Timothy Hatcher.
     4
     5        Inspector: Improve Cookie DataGrid to Show Hidden Data
     6        https://bugs.webkit.org/show_bug.cgi?id=28269
     7
     8          Removed Custom Bindings
     9
     10        * bindings/js/JSInspectorBackendCustom.cpp:
     11        * bindings/v8/custom/V8CustomBinding.h:
     12        * bindings/v8/custom/V8InspectorBackendCustom.cpp:
     13        * inspector/InspectorBackend.cpp:
     14
     15          Made Non-Custom Bindings in the Backend
     16
     17        (WebCore::InspectorBackend::getCookies):
     18        (WebCore::InspectorBackend::deleteCookie):
     19        * inspector/InspectorBackend.h:
     20        * inspector/InspectorBackend.idl:
     21        * inspector/InspectorController.cpp:
     22        (WebCore::InspectorController::deleteCookie):
     23        * inspector/InspectorController.h:
     24
     25          Build the Cookie ScriptObjects, handles using document.cookie in
     26          case the platform hasn't implemented raw cookie access.
     27
     28        * inspector/InspectorDOMAgent.cpp:
     29        (WebCore::InspectorDOMAgent::getCookies):
     30        (WebCore::InspectorDOMAgent::buildObjectForCookie):
     31        (WebCore::InspectorDOMAgent::buildArrayForCookies):
     32        * inspector/InspectorDOMAgent.h:
     33
     34          Complete the Asynchronous Calls
     35
     36        * inspector/InspectorFrontend.cpp:
     37        (WebCore::InspectorFrontend::didGetCookies):
     38        * inspector/InspectorFrontend.h:
     39
     40          Asynchronous Functions to get Cookie Data
     41
     42        * inspector/front-end/DOMAgent.js:
     43        (WebInspector.Cookies.getCookiesAsync):
     44        (WebInspector.Cookies.buildCookiesFromString): fallback behavior
     45
     46          Refactor to use the Asynchronous Functions
     47
     48        * inspector/front-end/CookieItemsView.js:
     49        (WebInspector.CookieItemsView):
     50        (WebInspector.CookieItemsView.prototype.get statusBarItems):
     51        (WebInspector.CookieItemsView.prototype.update.callback):
     52        (WebInspector.CookieItemsView.prototype.update):
     53        (WebInspector.CookieItemsView.prototype.simpleDataGridForCookies):
     54        (WebInspector.CookieItemsView.prototype._deleteButtonClicked):
     55
     56          Cleaned/Commented Related Code
     57
     58        (InspectorController.searchCanceled):
     59        * inspector/front-end/InjectedScript.js:
     60        * platform/Cookie.h:
     61        * English.lproj/localizedStrings.js: the new strings that were supposed to have gone in last time
     62
    1632009-08-21  Michelangelo De Simone  <micdesim@gmail.com>
    264
  • trunk/WebCore/bindings/js/JSInspectorBackendCustom.cpp

    r47513 r47656  
    33 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
    44 * Copyright (C) 2009 Google Inc. All rights reserved.
    5  * Copyright (C) 2009 Joseph Pecoraro
    65 *
    76 * Redistribution and use in source and binary forms, with or without
     
    3635
    3736#include "Console.h"
    38 #include "Cookie.h"
    39 #include "CookieJar.h"
    4037#if ENABLE(DATABASE)
    4138#include "Database.h"
     
    155152    JSDOMWindow* inspectedWindow = toJSDOMWindow(ic->inspectedPage()->mainFrame());
    156153    return JSInspectedObjectWrapper::wrap(inspectedWindow->globalExec(), inspectedWindow);
    157 }
    158 
    159 JSValue JSInspectorBackend::cookies(ExecState* exec, const ArgList&)
    160 {
    161     InspectorController* ic = impl()->inspectorController();
    162     if (!ic)
    163         return jsUndefined();
    164 
    165     Document* document = ic->inspectedPage()->mainFrame()->document();
    166     Vector<Cookie> cookies;
    167     bool isImplemented = getRawCookies(document, document->cookieURL(), cookies);
    168 
    169     if (!isImplemented)
    170         return jsUndefined();
    171 
    172     MarkedArgumentBuffer result;
    173     Identifier nameIdentifier(exec, "name");
    174     Identifier valueIdentifier(exec, "value");
    175     Identifier domainIdentifier(exec, "domain");
    176     Identifier pathIdentifier(exec, "path");
    177     Identifier expiresIdentifier(exec, "expires");
    178     Identifier sizeIdentifier(exec, "size");
    179     Identifier httpOnlyIdentifier(exec, "httpOnly");
    180     Identifier secureIdentifier(exec, "secure");
    181     Identifier sessionIdentifier(exec, "session");
    182 
    183     unsigned length = cookies.size();
    184     for (unsigned i = 0; i < length; ++i) {
    185         const Cookie& cookie = cookies[i];
    186         JSObject* cookieObject = constructEmptyObject(exec);
    187         cookieObject->putDirect(nameIdentifier, jsString(exec, cookie.name));
    188         cookieObject->putDirect(valueIdentifier, jsString(exec, cookie.value));
    189         cookieObject->putDirect(domainIdentifier, jsString(exec, cookie.domain));
    190         cookieObject->putDirect(pathIdentifier, jsString(exec, cookie.path));
    191         cookieObject->putDirect(expiresIdentifier, jsNumber(exec, cookie.expires));
    192         cookieObject->putDirect(sizeIdentifier, jsNumber(exec, cookie.name.length() + cookie.value.length()));
    193         cookieObject->putDirect(httpOnlyIdentifier, jsBoolean(cookie.httpOnly));
    194         cookieObject->putDirect(secureIdentifier, jsBoolean(cookie.secure));
    195         cookieObject->putDirect(sessionIdentifier, jsBoolean(cookie.session));
    196         result.append(cookieObject);
    197     }
    198 
    199     return constructArray(exec, result);
    200 }
    201 
    202 JSValue JSInspectorBackend::deleteCookie(ExecState* exec, const ArgList& args)
    203 {
    204     if (args.size() < 1)
    205         return jsUndefined();
    206 
    207     InspectorController* ic = impl()->inspectorController();
    208     if (!ic)
    209         return jsUndefined();
    210 
    211     String cookieName = args.at(0).toString(exec);
    212     if (exec->hadException())
    213         return jsUndefined();
    214 
    215     Document* document = ic->inspectedPage()->mainFrame()->document();
    216     WebCore::deleteCookie(document, document->cookieURL(), cookieName);
    217 
    218     return jsUndefined();
    219154}
    220155
  • trunk/WebCore/bindings/v8/custom/V8CustomBinding.h

    r47513 r47656  
    408408        DECLARE_CALLBACK(InspectorBackendInspectedWindow);
    409409        DECLARE_CALLBACK(InspectorBackendSetSetting);
    410         DECLARE_CALLBACK(InspectorBackendCookies);
    411         DECLARE_CALLBACK(InspectorBackendDeleteCookie);
    412410        DECLARE_CALLBACK(InspectorBackendCurrentCallFrame);
    413411        DECLARE_CALLBACK(InspectorBackendDebuggerEnabled);
  • trunk/WebCore/bindings/v8/custom/V8InspectorBackendCustom.cpp

    r47513 r47656  
    205205}
    206206
    207 CALLBACK_FUNC_DECL(InspectorBackendCookies)
    208 {
    209     INC_STATS("InspectorBackend.cookies()");
    210     // FIXME: Not yet implemented.
    211     return v8::Undefined();
    212 }
    213 
    214 CALLBACK_FUNC_DECL(InspectorBackendDeleteCookie)
    215 {
    216     INC_STATS("InspectorBackend.deleteCookie()");
    217     // FIXME: Not yet implemented. (see WebCore/bindings/js/JSInspectorBackendCustom.cpp#deleteCookie)
    218     return v8::Undefined();
    219 }
    220 
    221207CALLBACK_FUNC_DECL(InspectorBackendWrapCallback)
    222208{
  • trunk/WebCore/inspector/InspectorBackend.cpp

    r47513 r47656  
    252252}
    253253
     254void InspectorBackend::getCookies(long callId)
     255{
     256    if (!m_inspectorController)
     257        return;
     258    if (!m_inspectorController->m_domAgent || !m_inspectorController->m_frontend)
     259        return;
     260    m_inspectorController->domAgent()->getCookies(callId);
     261}
     262
     263void InspectorBackend::deleteCookie(const String& cookieName)
     264{
     265    if (!m_inspectorController)
     266        return;
     267    m_inspectorController->deleteCookie(cookieName);
     268}
     269
    254270#if ENABLE(JAVASCRIPT_DEBUGGER)
    255271const ProfilesArray& InspectorBackend::profiles() const
  • trunk/WebCore/inspector/InspectorBackend.h

    r47513 r47656  
    9696    const String& platform() const;
    9797
     98    void getCookies(long callId);
     99    void deleteCookie(const String& cookieName);
     100
    98101#if ENABLE(JAVASCRIPT_DEBUGGER)
    99102    const ProfilesArray& profiles() const;
  • trunk/WebCore/inspector/InspectorBackend.idl

    r47513 r47656  
    6969        void storeLastActivePanel(in DOMString panelName);
    7070
    71         [Custom] Array cookies();
    72         [Custom] void deleteCookie(in DOMString cookieName);
     71        void getCookies(in long callId);
     72        void deleteCookie(in DOMString cookieName);
    7373
    7474#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
  • trunk/WebCore/inspector/InspectorController.cpp

    r47639 r47656  
    3535#include "Console.h"
    3636#include "ConsoleMessage.h"
     37#include "CookieJar.h"
    3738#include "Document.h"
    3839#include "DocumentLoader.h"
     
    15121513}
    15131514
     1515void InspectorController::deleteCookie(const String& cookieName)
     1516{
     1517    Document* document = m_inspectedPage->mainFrame()->document();
     1518    WebCore::deleteCookie(document, document->cookieURL(), cookieName);
     1519}
     1520
    15141521} // namespace WebCore
  • trunk/WebCore/inspector/InspectorController.h

    r47639 r47656  
    289289    void resetInjectedScript();
    290290
     291    void deleteCookie(const String& cookieName);
     292
    291293#if ENABLE(JAVASCRIPT_DEBUGGER)
    292294    void startUserInitiatedProfilingSoon();
  • trunk/WebCore/inspector/InspectorDOMAgent.cpp

    r47513 r47656  
    22 * Copyright (C) 2009 Apple Inc. All rights reserved.
    33 * Copyright (C) 2009 Google Inc. All rights reserved.
     4 * Copyright (C) 2009 Joseph Pecoraro
    45 *
    56 * Redistribution and use in source and binary forms, with or without
     
    3334#include "AtomicString.h"
    3435#include "ContainerNode.h"
     36#include "Cookie.h"
     37#include "CookieJar.h"
    3538#include "DOMWindow.h"
    3639#include "Document.h"
     
    359362}
    360363
     364void InspectorDOMAgent::getCookies(long callId)
     365{
     366    Document* doc = mainFrameDocument();
     367    Vector<Cookie> cookiesList;
     368    bool isImplemented = getRawCookies(doc, doc->cookieURL(), cookiesList);
     369
     370    if (!isImplemented)
     371        m_frontend->didGetCookies(callId, m_frontend->newScriptArray(), doc->cookie());
     372    else
     373        m_frontend->didGetCookies(callId, buildArrayForCookies(cookiesList), String());
     374}
     375
    361376ScriptObject InspectorDOMAgent::buildObjectForNode(Node* node, int depth, NodeToIdMap* nodesMap)
    362377{
     
    441456}
    442457
     458ScriptObject InspectorDOMAgent::buildObjectForCookie(const Cookie& cookie)
     459{
     460    ScriptObject value = m_frontend->newScriptObject();
     461    value.set("name", cookie.name);
     462    value.set("value", cookie.value);
     463    value.set("domain", cookie.domain);
     464    value.set("path", cookie.path);
     465    value.set("expires", cookie.expires);
     466    value.set("size", static_cast<int>(cookie.name.length() + cookie.value.length()));
     467    value.set("httpOnly", cookie.httpOnly);
     468    value.set("secure", cookie.secure);
     469    value.set("session", cookie.session);
     470    return value;
     471}
     472
     473ScriptArray InspectorDOMAgent::buildArrayForCookies(const Vector<Cookie>& cookiesList)
     474{
     475    ScriptArray cookies = m_frontend->newScriptArray();
     476    unsigned length = cookiesList.size();
     477    for (unsigned i = 0; i < length; ++i) {
     478        const Cookie& cookie = cookiesList[i];
     479        cookies.set(i, buildObjectForCookie(cookie));
     480    }
     481    return cookies;
     482}
     483
    443484Node* InspectorDOMAgent::innerFirstChild(Node* node)
    444485{
  • trunk/WebCore/inspector/InspectorDOMAgent.h

    r47513 r47656  
    5252    class Page;
    5353
     54    struct Cookie;
     55
    5456    class InspectorDOMAgent : public EventListener {
    5557    public:
     
    6264        void removeAttribute(long callId, long elementId, const String& name);
    6365        void setTextNodeValue(long callId, long nodeId, const String& value);
     66        void getCookies(long callId);
    6467
    6568        // Methods called from the InspectorController.
     
    8689        ScriptArray buildArrayForElementAttributes(Element* element);
    8790        ScriptArray buildArrayForContainerChildren(Node* container, int depth, NodeToIdMap* nodesMap);
     91
     92        ScriptObject buildObjectForCookie(const Cookie& cookie);
     93        ScriptArray buildArrayForCookies(const Vector<Cookie>& cookiesList);
    8894
    8995        // We represent embedded doms as a part of the same hierarchy. Hence we treat children of frame owners differently.
  • trunk/WebCore/inspector/InspectorFrontend.cpp

    r47639 r47656  
    348348}
    349349
     350void InspectorFrontend::didGetCookies(int callId, const ScriptArray& cookies, const String& cookiesString)
     351{
     352    OwnPtr<ScriptFunctionCall> function(newFunctionCall("didGetCookies"));
     353    function->appendArgument(callId);
     354    function->appendArgument(cookies);
     355    function->appendArgument(cookiesString);
     356    function->call();
     357}
     358
    350359#if ENABLE(DATABASE)
    351360void InspectorFrontend::selectDatabase(Database* database)
  • trunk/WebCore/inspector/InspectorFrontend.h

    r47513 r47656  
    113113        void didApplyDomChange(int callId, bool success);
    114114
     115        void didGetCookies(int callId, const ScriptArray& cookies, const String& cookiesString);
     116
    115117        void addNodesToSearchResult(const String& nodeIds);
    116118
  • trunk/WebCore/inspector/front-end/CookieItemsView.js

    r47363 r47656  
    3232    WebInspector.View.call(this);
    3333
    34     // Some Platforms have not yet implemented access to raw cookies
    35     // Those platforms will return undefined instead of an Array
    36     // For these platforms we:
    37     //   - resort to document.cookie
    38     //   - do not show the delete cookie status bar button
    39     this._useFallback = typeof InspectorController.cookies() === "undefined";
    40 
    4134    this.element.addStyleClass("storage-view");
    4235    this.element.addStyleClass("table");
     
    5346    get statusBarItems()
    5447    {
    55         if (this._useFallback)
    56             return [this.refreshButton.element];
    57         else
    58             return [this.refreshButton.element, this.deleteButton.element];
     48        return [this.refreshButton.element, this.deleteButton.element];
    5949    },
    6050
     
    7363    update: function()
    7464    {
    75         if (this._useFallback) {
    76             this.fallbackUpdate();
    77             return;
    78         }
    79 
    8065        this.element.removeChildren();
    81         var dataGrid = this.dataGridForCookies();
    82         if (dataGrid) {
    83             this._dataGrid = dataGrid;
    84             this.element.appendChild(dataGrid.element);
    85             this.deleteButton.visible = true;
    86         } else {
    87             var emptyMsgElement = document.createElement("div");
    88             emptyMsgElement.className = "storage-table-empty";
    89             emptyMsgElement.textContent = WebInspector.UIString("This site has no cookies.");
    90             this.element.appendChild(emptyMsgElement);
    91             this._dataGrid = null;
    92             this.deleteButton.visible = false;
    93         }
    94     },
    95 
    96     buildCookies: function()
    97     {
    98         var rawCookies = InspectorController.cookies();
    99         var cookies = [];
    100         for (var i = 0; i < rawCookies.length; ++i) {
    101             var cookie = rawCookies[i];
    102             cookie.expires = new Date(cookie.expires);
    103             cookies.push(cookie);
    104         }
    105 
    106         return cookies;
    107     },
    108 
    109     dataGridForCookies: function()
    110     {
    111         var cookies = this.buildCookies();
     66
     67        var self = this;
     68        function callback(cookies, isAdvanced) {
     69            var dataGrid = (isAdvanced ? self.dataGridForCookies(cookies) : self.simpleDataGridForCookies(cookies));
     70            if (dataGrid) {
     71                self._dataGrid = dataGrid;
     72                self.element.appendChild(dataGrid.element);
     73                if (isAdvanced)
     74                    self.deleteButton.visible = true;
     75            } else {
     76                var emptyMsgElement = document.createElement("div");
     77                emptyMsgElement.className = "storage-table-empty";
     78                emptyMsgElement.textContent = WebInspector.UIString("This site has no cookies.");
     79                self.element.appendChild(emptyMsgElement);
     80                self._dataGrid = null;
     81                self.deleteButton.visible = false;
     82            }
     83        }
     84
     85        WebInspector.Cookies.getCookiesAsync(callback);
     86    },
     87
     88    dataGridForCookies: function(cookies)
     89    {
    11290        if (!cookies.length)
    11391            return null;
     92
     93        for (var i = 0; i < cookies.length; ++i)
     94            cookies[i].expires = new Date(cookies[i].expires);
    11495
    11596        var columns = { 0: {}, 1: {}, 2: {}, 3: {}, 4: {}, 5: {}, 6: {}, 7: {} };
     
    150131            updateDataAndColumn(2, cookie.domain);
    151132            updateDataAndColumn(3, cookie.path);
    152             updateDataAndColumn(4, (cookie.session ? "Session" : cookie.expires.toGMTString()));
     133            updateDataAndColumn(4, (cookie.session ? WebInspector.UIString("Session") : cookie.expires.toGMTString()));
    153134            updateDataAndColumn(5, Number.bytesToString(cookie.size, WebInspector.UIString));
    154135            updateDataAndColumn(6, (cookie.httpOnly ? "\u2713" : "")); // Checkmark
     
    212193    },
    213194
    214     fallbackUpdate: function()
    215     {
    216         this.element.removeChildren();
    217 
    218         var self = this;
    219         function callback(rawCookieString) {
    220             var cookies = self.fallbackBuildCookiesFromString(rawCookieString);
    221             var dataGrid = self.fallbackDataGridForCookies(cookies);
    222             if (dataGrid) {
    223                 self._dataGrid = dataGrid;
    224                 self.element.appendChild(dataGrid.element);
    225                 self.deleteButton.visible = true;
    226             } else {
    227                 var emptyMsgElement = document.createElement("div");
    228                 emptyMsgElement.className = "storage-table-empty";
    229                 emptyMsgElement.textContent = WebInspector.UIString("This site has no cookies.");
    230                 self.element.appendChild(emptyMsgElement);
    231                 self._dataGrid = null;
    232                 self.deleteButton.visible = false;
    233             }
    234         }
    235 
    236         InspectorController.getCookies(callback);
    237     },
    238 
    239     fallbackBuildCookiesFromString: function(rawCookieString)
    240     {
    241         var rawCookies = rawCookieString.split(/;\s*/);
    242         var cookies = [];
    243 
    244         if (!(/^\s*$/.test(rawCookieString))) {
    245             for (var i = 0; i < rawCookies.length; ++i) {
    246                 var cookie = rawCookies[i];
    247                 var delimIndex = cookie.indexOf("=");
    248                 var name = cookie.substring(0, delimIndex);
    249                 var value = cookie.substring(delimIndex + 1);
    250                 var size = name.length + value.length;
    251                 cookies.push({ name: name, value: value, size: size });
    252             }
    253         }
    254 
    255         return cookies;
    256     },
    257 
    258     fallbackDataGridForCookies: function(cookies)
     195    simpleDataGridForCookies: function(cookies)
    259196    {
    260197        if (!cookies.length)
     
    313250    _deleteButtonClicked: function(event)
    314251    {
    315         if (!this._dataGrid || this._useFallback)
     252        if (!this._dataGrid)
    316253            return;
    317254
  • trunk/WebCore/inspector/front-end/DOMAgent.js

    r47513 r47656  
    11/*
    22 * Copyright (C) 2009 Google Inc. All rights reserved.
     3 * Copyright (C) 2009 Joseph Pecoraro
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    440441}
    441442
    442 WebInspector.CSSStyleDeclaration = function(payload) {
     443WebInspector.Cookies = {}
     444
     445WebInspector.Cookies.getCookiesAsync = function(callback)
     446{
     447    function mycallback(cookies, cookiesString) {
     448        if (cookiesString)
     449            callback(WebInspector.Cookies.buildCookiesFromString(cookiesString), false);
     450        else
     451            callback(cookies, true);
     452    }
     453    var callId = WebInspector.Callback.wrap(mycallback);
     454    InspectorController.getCookies(callId);
     455}
     456
     457WebInspector.Cookies.buildCookiesFromString = function(rawCookieString)
     458{
     459    var rawCookies = rawCookieString.split(/;\s*/);
     460    var cookies = [];
     461
     462    if (!(/^\s*$/.test(rawCookieString))) {
     463        for (var i = 0; i < rawCookies.length; ++i) {
     464            var cookie = rawCookies[i];
     465            var delimIndex = cookie.indexOf("=");
     466            var name = cookie.substring(0, delimIndex);
     467            var value = cookie.substring(delimIndex + 1);
     468            var size = name.length + value.length;
     469            cookies.push({ name: name, value: value, size: size });
     470        }
     471    }
     472
     473    return cookies;
     474}
     475
     476WebInspector.CSSStyleDeclaration = function(payload)
     477{
    443478    this.id = payload.id;
    444479    this.width = payload.width;
     
    608643}
    609644
     645WebInspector.didGetCookies = WebInspector.Callback.processCallback;
    610646WebInspector.didGetChildNodes = WebInspector.Callback.processCallback;
    611647WebInspector.didPerformSearch = WebInspector.Callback.processCallback;
     
    733769    }, 0);
    734770}
    735 
    736 InspectorController.getCookies = function(callback)
    737 {
    738     setTimeout(function() {
    739         callback(InjectedScript.getCookies());
    740     }, 0);
    741 }
  • trunk/WebCore/inspector/front-end/InjectedScript.js

    r47513 r47656  
    11/*
    22 * Copyright (C) 2007 Apple Inc.  All rights reserved.
    3  * Copyright (C) 2009 Joseph Pecoraro
    43 *
    54 * Redistribution and use in source and binary forms, with or without
     
    758757    InjectedScript._searchResults = [];
    759758    return true;
    760 }
    761 
    762 InjectedScript.getCookies = function()
    763 {
    764     return InjectedScript._window().document.cookie;
    765759}
    766760
  • trunk/WebCore/platform/Cookie.h

    r47205 r47656  
    3131namespace WebCore {
    3232
     33    // This struct is currently only used to provide more cookies information
     34    // to the Web Inspector.
     35
    3336    struct Cookie {
    3437        Cookie(const String& name, const String& value, const String& domain,
Note: See TracChangeset for help on using the changeset viewer.