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

Unified Diff: Source/core/rendering/HitTestResult.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/page/DragController.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/HitTestResult.cpp
diff --git a/Source/core/rendering/HitTestResult.cpp b/Source/core/rendering/HitTestResult.cpp
index 0803f9c90790df61b63aee991a7d094fc6d631e9..cd95be8312a5b4538ddc2a0baca4e636ba238ee1 100644
--- a/Source/core/rendering/HitTestResult.cpp
+++ b/Source/core/rendering/HitTestResult.cpp
@@ -325,7 +325,7 @@ KURL HitTestResult::absoluteLinkURL() const
return KURL();
AtomicString urlString;
- if (m_innerURLElement->hasTagName(aTag) || isHTMLAreaElement(m_innerURLElement.get()) || m_innerURLElement->hasTagName(linkTag))
+ if (isHTMLAnchorElement(m_innerURLElement.get()) || isHTMLAreaElement(m_innerURLElement.get()) || m_innerURLElement->hasTagName(linkTag))
urlString = m_innerURLElement->getAttribute(hrefAttr);
else if (m_innerURLElement->hasTagName(SVGNames::aTag))
urlString = m_innerURLElement->getAttribute(XLinkNames::hrefAttr);
@@ -340,8 +340,8 @@ bool HitTestResult::isLiveLink() const
if (!(m_innerURLElement && m_innerURLElement->document()))
return false;
- if (m_innerURLElement->hasTagName(aTag))
- return static_cast<HTMLAnchorElement*>(m_innerURLElement.get())->isLiveLink();
+ if (isHTMLAnchorElement(m_innerURLElement.get()))
+ return toHTMLAnchorElement(m_innerURLElement.get())->isLiveLink();
if (m_innerURLElement->hasTagName(SVGNames::aTag))
return m_innerURLElement->isLink();
« no previous file with comments | « Source/core/page/DragController.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698