public/ckeditor/4.4dev/core/filter.js
function applyAllowedRule( rule, element, status, skipRequired ) {
		// This rule doesn't match this element - skip it.
		if ( rule.match && !rule.match( element ) )
			return;

		// If element doesn't have all required styles/attrs/classes
		// this rule doesn't match it.
		if ( !skipRequired && !hasAllRequired( rule, element ) )
			return;

		// If this rule doesn't validate properties only mark element as valid.
		if ( !rule.propertiesOnly )
			status.valid = true;

		// Apply rule only when all attrs/styles/classes haven't been marked as valid.
		if ( !status.allAttributes )
			status.allAttributes = applyAllowedRuleToHash( rule.attributes, element.attributes, status.validAttributes );

		if ( !status.allStyles )
			status.allStyles = applyAllowedRuleToHash( rule.styles, element.styles, status.validStyles );

		if ( !status.allClasses )
			status.allClasses = applyAllowedRuleToArray( rule.classes, element.classes, status.validClasses );
	}
function applyAllowedRule( rule, element, status, skipRequired ) {
		// This rule doesn't match this element - skip it.
		if ( rule.match && !rule.match( element ) )
			return;

		// If element doesn't have all required styles/attrs/classes
		// this rule doesn't match it.
		if ( !skipRequired && !hasAllRequired( rule, element ) )
			return;

		// If this rule doesn't validate properties only mark element as valid.
		if ( !rule.propertiesOnly )
			status.valid = true;

		// Apply rule only when all attrs/styles/classes haven't been marked as valid.
		if ( !status.allAttributes )
			status.allAttributes = applyAllowedRuleToHash( rule.attributes, element.attributes, status.validAttributes );

		if ( !status.allStyles )
			status.allStyles = applyAllowedRuleToHash( rule.styles, element.styles, status.validStyles );

		if ( !status.allClasses )
			status.allClasses = applyAllowedRuleToArray( rule.classes, element.classes, status.validClasses );
	}
function applyAllowedRule ( rule , element , status , skipRequired ) { // This rule doesn't match this element - skip it. if ( rule . match && ! rule . match ( element ) ) return ; // If element doesn't have all required styles/attrs/classes // this rule doesn't match it. if ( ! skipRequired && ! hasAllRequired ( rule , element ) ) return ; // If this rule doesn't validate properties only mark element as valid. if ( ! rule . propertiesOnly ) status . valid = true ; // Apply rule only when all attrs/styles/classes haven't been marked as valid. if ( ! status . allAttributes ) status . allAttributes = applyAllowedRuleToHash ( rule . attributes , element . attributes , status . validAttributes ) ; if ( ! status . allStyles ) status . allStyles = applyAllowedRuleToHash ( rule . styles , element . styles , status . validStyles ) ; if ( ! status . allClasses ) status . allClasses = applyAllowedRuleToArray ( rule . classes , element . classes , status . validClasses ) ; }
Apply ACR to an element. @param rule @param element @param status Object containing status of element's filtering. @param {Boolean} skipRequired If true don't check if element has all required properties.
Apply ACR to an element .