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

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

Issue 2137773002: [DevTools] Replace the target type with capabilities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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
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 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 } 1166 }
1167 } 1167 }
1168 } 1168 }
1169 1169
1170 /** 1170 /**
1171 * @param {!WebInspector.Target} target 1171 * @param {!WebInspector.Target} target
1172 * @return {?WebInspector.CSSModel} 1172 * @return {?WebInspector.CSSModel}
1173 */ 1173 */
1174 WebInspector.CSSModel.fromTarget = function(target) 1174 WebInspector.CSSModel.fromTarget = function(target)
1175 { 1175 {
1176 if (!target.isPage())
1177 return null;
1178 return /** @type {?WebInspector.CSSModel} */ (target.model(WebInspector.CSSM odel)); 1176 return /** @type {?WebInspector.CSSModel} */ (target.model(WebInspector.CSSM odel));
1179 } 1177 }
1180 1178
1181 /** 1179 /**
1182 * @param {!WebInspector.DOMNode} node 1180 * @param {!WebInspector.DOMNode} node
1183 * @return {!WebInspector.CSSModel} 1181 * @return {!WebInspector.CSSModel}
1184 */ 1182 */
1185 WebInspector.CSSModel.fromNode = function(node) 1183 WebInspector.CSSModel.fromNode = function(node)
1186 { 1184 {
1187 return /** @type {!WebInspector.CSSModel} */ (WebInspector.CSSModel.fromTarg et(node.target())); 1185 return /** @type {!WebInspector.CSSModel} */ (WebInspector.CSSModel.fromTarg et(node.target()));
1188 } 1186 }
1189 1187
1190 /** 1188 /**
1191 * @constructor 1189 * @constructor
1192 * @param {?WebInspector.CSSStyleDeclaration} inlineStyle 1190 * @param {?WebInspector.CSSStyleDeclaration} inlineStyle
1193 * @param {?WebInspector.CSSStyleDeclaration} attributesStyle 1191 * @param {?WebInspector.CSSStyleDeclaration} attributesStyle
1194 */ 1192 */
1195 WebInspector.CSSModel.InlineStyleResult = function(inlineStyle, attributesStyle) 1193 WebInspector.CSSModel.InlineStyleResult = function(inlineStyle, attributesStyle)
1196 { 1194 {
1197 this.inlineStyle = inlineStyle; 1195 this.inlineStyle = inlineStyle;
1198 this.attributesStyle = attributesStyle; 1196 this.attributesStyle = attributesStyle;
1199 } 1197 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698