| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> | 2 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> |
| 3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
| 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 5 * Copyright (C) 2007, 2008, 2009 Rob Buis <buis@kde.org> | 5 * Copyright (C) 2007, 2008, 2009 Rob Buis <buis@kde.org> |
| 6 * Copyright (C) 2009 Google, Inc. | 6 * Copyright (C) 2009 Google, Inc. |
| 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 8 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> | 8 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 : RenderSVGModelObject(impl) | 45 : RenderSVGModelObject(impl) |
| 46 , m_needsBoundariesUpdate(true) | 46 , m_needsBoundariesUpdate(true) |
| 47 , m_needsTransformUpdate(true) | 47 , m_needsTransformUpdate(true) |
| 48 , m_imageResource(RenderImageResource::create()) | 48 , m_imageResource(RenderImageResource::create()) |
| 49 { | 49 { |
| 50 m_imageResource->initialize(this); | 50 m_imageResource->initialize(this); |
| 51 } | 51 } |
| 52 | 52 |
| 53 RenderSVGImage::~RenderSVGImage() | 53 RenderSVGImage::~RenderSVGImage() |
| 54 { | 54 { |
| 55 } | |
| 56 | |
| 57 void RenderSVGImage::destroy() | |
| 58 { | |
| 59 ImageQualityController::remove(this); | 55 ImageQualityController::remove(this); |
| 60 m_imageResource->shutdown(); | 56 m_imageResource->shutdown(); |
| 61 RenderSVGModelObject::destroy(); | |
| 62 } | 57 } |
| 63 | 58 |
| 64 bool RenderSVGImage::updateImageViewport() | 59 bool RenderSVGImage::updateImageViewport() |
| 65 { | 60 { |
| 66 SVGImageElement* image = toSVGImageElement(element()); | 61 SVGImageElement* image = toSVGImageElement(element()); |
| 67 FloatRect oldBoundaries = m_objectBoundingBox; | 62 FloatRect oldBoundaries = m_objectBoundingBox; |
| 68 bool updatedViewport = false; | 63 bool updatedViewport = false; |
| 69 | 64 |
| 70 SVGLengthContext lengthContext(image); | 65 SVGLengthContext lengthContext(image); |
| 71 m_objectBoundingBox = FloatRect(image->x()->currentValue()->value(lengthCont
ext), image->y()->currentValue()->value(lengthContext), image->width()->currentV
alue()->value(lengthContext), image->height()->currentValue()->value(lengthConte
xt)); | 66 m_objectBoundingBox = FloatRect(image->x()->currentValue()->value(lengthCont
ext), image->y()->currentValue()->value(lengthContext), image->width()->currentV
alue()->value(lengthContext), image->height()->currentValue()->value(lengthConte
xt)); |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 224 |
| 230 void RenderSVGImage::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint
&, const RenderLayerModelObject*) const | 225 void RenderSVGImage::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint
&, const RenderLayerModelObject*) const |
| 231 { | 226 { |
| 232 // this is called from paint() after the localTransform has already been app
lied | 227 // this is called from paint() after the localTransform has already been app
lied |
| 233 IntRect contentRect = enclosingIntRect(paintInvalidationRectInLocalCoordinat
es()); | 228 IntRect contentRect = enclosingIntRect(paintInvalidationRectInLocalCoordinat
es()); |
| 234 if (!contentRect.isEmpty()) | 229 if (!contentRect.isEmpty()) |
| 235 rects.append(contentRect); | 230 rects.append(contentRect); |
| 236 } | 231 } |
| 237 | 232 |
| 238 } // namespace blink | 233 } // namespace blink |
| OLD | NEW |