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

Unified Diff: Source/core/dom/VisitedLinkState.cpp

Issue 18888002: Introduce isHTMLAnchorElement and toHTMLAnchorElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 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 | « Source/core/dom/TreeScope.cpp ('k') | Source/core/html/HTMLAnchorElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/VisitedLinkState.cpp
diff --git a/Source/core/dom/VisitedLinkState.cpp b/Source/core/dom/VisitedLinkState.cpp
index d6236d46a2db2119ff67c4f75f610ced0412099c..77e8fd1ea2eb087b3f827a4ee1046b1b7f52322d 100644
--- a/Source/core/dom/VisitedLinkState.cpp
+++ b/Source/core/dom/VisitedLinkState.cpp
@@ -50,16 +50,16 @@ inline static const AtomicString& linkAttribute(Element* element)
inline static LinkHash linkHashForElement(Document* document, Element* element)
{
- if (element->hasTagName(aTag))
- return static_cast<HTMLAnchorElement*>(element)->visitedLinkHash();
+ if (isHTMLAnchorElement(element))
+ return toHTMLAnchorElement(element)->visitedLinkHash();
return visitedLinkHash(document->baseURL(), linkAttribute(element));
}
inline static LinkHash linkHashForElementWithAttribute(Document* document, Element* element, const AtomicString& attribute)
{
ASSERT(linkAttribute(element) == attribute);
- if (element->hasTagName(aTag))
- return static_cast<HTMLAnchorElement*>(element)->visitedLinkHash();
+ if (isHTMLAnchorElement(element))
+ return toHTMLAnchorElement(element)->visitedLinkHash();
return visitedLinkHash(document->baseURL(), attribute);
}
« no previous file with comments | « Source/core/dom/TreeScope.cpp ('k') | Source/core/html/HTMLAnchorElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698