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

Side by Side Diff: Source/core/svg/SVGSVGElement.cpp

Issue 24000002: Add use counter for <svg> (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Correctly rebase Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2007 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 19 matching lines...) Expand all
30 #include "core/dom/Document.h" 30 #include "core/dom/Document.h"
31 #include "core/dom/ElementTraversal.h" 31 #include "core/dom/ElementTraversal.h"
32 #include "core/dom/EventListener.h" 32 #include "core/dom/EventListener.h"
33 #include "core/dom/EventNames.h" 33 #include "core/dom/EventNames.h"
34 #include "core/dom/NodeTraversal.h" 34 #include "core/dom/NodeTraversal.h"
35 #include "core/dom/StaticNodeList.h" 35 #include "core/dom/StaticNodeList.h"
36 #include "core/editing/FrameSelection.h" 36 #include "core/editing/FrameSelection.h"
37 #include "core/page/Frame.h" 37 #include "core/page/Frame.h"
38 #include "core/page/FrameTree.h" 38 #include "core/page/FrameTree.h"
39 #include "core/page/FrameView.h" 39 #include "core/page/FrameView.h"
40 #include "core/page/UseCounter.h"
40 #include "core/platform/FloatConversion.h" 41 #include "core/platform/FloatConversion.h"
41 #include "core/platform/graphics/FloatRect.h" 42 #include "core/platform/graphics/FloatRect.h"
42 #include "core/platform/graphics/transforms/AffineTransform.h" 43 #include "core/platform/graphics/transforms/AffineTransform.h"
43 #include "core/rendering/RenderObject.h" 44 #include "core/rendering/RenderObject.h"
44 #include "core/rendering/RenderPart.h" 45 #include "core/rendering/RenderPart.h"
45 #include "core/rendering/svg/RenderSVGModelObject.h" 46 #include "core/rendering/svg/RenderSVGModelObject.h"
46 #include "core/rendering/svg/RenderSVGResource.h" 47 #include "core/rendering/svg/RenderSVGResource.h"
47 #include "core/rendering/svg/RenderSVGRoot.h" 48 #include "core/rendering/svg/RenderSVGRoot.h"
48 #include "core/rendering/svg/RenderSVGViewportContainer.h" 49 #include "core/rendering/svg/RenderSVGViewportContainer.h"
49 #include "core/svg/SVGAngle.h" 50 #include "core/svg/SVGAngle.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 , m_y(LengthModeHeight) 86 , m_y(LengthModeHeight)
86 , m_width(LengthModeWidth, "100%") 87 , m_width(LengthModeWidth, "100%")
87 , m_height(LengthModeHeight, "100%") 88 , m_height(LengthModeHeight, "100%")
88 , m_useCurrentView(false) 89 , m_useCurrentView(false)
89 , m_zoomAndPan(SVGZoomAndPanMagnify) 90 , m_zoomAndPan(SVGZoomAndPanMagnify)
90 , m_timeContainer(SMILTimeContainer::create(this)) 91 , m_timeContainer(SMILTimeContainer::create(this))
91 { 92 {
92 ASSERT(hasTagName(SVGNames::svgTag)); 93 ASSERT(hasTagName(SVGNames::svgTag));
93 ScriptWrappable::init(this); 94 ScriptWrappable::init(this);
94 registerAnimatedPropertiesForSVGSVGElement(); 95 registerAnimatedPropertiesForSVGSVGElement();
96
97 UseCounter::count(&doc, UseCounter::SVGSVGElement);
95 } 98 }
96 99
97 PassRefPtr<SVGSVGElement> SVGSVGElement::create(const QualifiedName& tagName, Do cument& document) 100 PassRefPtr<SVGSVGElement> SVGSVGElement::create(const QualifiedName& tagName, Do cument& document)
98 { 101 {
99 return adoptRef(new SVGSVGElement(tagName, document)); 102 return adoptRef(new SVGSVGElement(tagName, document));
100 } 103 }
101 104
102 SVGSVGElement::~SVGSVGElement() 105 SVGSVGElement::~SVGSVGElement()
103 { 106 {
104 if (m_viewSpec) 107 if (m_viewSpec)
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 continue; 773 continue;
771 774
772 Element* element = toElement(node); 775 Element* element = toElement(node);
773 if (element->getIdAttribute() == id) 776 if (element->getIdAttribute() == id)
774 return element; 777 return element;
775 } 778 }
776 return 0; 779 return 0;
777 } 780 }
778 781
779 } 782 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698