B2G/gecko/browser/devtools/styleinspector/CssLogic.jsm
/**
   * Check if the highlighted element or it's parents have unmatched selectors.
   *
   * Please note that this method is far slower than hasMatchedSelectors()
   * because it needs to do a lot more checks in the DOM.
   *
   * @param {array} aProperties The list of properties you want to check if they
   * have unmatched selectors or not.
   * @return {object} An object that tells for each property if it has unmatched
   * selectors or not. Object keys are property names and values are booleans.
   */
Check if the highlighted element or it's parents have unmatched selectors.
Please note that this method is far slower than hasMatchedSelectors()
because it needs to do a lot more checks in the DOM.

@param {array} aProperties The list of properties you want to check if they
have unmatched selectors or not.
@return {object} An object that tells for each property if it has unmatched
selectors or not. Object keys are property names and values are booleans.
Check if the highlighted element or it ' s parents have unmatched selectors . Please note that this method is far slower than hasMatchedSelectors () because it needs to do a lot more checks in the DOM . @param { array } aProperties The list of properties you want to check if they have unmatched selectors or not . @return { object } An object that tells for each property if it has unmatched selectors or not . Object keys are property names and values are booleans .
function CL_hasUnmatchedSelectors(aProperties)
  {
    if (!this._matchedRules) {
      this._buildMatchedRules();
    }
    let result = {};
    this.forSomeSheets(function (aSheet) {
      if (!aSheet.contentSheet || aSheet.disabled || !aSheet.mediaMatches) {
        return false;
      }
      return aSheet.forSomeRules(function (aRule) {
        let unmatched = aRule._matchId !== this._matchId ||
                        this._ruleHasUnmatchedSelector(aRule);
        if (!unmatched) {
          return false;
        }
        aProperties = aProperties.filter(function(aProperty) {
          if (!aRule.getPropertyValue(aProperty)) {
            return true;
          }
          result[aProperty] = true;
          return false;
        });
        return aProperties.length == 0;
      }, this);
    }, this);
    aProperties.forEach(function(aProperty) { result[aProperty] = false; });
    return result;
  }
function CL_hasUnmatchedSelectors ( aProperties ) { if ( ! this . _matchedRules ) { this . _buildMatchedRules ( ) ; } let result = { } ; this . forSomeSheets ( function ( aSheet ) { if ( ! aSheet . contentSheet || aSheet . disabled || ! aSheet . mediaMatches ) { return false ; } return aSheet . forSomeRules ( function ( aRule ) { let unmatched = aRule . _matchId !== this . _matchId || this . _ruleHasUnmatchedSelector ( aRule ) ; if ( ! unmatched ) { return false ; } aProperties = aProperties . filter ( function ( aProperty ) { if ( ! aRule . getPropertyValue ( aProperty ) ) { return true ; } result [ aProperty ] = true ; return false ; } ) ; return aProperties . length == 0 ; } , this ) ; } , this ) ; aProperties . forEach ( function ( aProperty ) { result [ aProperty ] = false ; } ) ; return result ; }
Check if the highlighted element or it's parents have unmatched selectors.
Check if the highlighted element or it ' s parents have unmatched selectors .
// Keep this property for the next rule. We need to find a rule // which has the property. // We found a rule that has the current property while it does not // match the current element. We can remove this property from the // array.