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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/ColorSwatch.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/ui/ColorSwatch.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/ColorSwatch.js b/third_party/WebKit/Source/devtools/front_end/ui/ColorSwatch.js
index 1665dc731302450d80a868f536c87612d126b59d..31f9eda3b3cab98265559ebb859e851e6f3c44b9 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/ColorSwatch.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/ColorSwatch.js
@@ -261,13 +261,13 @@ WebInspector.CSSShadowSwatch.prototype = {
setCSSShadow: function(model)
{
this._model = model;
- this._colorSwatch = null;
this._contentElement.removeChildren();
var results = WebInspector.TextUtils.splitStringByRegexes(model.asCSSText(), [/inset/g, WebInspector.Color.Regex]);
for (var i = 0; i < results.length; i++) {
var result = results[i];
if (result.regexIndex === 1) {
- this._colorSwatch = WebInspector.ColorSwatch.create();
+ if (!this._colorSwatch)
+ this._colorSwatch = WebInspector.ColorSwatch.create();
this._colorSwatch.setColorText(result.value);
this._contentElement.appendChild(this._colorSwatch);
} else {
@@ -293,7 +293,7 @@ WebInspector.CSSShadowSwatch.prototype = {
},
/**
- * @return {!WebInspector.ColorSwatch}
+ * @return {?WebInspector.ColorSwatch}
*/
colorSwatch: function()
{
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698