B2G/gecko/browser/devtools/styleinspector/CssLogic.jsm
/**
   * Check if a CssRule has an unmatched selector for the highlighted element or
   * its parents.
   *
   * @private
   * @param {CssRule} aRule The rule you want to check if it has an unmatched
   * selector.
   * @return {boolean} True if the rule has an unmatched selector, false
   * otherwise.
   */
Check if a CssRule has an unmatched selector for the highlighted element or
its parents.

@private
@param {CssRule} aRule The rule you want to check if it has an unmatched
selector.
@return {boolean} True if the rule has an unmatched selector, false
otherwise.
Check if a CssRule has an unmatched selector for the highlighted element or its parents . @private @param { CssRule } aRule The rule you want to check if it has an unmatched selector . @return { boolean } True if the rule has an unmatched selector false otherwise .
function CL__ruleHasUnmatchedSelector(aRule)
  {
    if (!aRule._cssSheet && aRule.sourceElement) {
      return false;
    }
    let element = this.viewedElement;
    let selectors = aRule.selectors;
    do {
      selectors = selectors.filter(function(aSelector) {
        return !element.mozMatchesSelector(aSelector);
      });
      if (selectors.length == 0) {
        break;
      }
    } while ((element = element.parentNode) &&
             element.nodeType === Ci.nsIDOMNode.ELEMENT_NODE);
    return selectors.length > 0;
  }
function CL__ruleHasUnmatchedSelector ( aRule ) { if ( ! aRule . _cssSheet && aRule . sourceElement ) { return false ; } let element = this . viewedElement ; let selectors = aRule . selectors ; do { selectors = selectors . filter ( function ( aSelector ) { return ! element . mozMatchesSelector ( aSelector ) ; } ) ; if ( selectors . length == 0 ) { break ; } } while ( ( element = element . parentNode ) && element . nodeType === Ci . nsIDOMNode . ELEMENT_NODE ) ; return selectors . length > 0 ; }
Check if a CssRule has an unmatched selector for the highlighted element or
 its parents.
Check if a CssRule has an unmatched selector for the highlighted element or its parents .
// CssRule wraps element.style, which never has unmatched selectors.