12009-10-07 Brian Weinstein <bweinstein@apple.com>
2
3 Reviewed by NOBODY (OOPS!).
4
5 Fixes <http://webkit.org/b/30104>.
6 Inspector should show cookies of sub-resources on the page.
7
8 This function implements showing cookies for all sub-resources of a page.
9 When the page is loaded, it populates the Storage Panel with a list of all
10 domains that were loaded as part of the full page load (iframes, ads, etc).
11 When the user selects one of the domains, the inspector calls back into the
12 controller, and the controller combines all of the cookies from that domain
13 into a list, and sends that list is sent back to the controller to render.
14
15 A domain now needs to be passed into CookieItemsView, and CookieSidebarTreeElement.
16
17 As a result of a previous patch, we now have detailed cookie information for
18 both Windows on CFNetwork and Mac.
19
20 * bindings/js/ScriptObject.cpp:
21 (WebCore::ScriptObject::set):
22 * bindings/js/ScriptObject.h:
23 * inspector/InspectorBackend.cpp:
24 (WebCore::InspectorBackend::getCookies):
25 (WebCore::InspectorBackend::deleteCookie):
26 * inspector/InspectorBackend.h:
27 * inspector/InspectorBackend.idl:
28 * inspector/InspectorController.cpp:
29 (WebCore::InspectorController::populateScriptObjects):
30 (WebCore::InspectorController::didFinishLoading):
31 (WebCore::InspectorController::getCookies):
32 (WebCore::InspectorController::buildArrayForCookies):
33 (WebCore::InspectorController::buildObjectForCookie):
34 (WebCore::InspectorController::deleteCookie):
35 * inspector/InspectorController.h:
36 * inspector/InspectorDOMAgent.cpp:
37 * inspector/InspectorDOMAgent.h:
38 * inspector/InspectorFrontend.cpp:
39 (WebCore::InspectorFrontend::addCookieDomainForDocument):
40 * inspector/InspectorFrontend.h:
41 * inspector/front-end/CookieItemsView.js:
42 (WebInspector.CookieItemsView):
43 (WebInspector.CookieItemsView.prototype.update):
44 (WebInspector.CookieItemsView.prototype._deleteButtonClicked):
45 * inspector/front-end/DOMAgent.js:
46 (WebInspector.Cookies.getCookiesAsync):
47 * inspector/front-end/StoragePanel.js:
48 (WebInspector.StoragePanel):
49 (WebInspector.StoragePanel.prototype.reset):
50 (WebInspector.StoragePanel.prototype.addCookieDomain):
51 (WebInspector.StoragePanel.prototype.showCookies):
52 (WebInspector.CookieSidebarTreeElement):
53 (WebInspector.CookieSidebarTreeElement.prototype.onselect):
54 * inspector/front-end/inspector.js:
55 (WebInspector.addCookieDomain):
56 * platform/Cookie.h:
57 (WebCore::CookieHash::hash):
58 (WebCore::CookieHash::equal):
59 (WTF::):
60