Index: third_party/WebKit/Source/core/html/HTMLLabelElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp b/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp |
index 3e22538abda6aa9e686beee758233357f53f6624..95ba9c4aac1220e66e9f2e68fb1e5415de63e33d 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp |
@@ -243,29 +243,10 @@ void HTMLLabelElement::accessKeyAction(bool sendMouseEvents) |
HTMLElement::accessKeyAction(sendMouseEvents); |
} |
-void HTMLLabelElement::updateLabel(TreeScope& scope, const AtomicString& oldForAttributeValue, const AtomicString& newForAttributeValue) |
-{ |
- if (!inShadowIncludingDocument()) |
- return; |
- |
- if (oldForAttributeValue == newForAttributeValue) |
- return; |
- |
- if (!oldForAttributeValue.isEmpty()) |
- scope.removeLabel(oldForAttributeValue, this); |
- if (!newForAttributeValue.isEmpty()) |
- scope.addLabel(newForAttributeValue, this); |
-} |
- |
Node::InsertionNotificationRequest HTMLLabelElement::insertedInto(ContainerNode* insertionPoint) |
{ |
InsertionNotificationRequest result = HTMLElement::insertedInto(insertionPoint); |
FormAssociatedElement::insertedInto(insertionPoint); |
- if (insertionPoint->isInTreeScope()) { |
- TreeScope& scope = insertionPoint->treeScope(); |
- if (scope == treeScope() && scope.shouldCacheLabelsByForAttribute()) |
- updateLabel(scope, nullAtom, fastGetAttribute(forAttr)); |
- } |
// Trigger for elements outside of forms. |
if (!formOwner() && insertionPoint->inShadowIncludingDocument()) |
@@ -276,11 +257,6 @@ Node::InsertionNotificationRequest HTMLLabelElement::insertedInto(ContainerNode* |
void HTMLLabelElement::removedFrom(ContainerNode* insertionPoint) |
{ |
- if (insertionPoint->isInTreeScope() && treeScope() == document()) { |
- TreeScope& treeScope = insertionPoint->treeScope(); |
- if (treeScope.shouldCacheLabelsByForAttribute()) |
- updateLabel(treeScope, fastGetAttribute(forAttr), nullAtom); |
- } |
HTMLElement::removedFrom(insertionPoint); |
FormAssociatedElement::removedFrom(insertionPoint); |
document().removeFormAssociation(this); |
@@ -298,11 +274,6 @@ void HTMLLabelElement::parseAttribute(const QualifiedName& attributeName, const |
formAttributeChanged(); |
UseCounter::count(document(), UseCounter::HTMLLabelElementFormContentAttribute); |
} else { |
- if (attributeName == forAttr) { |
- TreeScope& scope = treeScope(); |
- if (scope.shouldCacheLabelsByForAttribute()) |
- updateLabel(scope, oldValue, attributeValue); |
- } |
HTMLElement::parseAttribute(attributeName, oldValue, attributeValue); |
} |
} |