union method

void union(
  1. CSSStyleDeclaration declaration
)

Implementation

void union(CSSStyleDeclaration declaration) {
  for (final MapEntry<String, CSSPropertyValue> entry in declaration) {
    final String propertyName = entry.key;
    final CSSPropertyValue otherValue = entry.value;
    final CSSPropertyValue? currentValue = _getEffectivePropertyValueEntry(propertyName);
    if (currentValue != null) {
      final int otherPriority = _cascadePriority(otherValue);
      final int currentPriority = _cascadePriority(currentValue);
      if (otherPriority < currentPriority) continue;
    }
    if (!identical(currentValue, otherValue)) {
      _setStagedPropertyValue(propertyName, otherValue);
    }
  }
}