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

Unified Diff: Source/devtools/front_end/elements/StylesSidebarPane.js

Issue 1210893002: DevTools: [CSS] introduce strong types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/elements/StylesSidebarPane.js
diff --git a/Source/devtools/front_end/elements/StylesSidebarPane.js b/Source/devtools/front_end/elements/StylesSidebarPane.js
index 28c3da877d3460293b6a8940f7b9abd82217f034..f1d0ded8ae369251053c5b29b8c9d80fbfc9cd9c 100644
--- a/Source/devtools/front_end/elements/StylesSidebarPane.js
+++ b/Source/devtools/front_end/elements/StylesSidebarPane.js
@@ -381,24 +381,25 @@ WebInspector.StylesSidebarPane.prototype = {
cssModel.getMatchedStylesAsync(node.id, false, false, matchedCallback);
/**
- * @param {?WebInspector.CSSStyleDeclaration} inlineStyle
- * @param {?WebInspector.CSSStyleDeclaration} attributesStyle
+ * @param {?WebInspector.CSSStyleModel.InlineStyleResult} inlineStyleResult
*/
- function inlineCallback(inlineStyle, attributesStyle)
+ function inlineCallback(inlineStyleResult)
{
- payload.inlineStyle = /** @type {?WebInspector.CSSStyleDeclaration} */(inlineStyle);
- payload.attributesStyle = /** @type {?WebInspector.CSSStyleDeclaration} */(attributesStyle);
+ if (!inlineStyleResult)
+ return;
+ payload.inlineStyle = inlineStyleResult.inlineStyle;
+ payload.attributesStyle = inlineStyleResult.attributesStyle;
}
/**
- * @param {?*} matchedResult
+ * @param {?WebInspector.CSSStyleModel.MatchedStyleResult} matchedResult
*/
function matchedCallback(matchedResult)
{
if (matchedResult) {
- payload.matchedCSSRules = /** @type {?Array.<!WebInspector.CSSRule>} */(matchedResult.matchedCSSRules);
- payload.pseudoElements = /** @type {?Array.<{pseudoId: number, rules: !Array.<!WebInspector.CSSRule>}>} */(matchedResult.pseudoElements);
- payload.inherited = /** @type {?Array.<{matchedCSSRules: !Array.<!WebInspector.CSSRule>}>} */(matchedResult.inherited);
+ payload.matchedCSSRules = matchedResult.matchedCSSRules;
+ payload.pseudoElements = matchedResult.pseudoElements;
+ payload.inherited = matchedResult.inherited;
}
callback(payload);
}
@@ -3149,9 +3150,9 @@ WebInspector.StylesSidebarPane.MatchedRulesPayload = function()
this.attributesStyle = null;
/** @type {?Array.<!WebInspector.CSSRule>} */
this.matchedCSSRules = null;
- /** @type {?Array.<{pseudoId: number, rules: !Array.<!WebInspector.CSSRule>}>} */
+ /** @type {?Array.<!WebInspector.CSSStyleModel.PseudoElementMatches>} */
this.pseudoElements = null;
- /** @type {?Array.<{matchedCSSRules: !Array.<!WebInspector.CSSRule>}>} */
+ /** @type {?Array.<!WebInspector.CSSStyleModel.InheritedMatches>} */
this.inherited = null;
}
« no previous file with comments | « Source/devtools/front_end/elements/PlatformFontsWidget.js ('k') | Source/devtools/front_end/sdk/CSSStyleModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698