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 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2010 Dirk Schulze <krit@webkit.org> | 4 * Copyright (C) 2010 Dirk Schulze <krit@webkit.org> |
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 { | 59 { |
60 SVGPreserveAspectRatioType align = SVG_PRESERVEASPECTRATIO_XMIDYMID; | 60 SVGPreserveAspectRatioType align = SVG_PRESERVEASPECTRATIO_XMIDYMID; |
61 SVGMeetOrSliceType meetOrSlice = SVG_MEETORSLICE_MEET; | 61 SVGMeetOrSliceType meetOrSlice = SVG_MEETORSLICE_MEET; |
62 | 62 |
63 setAlign(align); | 63 setAlign(align); |
64 setMeetOrSlice(meetOrSlice); | 64 setMeetOrSlice(meetOrSlice); |
65 | 65 |
66 if (!skipOptionalSVGSpaces(ptr, end)) | 66 if (!skipOptionalSVGSpaces(ptr, end)) |
67 return false; | 67 return false; |
68 | 68 |
69 if (*ptr == 'd') { | |
70 if (!skipString(ptr, end, "defer")) | |
71 return false; | |
72 | |
73 // FIXME: We just ignore the "defer" here. | |
74 if (ptr == end) | |
75 return true; | |
76 | |
77 if (!skipOptionalSVGSpaces(ptr, end)) | |
78 return false; | |
79 } | |
80 | |
81 if (*ptr == 'n') { | 69 if (*ptr == 'n') { |
82 if (!skipString(ptr, end, "none")) | 70 if (!skipString(ptr, end, "none")) |
83 return false; | 71 return false; |
84 align = SVG_PRESERVEASPECTRATIO_NONE; | 72 align = SVG_PRESERVEASPECTRATIO_NONE; |
85 skipOptionalSVGSpaces(ptr, end); | 73 skipOptionalSVGSpaces(ptr, end); |
86 } else if (*ptr == 'x') { | 74 } else if (*ptr == 'x') { |
87 if ((end - ptr) < 8) | 75 if ((end - ptr) < 8) |
88 return false; | 76 return false; |
89 if (ptr[1] != 'M' || ptr[4] != 'Y' || ptr[5] != 'M') | 77 if (ptr[1] != 'M' || ptr[4] != 'Y' || ptr[5] != 'M') |
90 return false; | 78 return false; |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 m_meetOrSlice = preserveAspectRatioToUse->m_meetOrSlice; | 398 m_meetOrSlice = preserveAspectRatioToUse->m_meetOrSlice; |
411 } | 399 } |
412 | 400 |
413 float SVGPreserveAspectRatio::calculateDistance(PassRefPtrWillBeRawPtr<SVGProper
tyBase> toValue, SVGElement* contextElement) | 401 float SVGPreserveAspectRatio::calculateDistance(PassRefPtrWillBeRawPtr<SVGProper
tyBase> toValue, SVGElement* contextElement) |
414 { | 402 { |
415 // No paced animations for SVGPreserveAspectRatio. | 403 // No paced animations for SVGPreserveAspectRatio. |
416 return -1; | 404 return -1; |
417 } | 405 } |
418 | 406 |
419 } | 407 } |
OLD | NEW |