| OLD | NEW |
| 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 Loading... |
| 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 DECLARE_VIRTUAL_TRACE(); | 73 DECLARE_VIRTUAL_TRACE(); |
| 74 | 74 |
| 75 protected: | 75 protected: |
| 76 SVGFitToViewBox(); | 76 explicit SVGFitToViewBox(SVGElement*, PropertyMapPolicy = PropertyMapPolicyA
dd); |
| 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 | |
| 91 void updateViewBox(const FloatRect&); | 77 void updateViewBox(const FloatRect&); |
| 92 void clearViewBox() { m_viewBox = nullptr; } | 78 void clearViewBox() { m_viewBox = nullptr; } |
| 93 void clearPreserveAspectRatio() { m_preserveAspectRatio = nullptr; } | 79 void clearPreserveAspectRatio() { m_preserveAspectRatio = nullptr; } |
| 94 | 80 |
| 95 private: | 81 private: |
| 96 RefPtrWillBeMember<SVGAnimatedRect> m_viewBox; | 82 RefPtrWillBeMember<SVGAnimatedRect> m_viewBox; |
| 97 RefPtrWillBeMember<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio; | 83 RefPtrWillBeMember<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio; |
| 98 }; | 84 }; |
| 99 | 85 |
| 100 } // namespace blink | 86 } // namespace blink |
| 101 | 87 |
| 102 #endif // SVGFitToViewBox_h | 88 #endif // SVGFitToViewBox_h |
| OLD | NEW |