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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 static SVGAnimatedRect* viewBox(SVGFitToViewBox& object) { return object.vie
wBox(); } | 75 static SVGAnimatedRect* viewBox(SVGFitToViewBox& object) { return object.vie
wBox(); } |
76 static SVGAnimatedPreserveAspectRatio* preserveAspectRatio(SVGFitToViewBox&
object) { return object.preserveAspectRatio(); } | 76 static SVGAnimatedPreserveAspectRatio* preserveAspectRatio(SVGFitToViewBox&
object) { return object.preserveAspectRatio(); } |
77 | 77 |
78 SVGAnimatedRect* viewBox() const { return m_viewBox.get(); } | 78 SVGAnimatedRect* viewBox() const { return m_viewBox.get(); } |
79 bool hasEmptyViewBox() const { return m_viewBox->currentValue()->isValid() &
& m_viewBox->currentValue()->value().isEmpty(); } | 79 bool hasEmptyViewBox() const { return m_viewBox->currentValue()->isValid() &
& m_viewBox->currentValue()->value().isEmpty(); } |
80 SVGAnimatedPreserveAspectRatio* preserveAspectRatio() const { return m_prese
rveAspectRatio.get(); } | 80 SVGAnimatedPreserveAspectRatio* preserveAspectRatio() const { return m_prese
rveAspectRatio.get(); } |
81 | 81 |
82 protected: | 82 protected: |
83 explicit SVGFitToViewBox(SVGElement*, PropertyMapPolicy = PropertyMapPolicyA
dd); | 83 explicit SVGFitToViewBox(SVGElement*, PropertyMapPolicy = PropertyMapPolicyA
dd); |
84 void updateViewBox(const FloatRect&); | 84 void updateViewBox(const FloatRect&); |
85 void clearViewBox() { m_viewBox = 0; } | 85 void clearViewBox() { m_viewBox = nullptr; } |
86 void clearPreserveAspectRatio() { m_preserveAspectRatio = 0; } | 86 void clearPreserveAspectRatio() { m_preserveAspectRatio = nullptr; } |
87 | 87 |
88 private: | 88 private: |
89 RefPtr<SVGAnimatedRect> m_viewBox; | 89 RefPtr<SVGAnimatedRect> m_viewBox; |
90 RefPtr<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio; | 90 RefPtr<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio; |
91 }; | 91 }; |
92 | 92 |
93 } // namespace WebCore | 93 } // namespace WebCore |
94 | 94 |
95 #endif // SVGFitToViewBox_h | 95 #endif // SVGFitToViewBox_h |
OLD | NEW |