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

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

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 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/LayoutSVGText.h ('k') | Source/core/layout/svg/LayoutSVGTextPath.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) 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 , m_needsTransformUpdate(true) 62 , m_needsTransformUpdate(true)
63 , m_needsTextMetricsUpdate(false) 63 , m_needsTextMetricsUpdate(false)
64 { 64 {
65 } 65 }
66 66
67 LayoutSVGText::~LayoutSVGText() 67 LayoutSVGText::~LayoutSVGText()
68 { 68 {
69 ASSERT(m_layoutAttributes.isEmpty()); 69 ASSERT(m_layoutAttributes.isEmpty());
70 } 70 }
71 71
72 bool LayoutSVGText::isChildAllowed(LayoutObject* child, const LayoutStyle&) cons t 72 bool LayoutSVGText::isChildAllowed(LayoutObject* child, const ComputedStyle&) co nst
73 { 73 {
74 return child->isSVGInline() || (child->isText() && SVGLayoutSupport::isLayou tableTextNode(child)); 74 return child->isSVGInline() || (child->isText() && SVGLayoutSupport::isLayou tableTextNode(child));
75 } 75 }
76 76
77 LayoutSVGText* LayoutSVGText::locateLayoutSVGTextAncestor(LayoutObject* start) 77 LayoutSVGText* LayoutSVGText::locateLayoutSVGTextAncestor(LayoutObject* start)
78 { 78 {
79 ASSERT(start); 79 ASSERT(start);
80 while (start && !start->isSVGText()) 80 while (start && !start->isSVGText())
81 start = start->parent(); 81 start = start->parent();
82 if (!start || !start->isSVGText()) 82 if (!start || !start->isSVGText())
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 } 461 }
462 462
463 void LayoutSVGText::paint(const PaintInfo& paintInfo, const LayoutPoint&) 463 void LayoutSVGText::paint(const PaintInfo& paintInfo, const LayoutPoint&)
464 { 464 {
465 SVGTextPainter(*this).paint(paintInfo); 465 SVGTextPainter(*this).paint(paintInfo);
466 } 466 }
467 467
468 FloatRect LayoutSVGText::strokeBoundingBox() const 468 FloatRect LayoutSVGText::strokeBoundingBox() const
469 { 469 {
470 FloatRect strokeBoundaries = objectBoundingBox(); 470 FloatRect strokeBoundaries = objectBoundingBox();
471 const SVGLayoutStyle& svgStyle = style()->svgStyle(); 471 const SVGComputedStyle& svgStyle = style()->svgStyle();
472 if (!svgStyle.hasStroke()) 472 if (!svgStyle.hasStroke())
473 return strokeBoundaries; 473 return strokeBoundaries;
474 474
475 ASSERT(node()); 475 ASSERT(node());
476 ASSERT(node()->isSVGElement()); 476 ASSERT(node()->isSVGElement());
477 SVGLengthContext lengthContext(toSVGElement(node())); 477 SVGLengthContext lengthContext(toSVGElement(node()));
478 strokeBoundaries.inflate(lengthContext.valueForLength(svgStyle.strokeWidth() )); 478 strokeBoundaries.inflate(lengthContext.valueForLength(svgStyle.strokeWidth() ));
479 return strokeBoundaries; 479 return strokeBoundaries;
480 } 480 }
481 481
(...skipping 21 matching lines...) Expand all
503 SVGResourcesCache::clientWillBeRemovedFromTree(child); 503 SVGResourcesCache::clientWillBeRemovedFromTree(child);
504 504
505 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes; 505 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes;
506 FontCachePurgePreventer fontCachePurgePreventer; 506 FontCachePurgePreventer fontCachePurgePreventer;
507 subtreeChildWillBeRemoved(child, affectedAttributes); 507 subtreeChildWillBeRemoved(child, affectedAttributes);
508 LayoutSVGBlock::removeChild(child); 508 LayoutSVGBlock::removeChild(child);
509 subtreeChildWasRemoved(affectedAttributes); 509 subtreeChildWasRemoved(affectedAttributes);
510 } 510 }
511 511
512 } 512 }
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGText.h ('k') | Source/core/layout/svg/LayoutSVGTextPath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698