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

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

Issue 860063002: Initialize GC mixin bases only when leftmost vtable has been initialized. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add comments explaining purpose Created 5 years, 11 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
« no previous file with comments | « Source/core/svg/SVGFilterElement.cpp ('k') | Source/core/svg/SVGFitToViewBox.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) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Rob Buis <buis@kde.org>
4 * Copyright (C) 2014 Samsung Electronics. All rights reserved. 4 * Copyright (C) 2014 Samsung Electronics. 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 bool hasEmptyViewBox() const { return m_viewBox->currentValue()->isValid() & & m_viewBox->currentValue()->value().isEmpty(); } 67 bool hasEmptyViewBox() const { return m_viewBox->currentValue()->isValid() & & m_viewBox->currentValue()->value().isEmpty(); }
68 68
69 // JS API 69 // JS API
70 SVGAnimatedRect* viewBox() const { return m_viewBox.get(); } 70 SVGAnimatedRect* viewBox() const { return m_viewBox.get(); }
71 SVGAnimatedPreserveAspectRatio* preserveAspectRatio() const { return m_prese rveAspectRatio.get(); } 71 SVGAnimatedPreserveAspectRatio* preserveAspectRatio() const { return m_prese rveAspectRatio.get(); }
72 72
73 virtual void trace(Visitor*); 73 virtual void trace(Visitor*);
74 74
75 protected: 75 protected:
76 explicit SVGFitToViewBox(SVGElement*, PropertyMapPolicy = PropertyMapPolicyA dd); 76 SVGFitToViewBox();
77
78 // FIXME: Oilpan: the construction of this mixin requires heap allocation,
79 // which cannot be safely done with Oilpan until the object that include
80 // this mixin have had its vptr initialized -- so as to be able to
81 // accurately trace the entire object should a GC strike while constructing
82 // the mixin.
83 //
84 // Try to come up with a more natural alternative and solution that doesn't
85 // require hoisting the constructor code for mixins into a separate method
86 // like initialize(). It makes construction of these heap-allocation mixins
87 // safe in the meantime, however.
88 //
89 void initialize(SVGElement* contextElement, PropertyMapPolicy = PropertyMapP olicyAdd);
90
77 void updateViewBox(const FloatRect&); 91 void updateViewBox(const FloatRect&);
78 void clearViewBox() { m_viewBox = nullptr; } 92 void clearViewBox() { m_viewBox = nullptr; }
79 void clearPreserveAspectRatio() { m_preserveAspectRatio = nullptr; } 93 void clearPreserveAspectRatio() { m_preserveAspectRatio = nullptr; }
80 94
81 private: 95 private:
82 RefPtrWillBeMember<SVGAnimatedRect> m_viewBox; 96 RefPtrWillBeMember<SVGAnimatedRect> m_viewBox;
83 RefPtrWillBeMember<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio; 97 RefPtrWillBeMember<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio;
84 }; 98 };
85 99
86 } // namespace blink 100 } // namespace blink
87 101
88 #endif // SVGFitToViewBox_h 102 #endif // SVGFitToViewBox_h
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFilterElement.cpp ('k') | Source/core/svg/SVGFitToViewBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698