| Index: Source/core/html/HTMLAnchorElement.cpp
|
| diff --git a/Source/core/html/HTMLAnchorElement.cpp b/Source/core/html/HTMLAnchorElement.cpp
|
| index fcd81d8c01a7dea5f2b9818188e643d2a231607d..8705c2e196c4518a47b9cdbf2c46c74e01e83971 100644
|
| --- a/Source/core/html/HTMLAnchorElement.cpp
|
| +++ b/Source/core/html/HTMLAnchorElement.cpp
|
| @@ -196,13 +196,16 @@ void HTMLAnchorElement::parseAttribute(const QualifiedName& name, const AtomicSt
|
| if (name == hrefAttr) {
|
| bool wasLink = isLink();
|
| setIsLink(!value.isNull());
|
| - if (wasLink != isLink()) {
|
| - didAffectSelector(AffectedSelectorLink | AffectedSelectorVisited | AffectedSelectorEnabled);
|
| - if (wasLink && treeScope().adjustedFocusedElement() == this) {
|
| - // We might want to call blur(), but it's dangerous to dispatch
|
| - // events here.
|
| - document().setNeedsFocusedElementCheck();
|
| - }
|
| + if (wasLink || isLink()) {
|
| + AffectedSelectorMask affectedPseudo = AffectedSelectorLink | AffectedSelectorVisited;
|
| + if (wasLink != isLink())
|
| + affectedPseudo |= AffectedSelectorEnabled;
|
| + didAffectSelector(affectedPseudo);
|
| + }
|
| + if (wasLink && !isLink() && treeScope().adjustedFocusedElement() == this) {
|
| + // We might want to call blur(), but it's dangerous to dispatch
|
| + // events here.
|
| + document().setNeedsFocusedElementCheck();
|
| }
|
| if (isLink()) {
|
| String parsedURL = stripLeadingAndTrailingHTMLSpaces(value);
|
|
|