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

Side by Side Diff: Source/core/svg/SVGElement.h

Issue 166163005: [SVG2] Add tabindex handling in svg. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased + add test rebaseline Created 6 years, 9 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, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * Copyright (C) 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2009 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 class SVGElementRareData; 44 class SVGElementRareData;
45 class SVGFitToViewBox; 45 class SVGFitToViewBox;
46 class SVGSVGElement; 46 class SVGSVGElement;
47 47
48 void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyName ToIdMap, const QualifiedName& attrName); 48 void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyName ToIdMap, const QualifiedName& attrName);
49 49
50 class SVGElement : public Element { 50 class SVGElement : public Element {
51 public: 51 public:
52 virtual ~SVGElement(); 52 virtual ~SVGElement();
53 53
54 virtual bool supportsFocus() const OVERRIDE;
55 virtual short tabIndex() const OVERRIDE;
56 void setTabIndex(int);
57
54 bool isOutermostSVGSVGElement() const; 58 bool isOutermostSVGSVGElement() const;
55 59
56 virtual String title() const OVERRIDE; 60 virtual String title() const OVERRIDE;
57 bool hasRelativeLengths() const { return !m_elementsWithRelativeLengths.isEm pty(); } 61 bool hasRelativeLengths() const { return !m_elementsWithRelativeLengths.isEm pty(); }
58 virtual bool supportsMarkers() const { return false; } 62 virtual bool supportsMarkers() const { return false; }
59 PassRefPtrWillBeRawPtr<CSSValue> getPresentationAttribute(const AtomicString & name); 63 PassRefPtrWillBeRawPtr<CSSValue> getPresentationAttribute(const AtomicString & name);
60 static bool isAnimatableCSSProperty(const QualifiedName&); 64 static bool isAnimatableCSSProperty(const QualifiedName&);
61 enum CTMScope { 65 enum CTMScope {
62 NearestViewportScope, // Used by SVGGraphicsElement::getCTM() 66 NearestViewportScope, // Used by SVGGraphicsElement::getCTM()
63 ScreenScope, // Used by SVGGraphicsElement::getScreenCTM() 67 ScreenScope, // Used by SVGGraphicsElement::getScreenCTM()
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 SVGElement(const QualifiedName&, Document&, ConstructionType = CreateSVGElem ent); 156 SVGElement(const QualifiedName&, Document&, ConstructionType = CreateSVGElem ent);
153 157
154 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 158 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
155 159
156 virtual void finishParsingChildren() OVERRIDE; 160 virtual void finishParsingChildren() OVERRIDE;
157 virtual void attributeChanged(const QualifiedName&, const AtomicString&, Att ributeModificationReason = ModifiedDirectly) OVERRIDE; 161 virtual void attributeChanged(const QualifiedName&, const AtomicString&, Att ributeModificationReason = ModifiedDirectly) OVERRIDE;
158 162
159 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 163 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
160 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) OVERRIDE; 164 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons t AtomicString&, MutableStylePropertySet*) OVERRIDE;
161 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; 165 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
166 virtual bool rendererIsFocusable() const OVERRIDE;
162 167
163 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 168 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
164 virtual void removedFrom(ContainerNode*) OVERRIDE; 169 virtual void removedFrom(ContainerNode*) OVERRIDE;
165 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE; 170 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE;
166 171
167 static CSSPropertyID cssPropertyIdForSVGAttributeName(const QualifiedName&); 172 static CSSPropertyID cssPropertyIdForSVGAttributeName(const QualifiedName&);
168 void updateRelativeLengthsInformation() { updateRelativeLengthsInformation(s elfHasRelativeLengths(), this); } 173 void updateRelativeLengthsInformation() { updateRelativeLengthsInformation(s elfHasRelativeLengths(), this); }
169 void updateRelativeLengthsInformation(bool hasRelativeLengths, SVGElement*); 174 void updateRelativeLengthsInformation(bool hasRelativeLengths, SVGElement*);
170 175
171 virtual bool selfHasRelativeLengths() const { return false; } 176 virtual bool selfHasRelativeLengths() const { return false; }
(...skipping 13 matching lines...) Expand all
185 private: 190 private:
186 friend class SVGElementInstance; 191 friend class SVGElementInstance;
187 192
188 // FIXME: Author shadows should be allowed 193 // FIXME: Author shadows should be allowed
189 // https://bugs.webkit.org/show_bug.cgi?id=77938 194 // https://bugs.webkit.org/show_bug.cgi?id=77938
190 virtual bool areAuthorShadowsAllowed() const OVERRIDE FINAL { return false; } 195 virtual bool areAuthorShadowsAllowed() const OVERRIDE FINAL { return false; }
191 196
192 RenderStyle* computedStyle(PseudoId = NOPSEUDO); 197 RenderStyle* computedStyle(PseudoId = NOPSEUDO);
193 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO) OVERRIDE FINAL { return computedStyle(pseudoElementSpecifier); } 198 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO) OVERRIDE FINAL { return computedStyle(pseudoElementSpecifier); }
194 virtual void willRecalcStyle(StyleRecalcChange) OVERRIDE; 199 virtual void willRecalcStyle(StyleRecalcChange) OVERRIDE;
195 virtual bool isKeyboardFocusable() const OVERRIDE;
196 200
197 void buildPendingResourcesIfNeeded(); 201 void buildPendingResourcesIfNeeded();
198 202
199 void mapInstanceToElement(SVGElementInstance*); 203 void mapInstanceToElement(SVGElementInstance*);
200 void removeInstanceMapping(SVGElementInstance*); 204 void removeInstanceMapping(SVGElementInstance*);
201 205
206 bool supportsSpatialNavigationFocus() const;
207
202 void cleanupAnimatedProperties(); 208 void cleanupAnimatedProperties();
203 friend class CleanUpAnimatedPropertiesCaller; 209 friend class CleanUpAnimatedPropertiesCaller;
204 210
205 HashSet<SVGElement*> m_elementsWithRelativeLengths; 211 HashSet<SVGElement*> m_elementsWithRelativeLengths;
206 212
207 typedef HashMap<QualifiedName, RefPtr<NewSVGAnimatedPropertyBase> > Attribut eToPropertyMap; 213 typedef HashMap<QualifiedName, RefPtr<NewSVGAnimatedPropertyBase> > Attribut eToPropertyMap;
208 AttributeToPropertyMap m_newAttributeToPropertyMap; 214 AttributeToPropertyMap m_newAttributeToPropertyMap;
209 215
210 #if !ASSERT_DISABLED 216 #if !ASSERT_DISABLED
211 bool m_inRelativeLengthClientsInvalidation; 217 bool m_inRelativeLengthClientsInvalidation;
(...skipping 14 matching lines...) Expand all
226 return DefaultHash<QualifiedName>::Hash::hash(key); 232 return DefaultHash<QualifiedName>::Hash::hash(key);
227 } 233 }
228 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a .matches(b); } 234 static bool equal(const QualifiedName& a, const QualifiedName& b) { return a .matches(b); }
229 }; 235 };
230 236
231 DEFINE_ELEMENT_TYPE_CASTS(SVGElement, isSVGElement()); 237 DEFINE_ELEMENT_TYPE_CASTS(SVGElement, isSVGElement());
232 238
233 } 239 }
234 240
235 #endif 241 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698