Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 0358d20e1f34b833c95a6477d63acf0bc488008a..26bb4744a55fa1634f9689e53871cc1afbff85be 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -2454,8 +2454,8 @@ void Document::updateBaseURL() |
// Base URL change changes any relative visited links. |
// FIXME: There are other URLs in the tree that would need to be re-evaluated on dynamic base URL change. Style should be invalidated too. |
for (Element* element = ElementTraversal::firstWithin(this); element; element = ElementTraversal::next(element)) { |
- if (element->hasTagName(aTag)) |
- static_cast<HTMLAnchorElement*>(element)->invalidateCachedVisitedLinkHash(); |
+ if (isHTMLAnchorElement(element)) |
+ toHTMLAnchorElement(element)->invalidateCachedVisitedLinkHash(); |
} |
} |
} |