| Index: Source/core/html/HTMLAnchorElement.cpp
|
| diff --git a/Source/core/html/HTMLAnchorElement.cpp b/Source/core/html/HTMLAnchorElement.cpp
|
| index efbacc2fa6dbdd9eb2523de19850e42628f0004e..61d4ce158e20e0ab81cb483bd34d62b6cc264aba 100644
|
| --- a/Source/core/html/HTMLAnchorElement.cpp
|
| +++ b/Source/core/html/HTMLAnchorElement.cpp
|
| @@ -48,6 +48,7 @@
|
| #include "core/platform/network/DNS.h"
|
| #include "core/platform/network/ResourceRequest.h"
|
| #include "core/rendering/RenderImage.h"
|
| +#include "core/svg/graphics/SVGImage.h"
|
| #include "public/platform/Platform.h"
|
| #include "public/platform/WebPrescientNetworking.h"
|
| #include "public/platform/WebURL.h"
|
| @@ -281,7 +282,7 @@ void HTMLAnchorElement::parseAttribute(const QualifiedName& name, const AtomicSt
|
| {
|
| if (name == hrefAttr) {
|
| bool wasLink = isLink();
|
| - setIsLink(!value.isNull());
|
| + setIsLink(!value.isNull() && !shouldProhibitLinks(this));
|
| if (wasLink != isLink()) {
|
| didAffectSelector(AffectedSelectorLink | AffectedSelectorVisited | AffectedSelectorEnabled);
|
| if (wasLink && treeScope()->adjustedFocusedElement() == this) {
|
| @@ -649,6 +650,11 @@ bool isLinkClick(Event* event)
|
| return event->type() == eventNames().clickEvent && (!event->isMouseEvent() || toMouseEvent(event)->button() != RightButton);
|
| }
|
|
|
| +bool shouldProhibitLinks(Element* element)
|
| +{
|
| + return SVGImage::isInSVGImage(element);
|
| +}
|
| +
|
| bool HTMLAnchorElement::willRespondToMouseClickEvents()
|
| {
|
| return isLink() || HTMLElement::willRespondToMouseClickEvents();
|
|
|