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

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

Issue 678163002: Oilpan: move SVG property hierarchy to the heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased upto r185213 Created 6 years, 1 month 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 | « Source/core/svg/SVGViewElement.cpp ('k') | Source/core/svg/SVGViewSpec.cpp » ('j') | 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) 2007 Rob Buis <buis@kde.org> 2 * Copyright (C) 2007 Rob Buis <buis@kde.org>
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 13 matching lines...) Expand all
24 #include "core/svg/SVGFitToViewBox.h" 24 #include "core/svg/SVGFitToViewBox.h"
25 #include "core/svg/SVGSVGElement.h" 25 #include "core/svg/SVGSVGElement.h"
26 #include "core/svg/SVGZoomAndPan.h" 26 #include "core/svg/SVGZoomAndPan.h"
27 #include "platform/heap/Handle.h" 27 #include "platform/heap/Handle.h"
28 #include "wtf/WeakPtr.h" 28 #include "wtf/WeakPtr.h"
29 29
30 namespace blink { 30 namespace blink {
31 31
32 class SVGViewSpec final : public RefCountedWillBeGarbageCollectedFinalized<SVGVi ewSpec>, public ScriptWrappable, public SVGZoomAndPan, public SVGFitToViewBox { 32 class SVGViewSpec final : public RefCountedWillBeGarbageCollectedFinalized<SVGVi ewSpec>, public ScriptWrappable, public SVGZoomAndPan, public SVGFitToViewBox {
33 DEFINE_WRAPPERTYPEINFO(); 33 DEFINE_WRAPPERTYPEINFO();
34 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SVGViewSpec);
34 public: 35 public:
35 #if !ENABLE(OILPAN) 36 #if !ENABLE(OILPAN)
36 using RefCounted<SVGViewSpec>::ref; 37 using RefCounted<SVGViewSpec>::ref;
37 using RefCounted<SVGViewSpec>::deref; 38 using RefCounted<SVGViewSpec>::deref;
38 #endif 39 #endif
39 40
40 static PassRefPtrWillBeRawPtr<SVGViewSpec> create(SVGSVGElement* contextElem ent) 41 static PassRefPtrWillBeRawPtr<SVGViewSpec> create(SVGSVGElement* contextElem ent)
41 { 42 {
42 return adoptRefWillBeNoop(new SVGViewSpec(contextElement)); 43 return adoptRefWillBeNoop(new SVGViewSpec(contextElement));
43 } 44 }
44 45
45 bool parseViewSpec(const String&); 46 bool parseViewSpec(const String&);
46 void reset(); 47 void reset();
47 void detachContextElement(); 48 void detachContextElement();
48 49
49 // JS API 50 // JS API
50 SVGTransformList* transform() { return m_transform ? m_transform->baseValue( ) : 0; } 51 SVGTransformList* transform() { return m_transform ? m_transform->baseValue( ) : 0; }
51 PassRefPtr<SVGTransformListTearOff> transformFromJavascript() { return m_tra nsform ? m_transform->baseVal() : 0; } 52 PassRefPtrWillBeRawPtr<SVGTransformListTearOff> transformFromJavascript() { return m_transform ? m_transform->baseVal() : 0; }
52 SVGElement* viewTarget() const; 53 SVGElement* viewTarget() const;
53 String viewBoxString() const; 54 String viewBoxString() const;
54 String preserveAspectRatioString() const; 55 String preserveAspectRatioString() const;
55 String transformString() const; 56 String transformString() const;
56 String viewTargetString() const { return m_viewTargetString; } 57 String viewTargetString() const { return m_viewTargetString; }
57 // override SVGZoomAndPan.setZoomAndPan so can throw exception on write 58 // override SVGZoomAndPan.setZoomAndPan so can throw exception on write
58 void setZoomAndPan(unsigned short value) { } // read only 59 void setZoomAndPan(unsigned short value) { } // read only
59 void setZoomAndPan(unsigned short value, ExceptionState&); 60 void setZoomAndPan(unsigned short value, ExceptionState&);
60 61
61 void trace(Visitor*); 62 virtual void trace(Visitor*) override;
62 63
63 SVGSVGElement* contextElement() { return m_contextElement.get(); } 64 SVGSVGElement* contextElement() { return m_contextElement.get(); }
64 65
65 private: 66 private:
66 explicit SVGViewSpec(SVGSVGElement*); 67 explicit SVGViewSpec(SVGSVGElement*);
67 68
68 template<typename CharType> 69 template<typename CharType>
69 bool parseViewSpecInternal(const CharType* ptr, const CharType* end); 70 bool parseViewSpecInternal(const CharType* ptr, const CharType* end);
70 71
71 RawPtrWillBeMember<SVGSVGElement> m_contextElement; 72 RawPtrWillBeMember<SVGSVGElement> m_contextElement;
72 RefPtr<SVGAnimatedTransformList> m_transform; 73 RefPtrWillBeMember<SVGAnimatedTransformList> m_transform;
73 String m_viewTargetString; 74 String m_viewTargetString;
74 }; 75 };
75 76
76 } // namespace blink 77 } // namespace blink
77 78
78 #endif // SVGViewSpec_h 79 #endif // SVGViewSpec_h
OLDNEW
« no previous file with comments | « Source/core/svg/SVGViewElement.cpp ('k') | Source/core/svg/SVGViewSpec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698