| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2010 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007, 2010 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 while (ptr < end && *ptr != ')') { | 142 while (ptr < end && *ptr != ')') { |
| 143 if (*ptr == 'v') { | 143 if (*ptr == 'v') { |
| 144 if (skipString(ptr, end, viewBoxSpec, WTF_ARRAY_LENGTH(viewBoxSpec))
) { | 144 if (skipString(ptr, end, viewBoxSpec, WTF_ARRAY_LENGTH(viewBoxSpec))
) { |
| 145 if (ptr >= end || *ptr != '(') | 145 if (ptr >= end || *ptr != '(') |
| 146 return false; | 146 return false; |
| 147 ptr++; | 147 ptr++; |
| 148 float x = 0.0f; | 148 float x = 0.0f; |
| 149 float y = 0.0f; | 149 float y = 0.0f; |
| 150 float width = 0.0f; | 150 float width = 0.0f; |
| 151 float height = 0.0f; | 151 float height = 0.0f; |
| 152 if (!(parseNumber(ptr, end, x) && parseNumber(ptr, end, y) && pa
rseNumber(ptr, end, width) && parseNumber(ptr, end, height, false))) | 152 if (!(parseNumber(ptr, end, x) && parseNumber(ptr, end, y) && pa
rseNumber(ptr, end, width) && parseNumber(ptr, end, height, DisallowWhitespace))
) |
| 153 return false; | 153 return false; |
| 154 updateViewBox(FloatRect(x, y, width, height)); | 154 updateViewBox(FloatRect(x, y, width, height)); |
| 155 if (ptr >= end || *ptr != ')') | 155 if (ptr >= end || *ptr != ')') |
| 156 return false; | 156 return false; |
| 157 ptr++; | 157 ptr++; |
| 158 } else if (skipString(ptr, end, viewTargetSpec, WTF_ARRAY_LENGTH(vie
wTargetSpec))) { | 158 } else if (skipString(ptr, end, viewTargetSpec, WTF_ARRAY_LENGTH(vie
wTargetSpec))) { |
| 159 if (ptr >= end || *ptr != '(') | 159 if (ptr >= end || *ptr != '(') |
| 160 return false; | 160 return false; |
| 161 const CharType* viewTargetStart = ++ptr; | 161 const CharType* viewTargetStart = ++ptr; |
| 162 while (ptr < end && *ptr != ')') | 162 while (ptr < end && *ptr != ')') |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 visitor->registerWeakMembers<SVGViewSpec, &SVGViewSpec::clearWeakMembers>(th
is); | 217 visitor->registerWeakMembers<SVGViewSpec, &SVGViewSpec::clearWeakMembers>(th
is); |
| 218 } | 218 } |
| 219 | 219 |
| 220 void SVGViewSpec::clearWeakMembers(Visitor* visitor) | 220 void SVGViewSpec::clearWeakMembers(Visitor* visitor) |
| 221 { | 221 { |
| 222 if (!visitor->isAlive(m_contextElement)) | 222 if (!visitor->isAlive(m_contextElement)) |
| 223 detachContextElement(); | 223 detachContextElement(); |
| 224 } | 224 } |
| 225 | 225 |
| 226 } | 226 } |
| OLD | NEW |