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

Side by Side Diff: Source/core/rendering/svg/SVGRenderSupport.cpp

Issue 195313003: [SVG2] Add getters and setters to SVG*List interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: tryserver rebase Created 6 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> 2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org>
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Google, Inc. All rights reserved. 5 * Copyright (C) 2009 Google, Inc. All rights reserved.
6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 strokeData->setThickness(svgStyle->strokeWidth()->value(lengthContext)); 382 strokeData->setThickness(svgStyle->strokeWidth()->value(lengthContext));
383 strokeData->setLineCap(svgStyle->capStyle()); 383 strokeData->setLineCap(svgStyle->capStyle());
384 strokeData->setLineJoin(svgStyle->joinStyle()); 384 strokeData->setLineJoin(svgStyle->joinStyle());
385 strokeData->setMiterLimit(svgStyle->strokeMiterLimit()); 385 strokeData->setMiterLimit(svgStyle->strokeMiterLimit());
386 386
387 RefPtr<SVGLengthList> dashes = svgStyle->strokeDashArray(); 387 RefPtr<SVGLengthList> dashes = svgStyle->strokeDashArray();
388 if (dashes->isEmpty()) 388 if (dashes->isEmpty())
389 return; 389 return;
390 390
391 DashArray dashArray; 391 DashArray dashArray;
392 size_t length = dashes->numberOfItems(); 392 size_t length = dashes->length();
393 for (size_t i = 0; i < length; ++i) 393 for (size_t i = 0; i < length; ++i)
394 dashArray.append(dashes->at(i)->value(lengthContext)); 394 dashArray.append(dashes->at(i)->value(lengthContext));
395 395
396 strokeData->setLineDash(dashArray, svgStyle->strokeDashOffset()->value(lengt hContext)); 396 strokeData->setLineDash(dashArray, svgStyle->strokeDashOffset()->value(lengt hContext));
397 } 397 }
398 398
399 bool SVGRenderSupport::isRenderableTextNode(const RenderObject* object) 399 bool SVGRenderSupport::isRenderableTextNode(const RenderObject* object)
400 { 400 {
401 ASSERT(object->isText()); 401 ASSERT(object->isText());
402 // <br> is marked as text, but is not handled by the SVG rendering code-path . 402 // <br> is marked as text, but is not handled by the SVG rendering code-path .
403 return object->isSVGInlineText() && !toRenderSVGInlineText(object)->hasEmpty Text(); 403 return object->isSVGInlineText() && !toRenderSVGInlineText(object)->hasEmpty Text();
404 } 404 }
405 405
406 } 406 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698