OLD | NEW |
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 } | 112 } |
113 | 113 |
114 /** | 114 /** |
115 * @param {string} text | 115 * @param {string} text |
116 * @return {!Node} | 116 * @return {!Node} |
117 */ | 117 */ |
118 _processColor(text) { | 118 _processColor(text) { |
119 var color = Common.Color.parse(text); | 119 var color = Common.Color.parse(text); |
120 if (!color) | 120 if (!color) |
121 return createTextNode(text); | 121 return createTextNode(text); |
122 var swatch = UI.ColorSwatch.create(); | 122 var swatch = InlineEditor.ColorSwatch.create(); |
123 swatch.setColor(color); | 123 swatch.setColor(color); |
124 swatch.setFormat(Common.Color.detectColorFormat(color)); | 124 swatch.setFormat(Common.Color.detectColorFormat(color)); |
125 return swatch; | 125 return swatch; |
126 } | 126 } |
127 | 127 |
128 /** | 128 /** |
129 * @param {?Elements.ComputedStyleModel.ComputedStyle} nodeStyle | 129 * @param {?Elements.ComputedStyleModel.ComputedStyle} nodeStyle |
130 * @param {?SDK.CSSMatchedStyles} matchedStyles | 130 * @param {?SDK.CSSMatchedStyles} matchedStyles |
131 */ | 131 */ |
132 _innerRebuildUpdate(nodeStyle, matchedStyles) { | 132 _innerRebuildUpdate(nodeStyle, matchedStyles) { |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 var property = child[Elements.ComputedStyleWidget._propertySymbol]; | 336 var property = child[Elements.ComputedStyleWidget._propertySymbol]; |
337 var matched = !regex || regex.test(property.name) || regex.test(property.v
alue); | 337 var matched = !regex || regex.test(property.name) || regex.test(property.v
alue); |
338 child.hidden = !matched; | 338 child.hidden = !matched; |
339 } | 339 } |
340 } | 340 } |
341 }; | 341 }; |
342 | 342 |
343 Elements.ComputedStyleWidget._maxLinkLength = 30; | 343 Elements.ComputedStyleWidget._maxLinkLength = 30; |
344 | 344 |
345 Elements.ComputedStyleWidget._propertySymbol = Symbol('property'); | 345 Elements.ComputedStyleWidget._propertySymbol = Symbol('property'); |
OLD | NEW |