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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js

Issue 2343773002: DevTools: Autocomplete class names in ClassesPaneWidget (Closed)
Patch Set: Created 4 years, 3 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 if (!node) 527 if (!node)
528 return null; 528 return null;
529 529
530 return new WebInspector.CSSMatchedStyles(this, node, inlinePayload | | null, attributesPayload || null, matchedPayload || [], pseudoPayload || [], in heritedPayload || [], animationsPayload || []); 530 return new WebInspector.CSSMatchedStyles(this, node, inlinePayload | | null, attributesPayload || null, matchedPayload || [], pseudoPayload || [], in heritedPayload || [], animationsPayload || []);
531 } 531 }
532 532
533 return this._agent.getMatchedStylesForNode(nodeId, callback.bind(this)); 533 return this._agent.getMatchedStylesForNode(nodeId, callback.bind(this));
534 }, 534 },
535 535
536 /** 536 /**
537 * @param {!CSSAgent.StyleSheetId} styleSheetId
538 * @return {!Promise<?Array<string>>}
lushnikov 2016/09/15 17:58:31 let's fulfill with !Array<string>
539 */
540 classNamesPromise: function(styleSheetId)
541 {
542 /**
543 * @param {?string} error
544 * @param {!Array<string>} classNames
545 * @return {?Array<string>}
546 */
547 function classNamesCallback(error, classNames)
548 {
549 return !error && classNames ? classNames : null;
550 }
551 return this._agent.collectClassNames(styleSheetId, classNamesCallback);
552 },
553
554 /**
537 * @param {!DOMAgent.NodeId} nodeId 555 * @param {!DOMAgent.NodeId} nodeId
538 * @return {!Promise.<?Map.<string, string>>} 556 * @return {!Promise.<?Map.<string, string>>}
539 */ 557 */
540 computedStylePromise: function(nodeId) 558 computedStylePromise: function(nodeId)
541 { 559 {
542 return this._styleLoader.computedStylePromise(nodeId); 560 return this._styleLoader.computedStylePromise(nodeId);
543 }, 561 },
544 562
545 /** 563 /**
546 * @param {number} nodeId 564 * @param {number} nodeId
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 /** 1247 /**
1230 * @constructor 1248 * @constructor
1231 * @param {?WebInspector.CSSStyleDeclaration} inlineStyle 1249 * @param {?WebInspector.CSSStyleDeclaration} inlineStyle
1232 * @param {?WebInspector.CSSStyleDeclaration} attributesStyle 1250 * @param {?WebInspector.CSSStyleDeclaration} attributesStyle
1233 */ 1251 */
1234 WebInspector.CSSModel.InlineStyleResult = function(inlineStyle, attributesStyle) 1252 WebInspector.CSSModel.InlineStyleResult = function(inlineStyle, attributesStyle)
1235 { 1253 {
1236 this.inlineStyle = inlineStyle; 1254 this.inlineStyle = inlineStyle;
1237 this.attributesStyle = attributesStyle; 1255 this.attributesStyle = attributesStyle;
1238 } 1256 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698