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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js

Issue 2168323002: [DevTools] Explicitly require ResourceTreeModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: URL management was split into a separate CL Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 return blocks; 375 return blocks;
376 }, 376 },
377 377
378 _createNewRuleInViaInspectorStyleSheet: function() 378 _createNewRuleInViaInspectorStyleSheet: function()
379 { 379 {
380 var cssModel = this.cssModel(); 380 var cssModel = this.cssModel();
381 var node = this.node(); 381 var node = this.node();
382 if (!cssModel || !node) 382 if (!cssModel || !node)
383 return; 383 return;
384 this._userOperation = true; 384 this._userOperation = true;
385 cssModel.requestViaInspectorStylesheet(node, onViaInspectorStyleSheet.bi nd(this)); 385 var frameId = node.frameId() || this.resourceTreeModel().mainFrame.id;
pfeldman 2016/07/27 17:54:35 We should be able to operate nodes only here.
eostroukhov-old 2016/08/05 18:32:03 Reverted the change.
386 cssModel.requestViaInspectorStylesheet(node, frameId, onViaInspectorStyl eSheet.bind(this));
386 387
387 /** 388 /**
388 * @param {?WebInspector.CSSStyleSheetHeader} styleSheetHeader 389 * @param {?WebInspector.CSSStyleSheetHeader} styleSheetHeader
389 * @this {WebInspector.StylesSidebarPane} 390 * @this {WebInspector.StylesSidebarPane}
390 */ 391 */
391 function onViaInspectorStyleSheet(styleSheetHeader) 392 function onViaInspectorStyleSheet(styleSheetHeader)
392 { 393 {
393 delete this._userOperation; 394 delete this._userOperation;
394 this._createNewRuleInStyleSheet(styleSheetHeader); 395 this._createNewRuleInStyleSheet(styleSheetHeader);
395 } 396 }
(...skipping 2715 matching lines...) Expand 10 before | Expand all | Expand 10 after
3111 3112
3112 /** 3113 /**
3113 * @override 3114 * @override
3114 * @return {!WebInspector.ToolbarItem} 3115 * @return {!WebInspector.ToolbarItem}
3115 */ 3116 */
3116 item: function() 3117 item: function()
3117 { 3118 {
3118 return this._button; 3119 return this._button;
3119 } 3120 }
3120 } 3121 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698