Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Unified Diff: third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp

Issue 2623163002: Updating href attribute should not blur. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/HTMLAnchorElement/update-href-of-focused-anchor-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 790628cb60d15a2d56a1d2318cc1564535388722..f8cd9b34f267422841fc9e5f4abebe1cad81ea32 100644
--- a/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp
@@ -256,11 +256,10 @@ void HTMLAnchorElement::attributeChanged(
HTMLElement::attributeChanged(params);
if (params.reason != AttributeModificationReason::kDirectly)
return;
- if (params.name != hrefAttr && isLink())
+ if (params.name != hrefAttr)
return;
- if (adjustedFocusedElementInTreeScope() != this)
- return;
- blur();
+ if (!isLink() && adjustedFocusedElementInTreeScope() == this)
+ blur();
}
void HTMLAnchorElement::parseAttribute(
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/HTMLAnchorElement/update-href-of-focused-anchor-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698