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

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

Issue 881263002: DevTools: use target-based model accessors only. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
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 2436 matching lines...) Expand 10 before | Expand all | Expand 10 after
2447 * @extends {WebInspector.StylePropertiesSection} 2447 * @extends {WebInspector.StylePropertiesSection}
2448 * @param {!WebInspector.StylesSidebarPane} stylesPane 2448 * @param {!WebInspector.StylesSidebarPane} stylesPane
2449 * @param {string} defaultSelectorText 2449 * @param {string} defaultSelectorText
2450 * @param {string} styleSheetId 2450 * @param {string} styleSheetId
2451 * @param {!WebInspector.TextRange} ruleLocation 2451 * @param {!WebInspector.TextRange} ruleLocation
2452 * @param {!WebInspector.StylesSectionModel} insertAfterStyleRule 2452 * @param {!WebInspector.StylesSectionModel} insertAfterStyleRule
2453 */ 2453 */
2454 WebInspector.BlankStylePropertiesSection = function(stylesPane, defaultSelectorT ext, styleSheetId, ruleLocation, insertAfterStyleRule) 2454 WebInspector.BlankStylePropertiesSection = function(stylesPane, defaultSelectorT ext, styleSheetId, ruleLocation, insertAfterStyleRule)
2455 { 2455 {
2456 var dummyCascade = new WebInspector.SectionCascade(); 2456 var dummyCascade = new WebInspector.SectionCascade();
2457 var blankSectionModel = dummyCascade.appendModelFromStyle(WebInspector.CSSSt yleDeclaration.createDummyStyle(), defaultSelectorText); 2457 var blankSectionModel = dummyCascade.appendModelFromStyle(WebInspector.CSSSt yleDeclaration.createDummyStyle(stylesPane._target), defaultSelectorText);
2458 blankSectionModel.setEditable(true); 2458 blankSectionModel.setEditable(true);
2459 WebInspector.StylePropertiesSection.call(this, stylesPane, blankSectionModel ); 2459 WebInspector.StylePropertiesSection.call(this, stylesPane, blankSectionModel );
2460 this._ruleLocation = ruleLocation; 2460 this._ruleLocation = ruleLocation;
2461 this._styleSheetId = styleSheetId; 2461 this._styleSheetId = styleSheetId;
2462 this._selectorRefElement.removeChildren(); 2462 this._selectorRefElement.removeChildren();
2463 this._selectorRefElement.appendChild(WebInspector.StylePropertiesSection._li nkifyRuleLocation(this._parentPane._target, this._parentPane._linkifier, styleSh eetId, this._actualRuleLocation())); 2463 this._selectorRefElement.appendChild(WebInspector.StylePropertiesSection._li nkifyRuleLocation(this._parentPane._target, this._parentPane._linkifier, styleSh eetId, this._actualRuleLocation()));
2464 if (insertAfterStyleRule) 2464 if (insertAfterStyleRule)
2465 this._createMediaList(insertAfterStyleRule.media()); 2465 this._createMediaList(insertAfterStyleRule.media());
2466 this._insertAfterStyleRule = insertAfterStyleRule; 2466 this._insertAfterStyleRule = insertAfterStyleRule;
2467 this.element.classList.add("blank-section"); 2467 this.element.classList.add("blank-section");
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after
4046 4046
4047 WebInspector.StylesSidebarPane.MatchedRulesPayload.prototype = { 4047 WebInspector.StylesSidebarPane.MatchedRulesPayload.prototype = {
4048 /** 4048 /**
4049 * @return {boolean} 4049 * @return {boolean}
4050 */ 4050 */
4051 fulfilled: function() 4051 fulfilled: function()
4052 { 4052 {
4053 return !!(this.matchedCSSRules && this.pseudoElements && this.inherited) ; 4053 return !!(this.matchedCSSRules && this.pseudoElements && this.inherited) ;
4054 } 4054 }
4055 } 4055 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/bindings/SASSSourceMapping.js ('k') | Source/devtools/front_end/extensions/ExtensionPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698