| 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 return strokeBoundaries; | 361 return strokeBoundaries; |
| 362 | 362 |
| 363 ASSERT(node()); | 363 ASSERT(node()); |
| 364 ASSERT(node()->isSVGElement()); | 364 ASSERT(node()->isSVGElement()); |
| 365 SVGLengthContext lengthContext(toSVGElement(node())); | 365 SVGLengthContext lengthContext(toSVGElement(node())); |
| 366 strokeBoundaries.inflate( | 366 strokeBoundaries.inflate( |
| 367 lengthContext.valueForLength(svgStyle.strokeWidth())); | 367 lengthContext.valueForLength(svgStyle.strokeWidth())); |
| 368 return strokeBoundaries; | 368 return strokeBoundaries; |
| 369 } | 369 } |
| 370 | 370 |
| 371 FloatRect LayoutSVGText::paintInvalidationRectInLocalSVGCoordinates() const { | 371 FloatRect LayoutSVGText::visualRectInLocalSVGCoordinates() const { |
| 372 FloatRect paintInvalidationRect = strokeBoundingBox(); | 372 FloatRect visualRect = strokeBoundingBox(); |
| 373 SVGLayoutSupport::intersectPaintInvalidationRectWithResources( | 373 SVGLayoutSupport::adjustVisualRectWithResources(this, visualRect); |
| 374 this, paintInvalidationRect); | |
| 375 | 374 |
| 376 if (const ShadowList* textShadow = style()->textShadow()) | 375 if (const ShadowList* textShadow = style()->textShadow()) |
| 377 textShadow->adjustRectForShadow(paintInvalidationRect); | 376 textShadow->adjustRectForShadow(visualRect); |
| 378 | 377 |
| 379 return paintInvalidationRect; | 378 return visualRect; |
| 380 } | 379 } |
| 381 | 380 |
| 382 bool LayoutSVGText::isObjectBoundingBoxValid() const { | 381 bool LayoutSVGText::isObjectBoundingBoxValid() const { |
| 383 // If we don't have any line boxes, then consider the bbox invalid. | 382 // If we don't have any line boxes, then consider the bbox invalid. |
| 384 return firstLineBox(); | 383 return firstLineBox(); |
| 385 } | 384 } |
| 386 | 385 |
| 387 void LayoutSVGText::addChild(LayoutObject* child, LayoutObject* beforeChild) { | 386 void LayoutSVGText::addChild(LayoutObject* child, LayoutObject* beforeChild) { |
| 388 LayoutSVGBlock::addChild(child, beforeChild); | 387 LayoutSVGBlock::addChild(child, beforeChild); |
| 389 | 388 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 400 | 399 |
| 401 void LayoutSVGText::invalidateTreeIfNeeded( | 400 void LayoutSVGText::invalidateTreeIfNeeded( |
| 402 const PaintInvalidationState& paintInvalidationState) { | 401 const PaintInvalidationState& paintInvalidationState) { |
| 403 // TODO(wangxianzhu): Verify if the inherited | 402 // TODO(wangxianzhu): Verify if the inherited |
| 404 // LayoutBoxModelObject::invalidateTreeIfNeeded() | 403 // LayoutBoxModelObject::invalidateTreeIfNeeded() |
| 405 // is applicable here. If yes, remove this overriding method. | 404 // is applicable here. If yes, remove this overriding method. |
| 406 LayoutObject::invalidateTreeIfNeeded(paintInvalidationState); | 405 LayoutObject::invalidateTreeIfNeeded(paintInvalidationState); |
| 407 } | 406 } |
| 408 | 407 |
| 409 } // namespace blink | 408 } // namespace blink |
| OLD | NEW |