OLD | NEW |
---|---|
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 bool parseViewSpecInternal(const CharType* ptr, const CharType* end); | 70 bool parseViewSpecInternal(const CharType* ptr, const CharType* end); |
71 | 71 |
72 RawPtrWillBeMember<SVGSVGElement> m_contextElement; | 72 RawPtrWillBeMember<SVGSVGElement> m_contextElement; |
73 RefPtrWillBeMember<SVGAnimatedTransformList> m_transform; | 73 RefPtrWillBeMember<SVGAnimatedTransformList> m_transform; |
74 String m_viewTargetString; | 74 String m_viewTargetString; |
75 }; | 75 }; |
76 | 76 |
77 template <typename T> | 77 template <typename T> |
78 void SVGViewSpec::inheritViewAttributesFromElement(T* inheritFromElement) | 78 void SVGViewSpec::inheritViewAttributesFromElement(T* inheritFromElement) |
79 { | 79 { |
80 if (inheritFromElement->hasAttribute(SVGNames::viewBoxAttr)) | 80 if (!inheritFromElement->hasEmptyViewBox()) |
81 viewBox()->baseValue()->setValue(inheritFromElement->viewBox()->currentV alue()->value()); | 81 viewBox()->baseValue()->setValue(inheritFromElement->viewBox()->currentV alue()->value()); |
fs
2015/04/22 10:56:51
This will just snapshot the value, which likely me
| |
82 | 82 |
83 if (inheritFromElement->hasAttribute(SVGNames::preserveAspectRatioAttr)) { | 83 if (inheritFromElement->hasAttribute(SVGNames::preserveAspectRatioAttr)) { |
84 preserveAspectRatio()->baseValue()->setAlign(inheritFromElement->preserv eAspectRatio()->currentValue()->align()); | 84 preserveAspectRatio()->baseValue()->setAlign(inheritFromElement->preserv eAspectRatio()->currentValue()->align()); |
85 preserveAspectRatio()->baseValue()->setMeetOrSlice(inheritFromElement->p reserveAspectRatio()->currentValue()->meetOrSlice()); | 85 preserveAspectRatio()->baseValue()->setMeetOrSlice(inheritFromElement->p reserveAspectRatio()->currentValue()->meetOrSlice()); |
86 } | 86 } |
87 | 87 |
88 if (inheritFromElement->hasAttribute(SVGNames::zoomAndPanAttr)) | 88 if (inheritFromElement->hasAttribute(SVGNames::zoomAndPanAttr)) |
89 setZoomAndPan(inheritFromElement->zoomAndPan()); | 89 setZoomAndPan(inheritFromElement->zoomAndPan()); |
90 } | 90 } |
91 | 91 |
92 } // namespace blink | 92 } // namespace blink |
93 | 93 |
94 #endif // SVGViewSpec_h | 94 #endif // SVGViewSpec_h |
OLD | NEW |