Changeset 275493 in webkit
- Timestamp:
- Apr 6, 2021 12:28:30 AM (3 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r275337 r275493 1 2021-04-06 Razvan Caliman <rcaliman@apple.com> 2 3 Web Inspector: Layout sidebar grid overlay color swatch tooltip shouldn't include "switch format" hint 4 https://bugs.webkit.org/show_bug.cgi?id=223418 5 <rdar://problem/75825793> 6 7 Reviewed by BJ Burg. 8 9 * UserInterface/Views/CSSGridSection.js: 10 (WI.CSSGridSection.prototype.layout): 11 * UserInterface/Views/InlineSwatch.js: 12 (WI.InlineSwatch): 13 (WI.InlineSwatch.prototype.set shiftClickColorEnabled): 14 (WI.InlineSwatch.prototype._updateSwatch): 15 (WI.InlineSwatch.prototype._allowChangingColorFormats): 16 1 17 2021-03-31 Patrick Angle <pangle@apple.com> 2 18 -
trunk/Source/WebInspectorUI/UserInterface/Views/CSSGridSection.js
r274592 r275493 137 137 let gridColor = WI.overlayManager.getGridColorForNode(domNode); 138 138 let swatch = new WI.InlineSwatch(WI.InlineSwatch.Type.Color, gridColor); 139 swatch.shiftClickColorEnabled = false; 139 140 itemContainerElement.append(swatch.element); 140 141 -
trunk/Source/WebInspectorUI/UserInterface/Views/InlineSwatch.js
r269359 r275493 67 67 68 68 case WI.InlineSwatch.Type.Color: 69 this._shiftClickColorEnabled = true; 69 70 // Handled later by _updateSwatch. 70 71 break; … … 122 123 { 123 124 this._value = value; 125 this._updateSwatch(true); 126 } 127 128 set shiftClickColorEnabled(value) 129 { 130 this._shiftClickColorEnabled = !!value; 124 131 this._updateSwatch(true); 125 132 } … … 181 188 182 189 if (this._type === WI.InlineSwatch.Type.Color) { 183 if (this._allow ShiftClickColor())190 if (this._allowChangingColorFormats()) 184 191 this._swatchElement.title = WI.UIString("Click to select a color\nShift-click to switch color formats"); 185 192 else … … 191 198 } 192 199 193 _allow ShiftClickColor()194 { 195 return !this._readOnly && !this.value.isOutsideSRGB();200 _allowChangingColorFormats() 201 { 202 return this._shiftClickColorEnabled && !this._readOnly && !this.value.isOutsideSRGB(); 196 203 } 197 204 … … 204 211 if (event.shiftKey && value) { 205 212 if (this._type === WI.InlineSwatch.Type.Color) { 206 if (!this._allow ShiftClickColor()) {213 if (!this._allowChangingColorFormats()) { 207 214 InspectorFrontendHost.beep(); 208 215 return;
Note: See TracChangeset
for help on using the changeset viewer.