Skip to content

Commit 7f63acc

Browse files
committed
SVGAElement check for internal non-view anchors is inside ENABLE(SVG_ANIMATION)
https://bugs.webkit.org/show_bug.cgi?id=66026 Reviewed by Rob Buis. Move only the SMIL-related code inside the ENABLE(SVG_ANIMATION) block. No new tests, as it depends on the enabled features. * svg/SVGAElement.cpp: (WebCore::SVGAElement::defaultEventHandler): Canonical link: https://commits.webkit.org/81886@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@92812 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent fcec053 commit 7f63acc

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

Source/WebCore/ChangeLog

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
2011-08-10 Tim Horton <timothy_horton@apple.com>
2+
3+
SVGAElement check for internal non-view anchors is inside ENABLE(SVG_ANIMATION)
4+
https://bugs.webkit.org/show_bug.cgi?id=66026
5+
6+
Reviewed by Rob Buis.
7+
8+
Move only the SMIL-related code inside the ENABLE(SVG_ANIMATION) block.
9+
10+
No new tests, as it depends on the enabled features.
11+
12+
* svg/SVGAElement.cpp:
13+
(WebCore::SVGAElement::defaultEventHandler):
14+
115
2011-08-10 Tim Horton <timothy_horton@apple.com>
216

317
Crash when clicking an SVG <a> link to the local document

Source/WebCore/svg/SVGAElement.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,19 +161,19 @@ void SVGAElement::defaultEventHandler(Event* event)
161161
if (isLinkClick(event)) {
162162
String url = stripLeadingAndTrailingHTMLSpaces(href());
163163

164-
#if ENABLE(SVG_ANIMATION)
165164
if (url[0] == '#') {
166165
Element* targetElement = treeScope()->getElementById(url.substring(1));
166+
#if ENABLE(SVG_ANIMATION)
167167
if (SVGSMILElement::isSMILElement(targetElement)) {
168168
static_cast<SVGSMILElement*>(targetElement)->beginByLinkActivation();
169169
event->setDefaultHandled();
170170
return;
171171
}
172+
#endif
172173
// Only allow navigation to internal <view> anchors.
173174
if (targetElement && !targetElement->hasTagName(SVGNames::viewTag))
174175
return;
175176
}
176-
#endif
177177

178178
// FIXME: Why does the SVG anchor element have this special logic
179179
// for middle click that the HTML anchor element does not have?

0 commit comments

Comments
 (0)