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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js

Issue 2307463004: DevTools: Allow clicks to register in SSP when swatch popover is open (Closed)
Patch Set: Add comment Created 4 years, 3 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) 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
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 if (cssShadowSwatch.colorSwatch()) 2051 var colorSwatch = cssShadowSwatch.colorSwatch();
2052 var colorSwatchIcon = new WebInspector.ColorSwatchPopoverIcon(th is, swatchPopoverHelper, cssShadowSwatch.colorSwatch()); 2052 if (colorSwatch)
2053 new WebInspector.ColorSwatchPopoverIcon(this, swatchPopoverHelpe r, colorSwatch);
2053 container.appendChild(cssShadowSwatch); 2054 container.appendChild(cssShadowSwatch);
2054 } 2055 }
2055 return container; 2056 return container;
2056 }, 2057 },
2057 2058
2058 _updateState: function() 2059 _updateState: function()
2059 { 2060 {
2060 if (!this.listItemElement) 2061 if (!this.listItemElement)
2061 return; 2062 return;
2062 2063
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
3152 3153
3153 /** 3154 /**
3154 * @override 3155 * @override
3155 * @return {!WebInspector.ToolbarItem} 3156 * @return {!WebInspector.ToolbarItem}
3156 */ 3157 */
3157 item: function() 3158 item: function()
3158 { 3159 {
3159 return this._button; 3160 return this._button;
3160 } 3161 }
3161 } 3162 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698