Changeset 51182 in webkit
- Timestamp:
- Nov 19, 2009 5:03:10 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r51179 r51182 1 2009-11-19 Alexander Pavlov <apavlov@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Store cookie domains in the WebInspector object 6 7 The cookie domains have been moved from StoragePanel into WebInspector. 8 Also, the document URLs are now passed inside the WebInspector.addResource() 9 payload rather than pushed directly from InspectorController. 10 https://bugs.webkit.org/show_bug.cgi?id=31627 11 12 * inspector/InspectorController.cpp: 13 (WebCore::InspectorController::populateScriptObjects): 14 (WebCore::InspectorController::didFinishLoading): 15 * inspector/InspectorFrontend.cpp: 16 * inspector/InspectorFrontend.h: 17 * inspector/InspectorResource.cpp: 18 (WebCore::InspectorResource::createScriptObject): 19 (WebCore::InspectorResource::updateScriptObject): 20 * inspector/front-end/StoragePanel.js: 21 (WebInspector.StoragePanel.prototype.reset): 22 (WebInspector.StoragePanel.prototype.addCookieDomain): 23 * inspector/front-end/inspector.js: 24 (WebInspector.addResource): 25 (WebInspector.addCookieDomain): 26 (WebInspector.reset): 27 1 28 2009-11-19 Zoltan Horvath <zoltan@webkit.org> 2 29 -
trunk/WebCore/inspector/InspectorController.cpp
r51117 r51182 671 671 672 672 ResourcesMap::iterator resourcesEnd = m_resources.end(); 673 for (ResourcesMap::iterator it = m_resources.begin(); it != resourcesEnd; ++it) {673 for (ResourcesMap::iterator it = m_resources.begin(); it != resourcesEnd; ++it) 674 674 it->second->createScriptObject(m_frontend.get()); 675 KURL resourceURL = it->second->frame()->document()->url();676 if (resourceURL.protocolInHTTPFamily() || resourceURL.protocolIs("file"))677 m_frontend->addCookieDomain(resourceURL.host());678 }679 675 680 676 unsigned messageCount = m_consoleMessages.size(); … … 1012 1008 addResource(resource.get()); 1013 1009 1014 if (windowVisible()) {1010 if (windowVisible()) 1015 1011 resource->updateScriptObject(m_frontend.get()); 1016 KURL resourceURL = resource->frame()->document()->url();1017 if (resourceURL.protocolInHTTPFamily() || resourceURL.protocolIs("file"))1018 m_frontend->addCookieDomain(resourceURL.host());1019 }1020 1012 } 1021 1013 -
trunk/WebCore/inspector/InspectorFrontend.cpp
r50337 r51182 133 133 } 134 134 135 void InspectorFrontend::addCookieDomain(String domain)136 {137 OwnPtr<ScriptFunctionCall> function(newFunctionCall("addCookieDomain"));138 function->appendArgument(domain);139 function->call();140 }141 142 135 void InspectorFrontend::updateFocusedNode(long long nodeId) 143 136 { -
trunk/WebCore/inspector/InspectorFrontend.h
r50125 r51182 71 71 bool updateResource(long long identifier, const ScriptObject& resourceObj); 72 72 void removeResource(long long identifier); 73 74 void addCookieDomain(String);75 73 76 74 void updateFocusedNode(long long nodeId); -
trunk/WebCore/inspector/InspectorResource.cpp
r50905 r51182 129 129 populateHeadersObject(&requestHeaders, m_requestHeaderFields); 130 130 jsonObject.set("requestHeaders", requestHeaders); 131 jsonObject.set("documentURL", m_frame->document()->url().string()); 131 132 jsonObject.set("requestURL", requestURL()); 132 133 jsonObject.set("host", m_requestURL.host()); … … 157 158 if (m_changes.hasChange(RequestChange)) { 158 159 jsonObject.set("url", requestURL()); 160 jsonObject.set("documentURL", m_frame->document()->url().string()); 159 161 jsonObject.set("domain", m_requestURL.host()); 160 162 jsonObject.set("path", m_requestURL.path()); -
trunk/WebCore/inspector/front-end/StoragePanel.js
r50033 r51182 98 98 this._domStorage = []; 99 99 100 this._cookieDomains = {};101 100 this._cookieViews = {}; 102 101 … … 125 124 addCookieDomain: function(domain) 126 125 { 127 // Eliminate duplicate domains from the list.128 if (typeof this._cookieDomains[domain] !== "undefined")129 return;130 131 126 var cookieDomainTreeElement = new WebInspector.CookieSidebarTreeElement(domain); 132 127 this.cookieListTreeElement.appendChild(cookieDomainTreeElement); 133 this._cookieDomains[domain] = true;134 128 }, 135 129 -
trunk/WebCore/inspector/front-end/inspector.js
r51134 r51182 71 71 resources: {}, 72 72 resourceURLMap: {}, 73 cookieDomains: {}, 73 74 missingLocalizedStrings: {}, 74 75 … … 985 986 if (this.panels.resources) 986 987 this.panels.resources.addResource(resource); 988 989 var match = payload.documentURL.match(/^(http[s]?|file):\/\/([\/]*[^\/]+)/i); 990 if (match) 991 this.addCookieDomain(match[1].toLowerCase() === "file" ? "" : match[2]); 987 992 } 988 993 … … 1096 1101 WebInspector.addCookieDomain = function(domain) 1097 1102 { 1103 // Eliminate duplicate domains from the list. 1104 if (domain in this.cookieDomains) 1105 return; 1106 this.cookieDomains[domain] = true; 1107 1098 1108 if (!this.panels.storage) 1099 1109 return; … … 1196 1206 this.resources = {}; 1197 1207 this.resourceURLMap = {}; 1208 this.cookieDomains = {}; 1198 1209 this.hoveredDOMNode = null; 1199 1210
Note: See TracChangeset
for help on using the changeset viewer.