void HTMLLabelElement::updateLabel(TreeScope& scope, const AtomicString& oldForAttributeValue, const AtomicString& newForAttributeValue) { if (!inDocument()) return; if (oldForAttributeValue == newForAttributeValue) return; if (!oldForAttributeValue.isEmpty()) scope.removeLabel(oldForAttributeValue, this); if (!newForAttributeValue.isEmpty()) scope.addLabel(newForAttributeValue, this); }