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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGUseElement.cpp ('k') | Source/core/svg/SVGZoomAndPan.h » ('j') | 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) 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 return false; 217 return false;
218 ptr++; 218 ptr++;
219 219
220 while (ptr < end && *ptr != ')') { 220 while (ptr < end && *ptr != ')') {
221 if (*ptr == 'v') { 221 if (*ptr == 'v') {
222 if (skipString(ptr, end, viewBoxSpec, WTF_ARRAY_LENGTH(viewBoxSpec)) ) { 222 if (skipString(ptr, end, viewBoxSpec, WTF_ARRAY_LENGTH(viewBoxSpec)) ) {
223 if (ptr >= end || *ptr != '(') 223 if (ptr >= end || *ptr != '(')
224 return false; 224 return false;
225 ptr++; 225 ptr++;
226 FloatRect viewBox; 226 FloatRect viewBox;
227 if (!SVGFitToViewBox::parseViewBox(m_contextElement->document(), ptr, end, viewBox, false)) 227 if (!SVGFitToViewBox::parseViewBox(&m_contextElement->document() , ptr, end, viewBox, false))
228 return false; 228 return false;
229 setViewBoxBaseValue(viewBox); 229 setViewBoxBaseValue(viewBox);
230 if (ptr >= end || *ptr != ')') 230 if (ptr >= end || *ptr != ')')
231 return false; 231 return false;
232 ptr++; 232 ptr++;
233 } else if (skipString(ptr, end, viewTargetSpec, WTF_ARRAY_LENGTH(vie wTargetSpec))) { 233 } else if (skipString(ptr, end, viewTargetSpec, WTF_ARRAY_LENGTH(vie wTargetSpec))) {
234 if (ptr >= end || *ptr != '(') 234 if (ptr >= end || *ptr != '(')
235 return false; 235 return false;
236 const CharType* viewTargetStart = ++ptr; 236 const CharType* viewTargetStart = ++ptr;
237 while (ptr < end && *ptr != ')') 237 while (ptr < end && *ptr != ')')
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 const LChar* ptr = spec.characters8(); 297 const LChar* ptr = spec.characters8();
298 const LChar* end = ptr + spec.length(); 298 const LChar* end = ptr + spec.length();
299 return parseViewSpecInternal(ptr, end); 299 return parseViewSpecInternal(ptr, end);
300 } 300 }
301 const UChar* ptr = spec.characters16(); 301 const UChar* ptr = spec.characters16();
302 const UChar* end = ptr + spec.length(); 302 const UChar* end = ptr + spec.length();
303 return parseViewSpecInternal(ptr, end); 303 return parseViewSpecInternal(ptr, end);
304 } 304 }
305 305
306 } 306 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGUseElement.cpp ('k') | Source/core/svg/SVGZoomAndPan.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698