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

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

Issue 2171493003: [Editing][DOM][CodeHealth] Make Node::hasEditableStyle global functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } 148 }
149 149
150 short SVGAElement::tabIndex() const 150 short SVGAElement::tabIndex() const
151 { 151 {
152 // Skip the supportsFocus check in SVGElement. 152 // Skip the supportsFocus check in SVGElement.
153 return Element::tabIndex(); 153 return Element::tabIndex();
154 } 154 }
155 155
156 bool SVGAElement::supportsFocus() const 156 bool SVGAElement::supportsFocus() const
157 { 157 {
158 if (hasEditableStyle()) 158 if (hasEditableStyle(*this))
159 return SVGGraphicsElement::supportsFocus(); 159 return SVGGraphicsElement::supportsFocus();
160 // If not a link we should still be able to focus the element if it has tabI ndex. 160 // If not a link we should still be able to focus the element if it has tabI ndex.
161 return isLink() || SVGGraphicsElement::supportsFocus(); 161 return isLink() || SVGGraphicsElement::supportsFocus();
162 } 162 }
163 163
164 bool SVGAElement::shouldHaveFocusAppearance() const 164 bool SVGAElement::shouldHaveFocusAppearance() const
165 { 165 {
166 return !m_wasFocusedByMouse || SVGGraphicsElement::supportsFocus(); 166 return !m_wasFocusedByMouse || SVGGraphicsElement::supportsFocus();
167 } 167 }
168 168
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 return SVGElement::isKeyboardFocusable(); 200 return SVGElement::isKeyboardFocusable();
201 if (isLink() && !document().frameHost()->chromeClient().tabsToLinks()) 201 if (isLink() && !document().frameHost()->chromeClient().tabsToLinks())
202 return false; 202 return false;
203 return SVGElement::isKeyboardFocusable(); 203 return SVGElement::isKeyboardFocusable();
204 } 204 }
205 205
206 bool SVGAElement::canStartSelection() const 206 bool SVGAElement::canStartSelection() const
207 { 207 {
208 if (!isLink()) 208 if (!isLink())
209 return SVGElement::canStartSelection(); 209 return SVGElement::canStartSelection();
210 return hasEditableStyle(); 210 return hasEditableStyle(*this);
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

Powered by Google App Engine
This is Rietveld 408576698