| Index: third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp b/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp
|
| index 243f494f442a73d5ada474ed479660b14bc431d9..724d1f843102bbf9af4b2f4369aa2c76680b059a 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp
|
| @@ -251,6 +251,20 @@ void HTMLAnchorElement::setActive(bool down) {
|
| ContainerNode::setActive(down);
|
| }
|
|
|
| +void HTMLAnchorElement::attributeChanged(const QualifiedName& name,
|
| + const AtomicString& oldValue,
|
| + const AtomicString& newValue,
|
| + AttributeModificationReason reason) {
|
| + HTMLElement::attributeChanged(name, oldValue, newValue, reason);
|
| + if (reason != AttributeModificationReason::kDirectly)
|
| + return;
|
| + if (name != hrefAttr && isLink())
|
| + return;
|
| + if (adjustedFocusedElementInTreeScope() != this)
|
| + return;
|
| + blur();
|
| +}
|
| +
|
| void HTMLAnchorElement::parseAttribute(const QualifiedName& name,
|
| const AtomicString& oldValue,
|
| const AtomicString& value) {
|
| @@ -262,11 +276,6 @@ void HTMLAnchorElement::parseAttribute(const QualifiedName& name,
|
| pseudoStateChanged(CSSSelector::PseudoVisited);
|
| pseudoStateChanged(CSSSelector::PseudoAnyLink);
|
| }
|
| - if (wasLink && !isLink() && adjustedFocusedElementInTreeScope() == this) {
|
| - // We might want to call blur(), but it's dangerous to dispatch
|
| - // events here.
|
| - document().setNeedsFocusedElementCheck();
|
| - }
|
| if (isLink()) {
|
| String parsedURL = stripLeadingAndTrailingHTMLSpaces(value);
|
| if (document().isDNSPrefetchEnabled()) {
|
|
|