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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/ColorSwatch.js

Issue 2320533005: Revert of DevTools: Allow clicks to register in SSP when swatch popover is open (Closed)
Patch Set: 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
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 31f9eda3b3cab98265559ebb859e851e6f3c44b9..1665dc731302450d80a868f536c87612d126b59d 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 @@
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) {
- if (!this._colorSwatch)
- this._colorSwatch = WebInspector.ColorSwatch.create();
+ this._colorSwatch = WebInspector.ColorSwatch.create();
this._colorSwatch.setColorText(result.value);
this._contentElement.appendChild(this._colorSwatch);
} else {
@@ -293,7 +293,7 @@
},
/**
- * @return {?WebInspector.ColorSwatch}
+ * @return {!WebInspector.ColorSwatch}
*/
colorSwatch: function()
{

Powered by Google App Engine
This is Rietveld 408576698