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

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

Issue 2778283002: [DevTools] Do not inherit SDK.DOMNode from SDK.SDKObject (Closed)
Patch Set: Created 3 years, 8 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 if (sourceURLLineIndex === -1) 84 if (sourceURLLineIndex === -1)
85 return text; 85 return text;
86 var sourceURLLine = text.substr(sourceURLLineIndex + 1).split('\n', 1)[0]; 86 var sourceURLLine = text.substr(sourceURLLineIndex + 1).split('\n', 1)[0];
87 var sourceURLRegex = /[\040\t]*\/\*[#@] sourceURL=[\040\t]*([^\s]*)[\040\t]* \*\/[\040\t]*$/; 87 var sourceURLRegex = /[\040\t]*\/\*[#@] sourceURL=[\040\t]*([^\s]*)[\040\t]* \*\/[\040\t]*$/;
88 if (sourceURLLine.search(sourceURLRegex) === -1) 88 if (sourceURLLine.search(sourceURLRegex) === -1)
89 return text; 89 return text;
90 return text.substr(0, sourceURLLineIndex) + text.substr(sourceURLLineIndex + sourceURLLine.length + 1); 90 return text.substr(0, sourceURLLineIndex) + text.substr(sourceURLLineIndex + sourceURLLine.length + 1);
91 } 91 }
92 92
93 /** 93 /**
94 * @param {!SDK.DOMNode} node
95 * @return {!SDK.CSSModel}
96 */
97 static fromNode(node) {
98 return /** @type {!SDK.CSSModel} */ (node.target().model(SDK.CSSModel));
99 }
100
101 /**
102 * @return {!SDK.DOMModel} 94 * @return {!SDK.DOMModel}
103 */ 95 */
104 domModel() { 96 domModel() {
105 return this._domModel; 97 return this._domModel;
106 } 98 }
107 99
108 /** 100 /**
109 * @param {!Protocol.CSS.StyleSheetId} styleSheetId 101 * @param {!Protocol.CSS.StyleSheetId} styleSheetId
110 * @param {!TextUtils.TextRange} range 102 * @param {!TextUtils.TextRange} range
111 * @param {string} text 103 * @param {string} text
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 SDK.CSSModel.InlineStyleResult = class { 1030 SDK.CSSModel.InlineStyleResult = class {
1039 /** 1031 /**
1040 * @param {?SDK.CSSStyleDeclaration} inlineStyle 1032 * @param {?SDK.CSSStyleDeclaration} inlineStyle
1041 * @param {?SDK.CSSStyleDeclaration} attributesStyle 1033 * @param {?SDK.CSSStyleDeclaration} attributesStyle
1042 */ 1034 */
1043 constructor(inlineStyle, attributesStyle) { 1035 constructor(inlineStyle, attributesStyle) {
1044 this.inlineStyle = inlineStyle; 1036 this.inlineStyle = inlineStyle;
1045 this.attributesStyle = attributesStyle; 1037 this.attributesStyle = attributesStyle;
1046 } 1038 }
1047 }; 1039 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698