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

Side by Side Diff: Source/core/svg/SVGPreserveAspectRatio.cpp

Issue 1224263002: Remove 'defer' KeyWord from preserveAspectRatio (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Align with review comments Created 5 years, 5 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 | « LayoutTests/svg/dom/preserve-aspect-ratio-parser-expected.txt ('k') | no next file » | 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 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
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
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 }
OLDNEW
« no previous file with comments | « LayoutTests/svg/dom/preserve-aspect-ratio-parser-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698