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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGAElement.cpp

Issue 1885453002: Rename Node::treeScope() to Node::treeScopeOrDocument() Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2010 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 if (focused() && isEnterKeyKeydownEvent(event)) { 114 if (focused() && isEnterKeyKeydownEvent(event)) {
115 event->setDefaultHandled(); 115 event->setDefaultHandled();
116 dispatchSimulatedClick(event); 116 dispatchSimulatedClick(event);
117 return; 117 return;
118 } 118 }
119 119
120 if (isLinkClick(event)) { 120 if (isLinkClick(event)) {
121 String url = stripLeadingAndTrailingHTMLSpaces(hrefString()); 121 String url = stripLeadingAndTrailingHTMLSpaces(hrefString());
122 122
123 if (url[0] == '#') { 123 if (url[0] == '#') {
124 Element* targetElement = treeScope().getElementById(AtomicString (url.substring(1))); 124 Element* targetElement = treeScopeOrDocument().getElementById(At omicString(url.substring(1)));
125 if (targetElement && isSVGSMILElement(*targetElement)) { 125 if (targetElement && isSVGSMILElement(*targetElement)) {
126 toSVGSMILElement(targetElement)->beginByLinkActivation(); 126 toSVGSMILElement(targetElement)->beginByLinkActivation();
127 event->setDefaultHandled(); 127 event->setDefaultHandled();
128 return; 128 return;
129 } 129 }
130 } 130 }
131 131
132 AtomicString target(m_svgTarget->currentValue()->value()); 132 AtomicString target(m_svgTarget->currentValue()->value());
133 if (target.isEmpty() && fastGetAttribute(XLinkNames::showAttr) == "n ew") 133 if (target.isEmpty() && fastGetAttribute(XLinkNames::showAttr) == "n ew")
134 target = AtomicString("_blank"); 134 target = AtomicString("_blank");
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 return SVGElement::canStartSelection(); 209 return SVGElement::canStartSelection();
210 return hasEditableStyle(); 210 return hasEditableStyle();
211 } 211 }
212 212
213 bool SVGAElement::willRespondToMouseClickEvents() 213 bool SVGAElement::willRespondToMouseClickEvents()
214 { 214 {
215 return isLink() || SVGGraphicsElement::willRespondToMouseClickEvents(); 215 return isLink() || SVGGraphicsElement::willRespondToMouseClickEvents();
216 } 216 }
217 217
218 } // namespace blink 218 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/FocusController.cpp ('k') | third_party/WebKit/Source/core/svg/SVGFEImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698