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

Side by Side Diff: Source/core/layout/svg/LayoutSVGText.cpp

Issue 983103003: Use Length for the stroke-width property in SVGLayoutStyle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: lengthSetterForProperty Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/svg/LayoutSVGShape.cpp ('k') | Source/core/layout/svg/SVGLayoutSupport.cpp » ('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) 2006 Apple Computer, Inc. 2 * Copyright (C) 2006 Apple Computer, Inc.
3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> 3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>
4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> 4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
5 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 5 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
6 * Copyright (C) 2008 Rob Buis <buis@kde.org> 6 * Copyright (C) 2008 Rob Buis <buis@kde.org>
7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
8 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. 8 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved.
9 * Copyright (C) 2012 Google Inc. 9 * Copyright (C) 2012 Google Inc.
10 * 10 *
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 FloatRect LayoutSVGText::strokeBoundingBox() const 464 FloatRect LayoutSVGText::strokeBoundingBox() const
465 { 465 {
466 FloatRect strokeBoundaries = objectBoundingBox(); 466 FloatRect strokeBoundaries = objectBoundingBox();
467 const SVGLayoutStyle& svgStyle = style()->svgStyle(); 467 const SVGLayoutStyle& svgStyle = style()->svgStyle();
468 if (!svgStyle.hasStroke()) 468 if (!svgStyle.hasStroke())
469 return strokeBoundaries; 469 return strokeBoundaries;
470 470
471 ASSERT(node()); 471 ASSERT(node());
472 ASSERT(node()->isSVGElement()); 472 ASSERT(node()->isSVGElement());
473 SVGLengthContext lengthContext(toSVGElement(node())); 473 SVGLengthContext lengthContext(toSVGElement(node()));
474 strokeBoundaries.inflate(svgStyle.strokeWidth()->value(lengthContext)); 474 strokeBoundaries.inflate(lengthContext.valueForLength(svgStyle.strokeWidth() ));
475 return strokeBoundaries; 475 return strokeBoundaries;
476 } 476 }
477 477
478 FloatRect LayoutSVGText::paintInvalidationRectInLocalCoordinates() const 478 FloatRect LayoutSVGText::paintInvalidationRectInLocalCoordinates() const
479 { 479 {
480 FloatRect paintInvalidationRect = strokeBoundingBox(); 480 FloatRect paintInvalidationRect = strokeBoundingBox();
481 SVGLayoutSupport::intersectPaintInvalidationRectWithResources(this, paintInv alidationRect); 481 SVGLayoutSupport::intersectPaintInvalidationRectWithResources(this, paintInv alidationRect);
482 482
483 if (const ShadowList* textShadow = style()->textShadow()) 483 if (const ShadowList* textShadow = style()->textShadow())
484 textShadow->adjustRectForShadow(paintInvalidationRect); 484 textShadow->adjustRectForShadow(paintInvalidationRect);
(...skipping 14 matching lines...) Expand all
499 SVGResourcesCache::clientWillBeRemovedFromTree(child); 499 SVGResourcesCache::clientWillBeRemovedFromTree(child);
500 500
501 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes; 501 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes;
502 FontCachePurgePreventer fontCachePurgePreventer; 502 FontCachePurgePreventer fontCachePurgePreventer;
503 subtreeChildWillBeRemoved(child, affectedAttributes); 503 subtreeChildWillBeRemoved(child, affectedAttributes);
504 LayoutSVGBlock::removeChild(child); 504 LayoutSVGBlock::removeChild(child);
505 subtreeChildWasRemoved(affectedAttributes); 505 subtreeChildWasRemoved(affectedAttributes);
506 } 506 }
507 507
508 } 508 }
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGShape.cpp ('k') | Source/core/layout/svg/SVGLayoutSupport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698