Changeset 175642 in webkit


Ignore:
Timestamp:
Nov 5, 2014 2:50:33 PM (9 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Specificity not shown for pseudo element styles
https://bugs.webkit.org/show_bug.cgi?id=138436

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2014-11-05
Reviewed by Benjamin Poulain.

  • UserInterface/Views/CSSStyleDeclarationSection.js:

(WebInspector.CSSStyleDeclarationSection.prototype.refresh):
Previously we were skipping the pre-selector <span>s when we were
not getting a listing of matched selector indices, and missing out
on the opportunity to give each selector a specificity. Now, always
loop over selectors if we have them.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r175628 r175642  
     12014-11-05  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Specificity not shown for pseudo element styles
     4        https://bugs.webkit.org/show_bug.cgi?id=138436
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        * UserInterface/Views/CSSStyleDeclarationSection.js:
     9        (WebInspector.CSSStyleDeclarationSection.prototype.refresh):
     10        Previously we were skipping the pre-selector <span>s when we were
     11        not getting a listing of matched selector indices, and missing out
     12        on the opportunity to give each selector a specificity. Now, always
     13        loop over selectors if we have them.
     14
    1152014-11-05  Jonathan Wells  <jonowells@apple.com>
    216
  • trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js

    r175483 r175642  
    202202            var selectors = this._style.ownerRule.selectors;
    203203            var matchedSelectorIndices = this._style.ownerRule.matchedSelectorIndices;
    204             if (selectors.length && matchedSelectorIndices.length) {
     204            var alwaysMatch = !matchedSelectorIndices.length;
     205            if (selectors.length) {
    205206                for (var i = 0; i < selectors.length; ++i) {
    206                     appendSelector.call(this, selectors[i], matchedSelectorIndices.contains(i));
     207                    appendSelector.call(this, selectors[i], alwaysMatch || matchedSelectorIndices.contains(i));
    207208                    if (i < selectors.length - 1)
    208209                        this._selectorElement.appendChild(document.createTextNode(", "));
Note: See TracChangeset for help on using the changeset viewer.