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

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

Issue 368013002: DevTools: [CSS] fix style ranges updating (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
« no previous file with comments | « LayoutTests/inspector/elements/styles/styles-update-links-expected.txt ('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 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 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 /** 1149 /**
1150 * @param {!WebInspector.CSSRule} editedRule 1150 * @param {!WebInspector.CSSRule} editedRule
1151 * @param {!WebInspector.TextRange} oldRange 1151 * @param {!WebInspector.TextRange} oldRange
1152 * @param {!WebInspector.TextRange} newRange 1152 * @param {!WebInspector.TextRange} newRange
1153 */ 1153 */
1154 _styleSheetRuleEdited: function(editedRule, oldRange, newRange) 1154 _styleSheetRuleEdited: function(editedRule, oldRange, newRange)
1155 { 1155 {
1156 if (!this.rule || !this.rule.styleSheetId) 1156 if (!this.rule || !this.rule.styleSheetId)
1157 return; 1157 return;
1158 if (this.rule !== editedRule) 1158 if (this.rule !== editedRule)
1159 this.rule.sourceStyleSheetEdited(this.rule.styleSheetId, oldRange, n ewRange); 1159 this.rule.sourceStyleSheetEdited(editedRule.styleSheetId, oldRange, newRange);
1160 this._updateMediaList(); 1160 this._updateMediaList();
1161 this._updateRuleOrigin(); 1161 this._updateRuleOrigin();
1162 }, 1162 },
1163 1163
1164 /** 1164 /**
1165 * @param {!Object} styleRule 1165 * @param {!Object} styleRule
1166 */ 1166 */
1167 _createMediaList: function(styleRule) 1167 _createMediaList: function(styleRule)
1168 { 1168 {
1169 if (!styleRule.media) 1169 if (!styleRule.media)
(...skipping 2162 matching lines...) Expand 10 before | Expand all | Expand 10 after
3332 return; 3332 return;
3333 } 3333 }
3334 3334
3335 var results = this._cssCompletions.startsWith(prefix); 3335 var results = this._cssCompletions.startsWith(prefix);
3336 var selectedIndex = this._cssCompletions.mostUsedOf(results); 3336 var selectedIndex = this._cssCompletions.mostUsedOf(results);
3337 completionsReadyCallback(results, selectedIndex); 3337 completionsReadyCallback(results, selectedIndex);
3338 }, 3338 },
3339 3339
3340 __proto__: WebInspector.TextPrompt.prototype 3340 __proto__: WebInspector.TextPrompt.prototype
3341 } 3341 }
OLDNEW
« no previous file with comments | « LayoutTests/inspector/elements/styles/styles-update-links-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698