OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |