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

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

Issue 11173005: Merge 130914 - Web Inspector: [Regression] Stale revisions are not cleared when inspector is opened… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 2 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 | « no previous file | 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 /** 31 /**
32 * @constructor 32 * @constructor
33 */ 33 */
34 WebInspector.WorkspaceController = function(workspace) 34 WebInspector.WorkspaceController = function(workspace)
35 { 35 {
36 this._workspace = workspace; 36 this._workspace = workspace;
37 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.MainFrameNavigated, this._mainFrameNavigated, this); 37 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.MainFrameNavigated, this._mainFrameNavigated, this);
38 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.FrameAdded, this._frameAdded, this);
38 } 39 }
39 40
40 WebInspector.WorkspaceController.prototype = { 41 WebInspector.WorkspaceController.prototype = {
41 _mainFrameNavigated: function() 42 _mainFrameNavigated: function()
42 { 43 {
43 WebInspector.Revision.filterOutStaleRevisions(); 44 WebInspector.Revision.filterOutStaleRevisions();
44 this._workspace.dispatchEventToListeners(WebInspector.Workspace.Events.P rojectWillReset, this._workspace.project()); 45 this._workspace.dispatchEventToListeners(WebInspector.Workspace.Events.P rojectWillReset, this._workspace.project());
45 this._workspace.project().reset(); 46 this._workspace.project().reset();
46 this._workspace.dispatchEventToListeners(WebInspector.Workspace.Events.P rojectDidReset, this._workspace.project()); 47 this._workspace.dispatchEventToListeners(WebInspector.Workspace.Events.P rojectDidReset, this._workspace.project());
48 },
49
50 _frameAdded: function(event)
51 {
52 var frame = /** @type {WebInspector.ResourceTreeFrame} */ event.data;
53 if (frame.isMainFrame())
54 WebInspector.Revision.filterOutStaleRevisions();
47 } 55 }
48 } 56 }
49 57
50 /** 58 /**
51 * @type {?WebInspector.WorkspaceController} 59 * @type {?WebInspector.WorkspaceController}
52 */ 60 */
53 WebInspector.workspaceController = null; 61 WebInspector.workspaceController = null;
54 62
55 /** 63 /**
56 * @constructor 64 * @constructor
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 return this._project.uiSourceCodes(); 171 return this._project.uiSourceCodes();
164 } 172 }
165 } 173 }
166 174
167 WebInspector.Workspace.prototype.__proto__ = WebInspector.Object.prototype; 175 WebInspector.Workspace.prototype.__proto__ = WebInspector.Object.prototype;
168 176
169 /** 177 /**
170 * @type {?WebInspector.Workspace} 178 * @type {?WebInspector.Workspace}
171 */ 179 */
172 WebInspector.workspace = null; 180 WebInspector.workspace = null;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698