Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 633 | 633 |
| 634 RenderStyle* parentStyle = 0; | 634 RenderStyle* parentStyle = 0; |
| 635 if (Element* parent = parentOrShadowHostElement()) { | 635 if (Element* parent = parentOrShadowHostElement()) { |
| 636 if (RenderObject* renderer = parent->renderer()) | 636 if (RenderObject* renderer = parent->renderer()) |
| 637 parentStyle = renderer->style(); | 637 parentStyle = renderer->style(); |
| 638 } | 638 } |
| 639 | 639 |
| 640 return svgRareData()->overrideComputedStyle(this, parentStyle); | 640 return svgRareData()->overrideComputedStyle(this, parentStyle); |
| 641 } | 641 } |
| 642 | 642 |
| 643 bool SVGElement::hasFocusEventListeners() const | |
| 644 { | |
| 645 SVGElement* mutableThis = const_cast<SVGElement*>(this); | |
|
pdr.
2013/07/29 00:17:47
I've been bitten by cost_cast in the past. If this
tkent
2013/07/29 03:31:07
yeah, I think we can. I added a FIXME comment.
| |
| 646 return mutableThis->hasEventListeners(eventNames().focusinEvent) || mutableT his->hasEventListeners(eventNames().focusoutEvent); | |
| 647 } | |
| 648 | |
| 649 bool SVGElement::isKeyboardFocusable(KeyboardEvent*) const | |
| 650 { | |
| 651 return isFocusable(); | |
| 652 } | |
| 653 | |
| 643 #ifndef NDEBUG | 654 #ifndef NDEBUG |
| 644 bool SVGElement::isAnimatableAttribute(const QualifiedName& name) const | 655 bool SVGElement::isAnimatableAttribute(const QualifiedName& name) const |
| 645 { | 656 { |
| 646 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, animatableAttributes, ()); | 657 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, animatableAttributes, ()); |
| 647 | 658 |
| 648 if (animatableAttributes.isEmpty()) { | 659 if (animatableAttributes.isEmpty()) { |
| 649 animatableAttributes.add(XLinkNames::hrefAttr); | 660 animatableAttributes.add(XLinkNames::hrefAttr); |
| 650 animatableAttributes.add(SVGNames::amplitudeAttr); | 661 animatableAttributes.add(SVGNames::amplitudeAttr); |
| 651 animatableAttributes.add(SVGNames::azimuthAttr); | 662 animatableAttributes.add(SVGNames::azimuthAttr); |
| 652 animatableAttributes.add(SVGNames::baseFrequencyAttr); | 663 animatableAttributes.add(SVGNames::baseFrequencyAttr); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 742 } | 753 } |
| 743 | 754 |
| 744 if (name == classAttr) | 755 if (name == classAttr) |
| 745 return isSVGStyledElement(); | 756 return isSVGStyledElement(); |
| 746 | 757 |
| 747 return animatableAttributes.contains(name); | 758 return animatableAttributes.contains(name); |
| 748 } | 759 } |
| 749 #endif | 760 #endif |
| 750 | 761 |
| 751 } | 762 } |
| OLD | NEW |