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