Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js |
| index ecce5577c5b26f8c001591d64c9801b97ae7414a..da64fe5b9065423470e4a884362f4de0df8128a2 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js |
| @@ -2027,11 +2027,14 @@ WebInspector.StylePropertyTreeElement.prototype = { |
| { |
| if (!this._editable()) |
| return createTextNode(propertyValue); |
| - var shadows; |
| - if (propertyName === "text-shadow") |
| + var shadows, isBoxShadow; |
|
dgozman
2016/08/24 19:18:30
style: one variable per declaration
flandy
2016/08/24 22:08:41
Done.
|
| + if (propertyName === "text-shadow") { |
| shadows = WebInspector.CSSShadowModel.parseTextShadow(propertyValue); |
| - else |
| + isBoxShadow = false; |
| + } else { |
| shadows = WebInspector.CSSShadowModel.parseBoxShadow(propertyValue); |
| + isBoxShadow = true; |
| + } |
| if (!shadows.length) |
| return createTextNode(propertyValue); |
| var container = createDocumentFragment(); |
| @@ -2042,6 +2045,7 @@ WebInspector.StylePropertyTreeElement.prototype = { |
| // TODO(flandy): editing the property value should use the original value with all spaces. |
| var cssShadowSwatch = WebInspector.CSSShadowSwatch.create(); |
| cssShadowSwatch.setCSSShadow(shadows[i]); |
| + new WebInspector.ShadowSwatchPopoverHelper(this, swatchPopoverHelper, cssShadowSwatch, isBoxShadow); |
| container.appendChild(cssShadowSwatch); |
| } |
| return container; |