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

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

Issue 2522443002: Remove SVGCursorElement (Closed)
Patch Set: Rebase Created 4 years 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, 2007, 2008 Nikolas Zimmermann 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann
3 * <zimmermann@kde.org> 3 * <zimmermann@kde.org>
4 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> 4 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org>
5 * Copyright (C) 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 6 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
7 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 7 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 16 matching lines...) Expand all
27 #include "bindings/core/v8/ScriptEventListener.h" 27 #include "bindings/core/v8/ScriptEventListener.h"
28 #include "core/HTMLNames.h" 28 #include "core/HTMLNames.h"
29 #include "core/SVGNames.h" 29 #include "core/SVGNames.h"
30 #include "core/XMLNames.h" 30 #include "core/XMLNames.h"
31 #include "core/animation/DocumentAnimations.h" 31 #include "core/animation/DocumentAnimations.h"
32 #include "core/animation/EffectStack.h" 32 #include "core/animation/EffectStack.h"
33 #include "core/animation/ElementAnimations.h" 33 #include "core/animation/ElementAnimations.h"
34 #include "core/animation/InterpolationEnvironment.h" 34 #include "core/animation/InterpolationEnvironment.h"
35 #include "core/animation/InvalidatableInterpolation.h" 35 #include "core/animation/InvalidatableInterpolation.h"
36 #include "core/animation/SVGInterpolationTypesMap.h" 36 #include "core/animation/SVGInterpolationTypesMap.h"
37 #include "core/css/CSSCursorImageValue.h"
38 #include "core/css/resolver/StyleResolver.h" 37 #include "core/css/resolver/StyleResolver.h"
39 #include "core/dom/Document.h" 38 #include "core/dom/Document.h"
40 #include "core/dom/ElementTraversal.h" 39 #include "core/dom/ElementTraversal.h"
41 #include "core/dom/shadow/ShadowRoot.h" 40 #include "core/dom/shadow/ShadowRoot.h"
42 #include "core/events/Event.h" 41 #include "core/events/Event.h"
43 #include "core/frame/Settings.h" 42 #include "core/frame/Settings.h"
44 #include "core/html/HTMLElement.h" 43 #include "core/html/HTMLElement.h"
45 #include "core/layout/LayoutObject.h" 44 #include "core/layout/LayoutObject.h"
46 #include "core/layout/svg/LayoutSVGResourceContainer.h" 45 #include "core/layout/svg/LayoutSVGResourceContainer.h"
47 #include "core/svg/SVGCursorElement.h"
48 #include "core/svg/SVGDocumentExtensions.h" 46 #include "core/svg/SVGDocumentExtensions.h"
49 #include "core/svg/SVGElementRareData.h" 47 #include "core/svg/SVGElementRareData.h"
50 #include "core/svg/SVGGraphicsElement.h" 48 #include "core/svg/SVGGraphicsElement.h"
51 #include "core/svg/SVGSVGElement.h" 49 #include "core/svg/SVGSVGElement.h"
52 #include "core/svg/SVGTitleElement.h" 50 #include "core/svg/SVGTitleElement.h"
53 #include "core/svg/SVGUseElement.h" 51 #include "core/svg/SVGUseElement.h"
54 #include "core/svg/properties/SVGProperty.h" 52 #include "core/svg/properties/SVGProperty.h"
55 #include "wtf/AutoReset.h" 53 #include "wtf/AutoReset.h"
56 #include "wtf/Threading.h" 54 #include "wtf/Threading.h"
57 55
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 return emptyInstances; 633 return emptyInstances;
636 } 634 }
637 635
638 const HeapHashSet<WeakMember<SVGElement>>& SVGElement::instancesForElement() 636 const HeapHashSet<WeakMember<SVGElement>>& SVGElement::instancesForElement()
639 const { 637 const {
640 if (!hasSVGRareData()) 638 if (!hasSVGRareData())
641 return emptyInstances(); 639 return emptyInstances();
642 return svgRareData()->elementInstances(); 640 return svgRareData()->elementInstances();
643 } 641 }
644 642
645 void SVGElement::setCursorElement(SVGCursorElement* cursorElement) {
646 SVGElementRareData* rareData = ensureSVGRareData();
647 if (SVGCursorElement* oldCursorElement = rareData->cursorElement()) {
648 if (cursorElement == oldCursorElement)
649 return;
650 oldCursorElement->removeReferencedElement(this);
651 }
652 rareData->setCursorElement(cursorElement);
653 }
654
655 void SVGElement::setCursorImageValue(
656 const CSSCursorImageValue* cursorImageValue) {
657 ensureSVGRareData()->setCursorImageValue(cursorImageValue);
658 }
659
660 SVGElement* SVGElement::correspondingElement() const { 643 SVGElement* SVGElement::correspondingElement() const {
661 ASSERT(!hasSVGRareData() || !svgRareData()->correspondingElement() || 644 ASSERT(!hasSVGRareData() || !svgRareData()->correspondingElement() ||
662 containingShadowRoot()); 645 containingShadowRoot());
663 return hasSVGRareData() ? svgRareData()->correspondingElement() : 0; 646 return hasSVGRareData() ? svgRareData()->correspondingElement() : 0;
664 } 647 }
665 648
666 SVGUseElement* SVGElement::correspondingUseElement() const { 649 SVGUseElement* SVGElement::correspondingUseElement() const {
667 if (ShadowRoot* root = containingShadowRoot()) { 650 if (ShadowRoot* root = containingShadowRoot()) {
668 if (isSVGUseElement(root->host()) && 651 if (isSVGUseElement(root->host()) &&
669 (root->type() == ShadowRootType::UserAgent)) 652 (root->type() == ShadowRootType::UserAgent))
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 visitor->trace(m_className); 1288 visitor->trace(m_className);
1306 Element::trace(visitor); 1289 Element::trace(visitor);
1307 } 1290 }
1308 1291
1309 const AtomicString& SVGElement::eventParameterName() { 1292 const AtomicString& SVGElement::eventParameterName() {
1310 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt")); 1293 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt"));
1311 return evtString; 1294 return evtString;
1312 } 1295 }
1313 1296
1314 } // namespace blink 1297 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGElement.h ('k') | third_party/WebKit/Source/core/svg/SVGElementRareData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698