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 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2038 if (!shadows.length) | 2038 if (!shadows.length) |
2039 return createTextNode(propertyValue); | 2039 return createTextNode(propertyValue); |
2040 var container = createDocumentFragment(); | 2040 var container = createDocumentFragment(); |
2041 var swatchPopoverHelper = this._parentPane._swatchPopoverHelper; | 2041 var swatchPopoverHelper = this._parentPane._swatchPopoverHelper; |
2042 for (var i = 0; i < shadows.length; i++) { | 2042 for (var i = 0; i < shadows.length; i++) { |
2043 if (i !== 0) | 2043 if (i !== 0) |
2044 container.appendChild(createTextNode(", ")); // Add back commas
and spaces between each shadow. | 2044 container.appendChild(createTextNode(", ")); // Add back commas
and spaces between each shadow. |
2045 // TODO(flandy): editing the property value should use the original
value with all spaces. | 2045 // TODO(flandy): editing the property value should use the original
value with all spaces. |
2046 var cssShadowSwatch = WebInspector.CSSShadowSwatch.create(); | 2046 var cssShadowSwatch = WebInspector.CSSShadowSwatch.create(); |
2047 cssShadowSwatch.setCSSShadow(shadows[i]); | 2047 cssShadowSwatch.setCSSShadow(shadows[i]); |
| 2048 new WebInspector.ShadowSwatchPopoverHelper(this, swatchPopoverHelper
, cssShadowSwatch); |
2048 if (cssShadowSwatch.colorSwatch()) | 2049 if (cssShadowSwatch.colorSwatch()) |
2049 var colorSwatchIcon = new WebInspector.ColorSwatchPopoverIcon(th
is, swatchPopoverHelper, cssShadowSwatch.colorSwatch()); | 2050 var colorSwatchIcon = new WebInspector.ColorSwatchPopoverIcon(th
is, swatchPopoverHelper, cssShadowSwatch.colorSwatch()); |
2050 container.appendChild(cssShadowSwatch); | 2051 container.appendChild(cssShadowSwatch); |
2051 } | 2052 } |
2052 return container; | 2053 return container; |
2053 }, | 2054 }, |
2054 | 2055 |
2055 _updateState: function() | 2056 _updateState: function() |
2056 { | 2057 { |
2057 if (!this.listItemElement) | 2058 if (!this.listItemElement) |
(...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3149 | 3150 |
3150 /** | 3151 /** |
3151 * @override | 3152 * @override |
3152 * @return {!WebInspector.ToolbarItem} | 3153 * @return {!WebInspector.ToolbarItem} |
3153 */ | 3154 */ |
3154 item: function() | 3155 item: function() |
3155 { | 3156 { |
3156 return this._button; | 3157 return this._button; |
3157 } | 3158 } |
3158 } | 3159 } |
OLD | NEW |