Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Side by Side Diff: Source/WebCore/inspector/front-end/ResourcesPanel.js

Issue 12700007: Revert 142161 "Web Inspector: CPU pegged when inspecting LocalSt..." (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebCore/inspector/front-end/DOMStorageItemsView.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * Copyright (C) 2013 Samsung Electronics. All rights reserved.
5 * 4 *
6 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
8 * are met: 7 * are met:
9 * 8 *
10 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 110
112 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.OnLoad, this._onLoadEventFired, this); 111 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.OnLoad, this._onLoadEventFired, this);
113 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.CachedResourcesLoaded, this._cachedResourcesLoaded, this); 112 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.CachedResourcesLoaded, this._cachedResourcesLoaded, this);
114 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.WillLoadCachedResources, this._resetWithFrames, this); 113 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.WillLoadCachedResources, this._resetWithFrames, this);
115 114
116 WebInspector.databaseModel.databases().forEach(this._addDatabase.bind(this)) ; 115 WebInspector.databaseModel.databases().forEach(this._addDatabase.bind(this)) ;
117 WebInspector.databaseModel.addEventListener(WebInspector.DatabaseModel.Event s.DatabaseAdded, this._databaseAdded, this); 116 WebInspector.databaseModel.addEventListener(WebInspector.DatabaseModel.Event s.DatabaseAdded, this._databaseAdded, this);
118 117
119 WebInspector.domStorageModel.storages().forEach(this._addDOMStorage.bind(thi s)); 118 WebInspector.domStorageModel.storages().forEach(this._addDOMStorage.bind(thi s));
120 WebInspector.domStorageModel.addEventListener(WebInspector.DOMStorageModel.E vents.DOMStorageAdded, this._domStorageAdded, this); 119 WebInspector.domStorageModel.addEventListener(WebInspector.DOMStorageModel.E vents.DOMStorageAdded, this._domStorageAdded, this);
120 WebInspector.domStorageModel.addEventListener(WebInspector.DOMStorageModel.E vents.DOMStorageUpdated, this._domStorageUpdated, this);
121 } 121 }
122 122
123 WebInspector.ResourcesPanel.prototype = { 123 WebInspector.ResourcesPanel.prototype = {
124 get statusBarItems() 124 get statusBarItems()
125 { 125 {
126 return [this.storageViewStatusBarItemsContainer]; 126 return [this.storageViewStatusBarItemsContainer];
127 }, 127 },
128 128
129 wasShown: function() 129 wasShown: function()
130 { 130 {
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 }, 462 },
463 463
464 _showDOMStorage: function(domStorage) 464 _showDOMStorage: function(domStorage)
465 { 465 {
466 if (!domStorage) 466 if (!domStorage)
467 return; 467 return;
468 468
469 var view; 469 var view;
470 view = this._domStorageViews.get(domStorage); 470 view = this._domStorageViews.get(domStorage);
471 if (!view) { 471 if (!view) {
472 view = new WebInspector.DOMStorageItemsView(domStorage, WebInspector .domStorageModel); 472 view = new WebInspector.DOMStorageItemsView(domStorage);
473 this._domStorageViews.put(domStorage, view); 473 this._domStorageViews.put(domStorage, view);
474 } 474 }
475 475
476 this._innerShowView(view); 476 this._innerShowView(view);
477 }, 477 },
478 478
479 showCookies: function(treeElement, cookieDomain) 479 showCookies: function(treeElement, cookieDomain)
480 { 480 {
481 var view = this._cookieViews[cookieDomain]; 481 var view = this._cookieViews[cookieDomain];
482 if (!view) { 482 if (!view) {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 if (!(tableName in tableNamesHash)) { 565 if (!(tableName in tableNamesHash)) {
566 if (self.visibleView === tableViews[tableName]) 566 if (self.visibleView === tableViews[tableName])
567 self.closeVisibleView(); 567 self.closeVisibleView();
568 delete tableViews[tableName]; 568 delete tableViews[tableName];
569 } 569 }
570 } 570 }
571 } 571 }
572 database.getTableNames(tableNamesCallback); 572 database.getTableNames(tableNamesCallback);
573 }, 573 },
574 574
575 /**
576 * @param {WebInspector.Event} event
577 */
578 _domStorageUpdated: function(event)
579 {
580 var storage = /** @type {WebInspector.DOMStorage}*/ (event.data);
581 var view = this._domStorageViews.get(storage);
582 if (this.visibleView && view === this.visibleView)
583 view.update();
584 },
585
575 _populateApplicationCacheTree: function() 586 _populateApplicationCacheTree: function()
576 { 587 {
577 this._applicationCacheModel = new WebInspector.ApplicationCacheModel(); 588 this._applicationCacheModel = new WebInspector.ApplicationCacheModel();
578 589
579 this._applicationCacheViews = {}; 590 this._applicationCacheViews = {};
580 this._applicationCacheFrameElements = {}; 591 this._applicationCacheFrameElements = {};
581 this._applicationCacheManifestElements = {}; 592 this._applicationCacheManifestElements = {};
582 593
583 this._applicationCacheModel.addEventListener(WebInspector.ApplicationCac heModel.EventTypes.FrameManifestAdded, this._applicationCacheFrameManifestAdded, this); 594 this._applicationCacheModel.addEventListener(WebInspector.ApplicationCac heModel.EventTypes.FrameManifestAdded, this._applicationCacheFrameManifestAdded, this);
584 this._applicationCacheModel.addEventListener(WebInspector.ApplicationCac heModel.EventTypes.FrameManifestRemoved, this._applicationCacheFrameManifestRemo ved, this); 595 this._applicationCacheModel.addEventListener(WebInspector.ApplicationCac heModel.EventTypes.FrameManifestRemoved, this._applicationCacheFrameManifestRemo ved, this);
(...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after
2217 */ 2228 */
2218 _lastTreeElement: function() 2229 _lastTreeElement: function()
2219 { 2230 {
2220 var treeElement = this._root; 2231 var treeElement = this._root;
2221 var nextTreeElement; 2232 var nextTreeElement;
2222 while (nextTreeElement = this._traverseNext(treeElement)) 2233 while (nextTreeElement = this._traverseNext(treeElement))
2223 treeElement = nextTreeElement; 2234 treeElement = nextTreeElement;
2224 return treeElement; 2235 return treeElement;
2225 } 2236 }
2226 } 2237 }
OLDNEW
« no previous file with comments | « Source/WebCore/inspector/front-end/DOMStorageItemsView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698