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

Changeset 197076 in webkit


Ignore:
Timestamp:
Feb 25, 2016, 1:48:09 AM (11 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r196863 - Web Inspector: Text Align segmented control blinks while editing other properties in Visual Styles sidebar
​https://bugs.webkit.org/show_bug.cgi?id=154487
<rdar://problem/24754703>

Patch by Devin Rousso <Devin Rousso> on 2016-02-20
Reviewed by Timothy Hatcher.

The icon list property editor blinking issue was caused by the fact that
the selected value was toggled on/off each time the value was set on the
editor. In order to prevent this, the logic for the setter value() was
modified to just match a keyword icon to the given value and select it.

  • UserInterface/Views/VisualStyleKeywordIconList.js:

(WebInspector.VisualStyleKeywordIconList.prototype.set value):
(WebInspector.VisualStyleKeywordIconList.prototype._handleKeywordChanged):

Location:
releases/WebKitGTK/webkit-2.12/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.12/Source/WebInspectorUI/ChangeLog

    r197075 r197076  
     12016-02-20  Devin Rousso  <dcrousso+webkit@gmail.com>
     2
     3        Web Inspector: Text Align segmented control blinks while editing other properties in Visual Styles sidebar
     4        https://bugs.webkit.org/show_bug.cgi?id=154487
     5        <rdar://problem/24754703>
     6
     7        Reviewed by Timothy Hatcher.
     8
     9        The icon list property editor blinking issue was caused by the fact that
     10        the selected value was toggled on/off each time the value was set on the
     11        editor. In order to prevent this, the logic for the setter value() was
     12        modified to just match a keyword icon to the given value and select it.
     13
     14        * UserInterface/Views/VisualStyleKeywordIconList.js:
     15        (WebInspector.VisualStyleKeywordIconList.prototype.set value):
     16        (WebInspector.VisualStyleKeywordIconList.prototype._handleKeywordChanged):
     17
    1182016-02-20  Nikita Vasilyev  <nvasilyev@apple.com>
    219
  • releases/WebKitGTK/webkit-2.12/Source/WebInspectorUI/UserInterface/Views/VisualStyleKeywordIconList.js

    r194504 r197076  
    7676        this._selectedIcon = null;
    7777        for (let icon of this._iconElements) {
     78            icon.classList.remove("selected", "computed");
     79
    7880            if (icon.id === this._updatedValues.placeholder)
    7981                this._computedIcon = icon;
    … …  
    8183            if (icon.id === value && !this._propertyMissing)
    8284                this._selectedIcon = icon;
    83             else
    84                 icon.classList.remove("selected", "computed");
    8585        }
    8686
    … …  
    8888            this._computedIcon = this._iconElements[0];
    8989
    90         let iconIsSelected = this._selectedIcon && this._selectedIcon.classList.toggle("selected");
    91         if (!iconIsSelected) {
    92             this._selectedIcon = null;
    93             this._propertyMissing = true;
     90        if (this._selectedIcon)
     91            this._selectedIcon.classList.add("selected");
     92        else
    9493            this._computedIcon.classList.add("computed");
    95         }
    9694    }
    9795
    … …  
    105103    _handleKeywordChanged(event)
    106104    {
    107         this._propertyMissing = false;
    108         this.value = event.target.id;
     105        let toggleOff = this.value === event.target.id;
     106        this._propertyMissing = toggleOff;
     107        this.value = toggleOff ? null : event.target.id;
    109108        this._valueDidChange();
    110109    }
Note: See TracChangeset for help on using the changeset viewer.