Title: [251744] trunk/Source/WebInspectorUI
- Revision
- 251744
- Author
- [email protected]
- Date
- 2019-10-29 17:10:28 -0700 (Tue, 29 Oct 2019)
Log Message
Web Inspector: Opacity slider background doesn't update when when hue slider moves
https://bugs.webkit.org/show_bug.cgi?id=203593
<rdar://problem/56723629>
Reviewed by Matt Baker.
* UserInterface/Views/ColorPicker.js:
(WI.ColorPicker.prototype.set color):
(WI.ColorPicker.prototype.colorSquareColorDidChange):
Remove unused function arguments.
(WI.ColorPicker.prototype.sliderValueDidChange):
Update the background of the opacity slider when the hue slider changes.
(WI.ColorPicker.prototype._updateOpacitySlider): Renamed from _updateSliders.
Drive-by: replace `var` with `let`.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (251743 => 251744)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-10-30 00:02:19 UTC (rev 251743)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-10-30 00:10:28 UTC (rev 251744)
@@ -1,3 +1,22 @@
+2019-10-29 Nikita Vasilyev <[email protected]>
+
+ Web Inspector: Opacity slider background doesn't update when when hue slider moves
+ https://bugs.webkit.org/show_bug.cgi?id=203593
+ <rdar://problem/56723629>
+
+ Reviewed by Matt Baker.
+
+ * UserInterface/Views/ColorPicker.js:
+ (WI.ColorPicker.prototype.set color):
+ (WI.ColorPicker.prototype.colorSquareColorDidChange):
+ Remove unused function arguments.
+
+ (WI.ColorPicker.prototype.sliderValueDidChange):
+ Update the background of the opacity slider when the hue slider changes.
+
+ (WI.ColorPicker.prototype._updateOpacitySlider): Renamed from _updateSliders.
+ Drive-by: replace `var` with `let`.
+
2019-10-28 Nikita Vasilyev <[email protected]>
Web Inspector: Right-clicking in color picker should not select color
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ColorPicker.js (251743 => 251744)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ColorPicker.js 2019-10-30 00:02:19 UTC (rev 251743)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ColorPicker.js 2019-10-30 00:10:28 UTC (rev 251744)
@@ -123,7 +123,7 @@
this._hueSlider.value = this._color.hsl[0] / 360;
this._opacitySlider.value = this._color.alpha;
- this._updateSliders(this._colorSquare.rawColor, this._color);
+ this._updateOpacitySlider();
this._showColorComponentInputs();
@@ -143,7 +143,7 @@
colorSquareColorDidChange(colorSquare)
{
this._updateColor();
- this._updateSliders(this._colorSquare.rawColor, this._colorSquare.tintedColor);
+ this._updateOpacitySlider();
}
sliderValueDidChange(slider, value)
@@ -153,6 +153,7 @@
else if (slider === this._hueSlider) {
this._colorSquare.hue = value * 360;
this._updateColor();
+ this._updateOpacitySlider();
}
}
@@ -189,11 +190,11 @@
this._handleFormatChange();
}
- _updateSliders(rawColor, tintedColor)
+ _updateOpacitySlider()
{
- var rgb = this._colorSquare.tintedColor.rgb;
- var opaque = new WI.Color(WI.Color.Format.RGBA, rgb.concat(1)).toString();
- var transparent = new WI.Color(WI.Color.Format.RGBA, rgb.concat(0)).toString();
+ let rgb = this._colorSquare.tintedColor.rgb;
+ let opaque = new WI.Color(WI.Color.Format.RGBA, rgb.concat(1)).toString();
+ let transparent = new WI.Color(WI.Color.Format.RGBA, rgb.concat(0)).toString();
this._opacitySlider.element.style.setProperty("background-image", "linear-gradient(90deg, " + transparent + ", " + opaque + "), " + this._opacityPattern);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes