⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 295164 in webkit


Ignore:
Timestamp:
Jun 2, 2022, 6:04:41 PM (4 years ago)
Author:
Patrick Angle
Message:

Web Inspector: Layout overlay color swatches don't update saved color until popover is dismissed
​https://bugs.webkit.org/show_bug.cgi?id=241244
rdar://94318762

Reviewed by Devin Rousso.

We should save all changes to layout overlay color, not just the state when you close the color picker popover. Not
doing this causes a few issues:

  1. DOM node badge colors don't update as you dynamically adjust the color for an overlay.
  2. The new "sample color from screen" can be used without opening the popover for the color picker, which means these

changes are never saved.

Canonical link: ​https://commits.webkit.org/251248@main

Location:
trunk/Source/WebInspectorUI/UserInterface
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js

    r294621 r295164  
    710710        this._createLayoutOverlayColorSettingIfNeeded();
    711711        this._layoutOverlayColorSetting.value = color.hsl;
     712
     713        if (this._layoutOverlayShowing)
     714            this.showLayoutOverlay({color});
    712715    }
    713716
  • trunk/Source/WebInspectorUI/UserInterface/Views/NodeOverlayListSection.js

    r295099 r295164  
    126126
    127127            swatch.addEventListener(WI.InlineSwatch.Event.ValueChanged, (event) => {
    128                 if (checkboxElement?.checked)
    129                     domNode.showLayoutOverlay({color: event.data.value});
    130             }, swatch);
    131 
    132             swatch.addEventListener(WI.InlineSwatch.Event.Deactivated, (event) => {
    133128                domNode.layoutOverlayColor = event.target.value;
    134129            }, swatch);
Note: See TracChangeset for help on using the changeset viewer.