Changeset 188682 in webkit


Ignore:
Timestamp:
Aug 19, 2015 10:03:06 PM (9 years ago)
Author:
Devin Rousso
Message:

Web Inspector: Visual styles panel does not work with pseudo-elements
https://bugs.webkit.org/show_bug.cgi?id=148187

Reviewed by Timothy Hatcher.

If the inline style does not exist, such as for pseudo-elements, default to the first matched rule.

  • UserInterface/Views/VisualStyleSelectorSection.js:

(WebInspector.VisualStyleSelectorSection.prototype.update):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r188679 r188682  
     12015-08-19  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: Visual styles panel does not work with pseudo-elements
     4        https://bugs.webkit.org/show_bug.cgi?id=148187
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        If the inline style does not exist, such as for pseudo-elements, default to the first matched rule.
     9
     10        * UserInterface/Views/VisualStyleSelectorSection.js:
     11        (WebInspector.VisualStyleSelectorSection.prototype.update):
     12
    1132015-08-19  Joseph Pecoraro  <pecoraro@apple.com>
    214
  • trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorSection.js

    r188226 r188682  
    156156        }
    157157
    158         if (!this._nodeStyles[WebInspector.VisualStyleSelectorSection.LastSelectedRuleSymbol])
    159             this._nodeStyles[WebInspector.VisualStyleSelectorSection.LastSelectedRuleSymbol] = this._nodeStyles.inlineStyle;
    160 
    161         // Inline Style
    162         createSelectorItem.call(this, this._nodeStyles.inlineStyle, WebInspector.UIString("This Element"));
     158        if (this._nodeStyles.inlineStyle) {
     159            if (!this._nodeStyles[WebInspector.VisualStyleSelectorSection.LastSelectedRuleSymbol])
     160                this._nodeStyles[WebInspector.VisualStyleSelectorSection.LastSelectedRuleSymbol] = this._nodeStyles.inlineStyle;
     161
     162            // Inline Style
     163            createSelectorItem.call(this, this._nodeStyles.inlineStyle, WebInspector.UIString("This Element"));
     164        } else if (!this._nodeStyles[WebInspector.VisualStyleSelectorSection.LastSelectedRuleSymbol])
     165            this._nodeStyles[WebInspector.VisualStyleSelectorSection.LastSelectedRuleSymbol] = this._nodeStyles.matchedRules[0].style;
    163166
    164167        // Matched Rules
Note: See TracChangeset for help on using the changeset viewer.