Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 } |
| OLD | NEW |