| 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 Rob Buis <buis@kde.org> | 5 Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> |
| 6 | 6 |
| 7 This file is part of the WebKit project | 7 This file is part of the WebKit project |
| 8 | 8 |
| 9 This library is free software; you can redistribute it and/or | 9 This library is free software; you can redistribute it and/or |
| 10 modify it under the terms of the GNU Library General Public | 10 modify it under the terms of the GNU Library General Public |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 void RenderSVGImage::imageChanged(WrappedImagePtr image) | 230 void RenderSVGImage::imageChanged(WrappedImagePtr image) |
| 231 { | 231 { |
| 232 RenderImage::imageChanged(image); | 232 RenderImage::imageChanged(image); |
| 233 | 233 |
| 234 // We override to invalidate a larger rect, since SVG images can draw outsid
e their "bounds" | 234 // We override to invalidate a larger rect, since SVG images can draw outsid
e their "bounds" |
| 235 repaintRectangle(absoluteClippedOverflowRect()); | 235 repaintRectangle(absoluteClippedOverflowRect()); |
| 236 } | 236 } |
| 237 | 237 |
| 238 void RenderSVGImage::calculateAbsoluteBounds() | 238 void RenderSVGImage::calculateAbsoluteBounds() |
| 239 { | 239 { |
| 240 // FIXME: broken with CSS transforms |
| 240 FloatRect absoluteRect = absoluteTransform().mapRect(relativeBBox(true)); | 241 FloatRect absoluteRect = absoluteTransform().mapRect(relativeBBox(true)); |
| 241 | 242 |
| 242 #if ENABLE(SVG_FILTERS) | 243 #if ENABLE(SVG_FILTERS) |
| 243 // Filters can expand the bounding box | 244 // Filters can expand the bounding box |
| 244 SVGResourceFilter* filter = getFilterById(document(), style()->svgStyle()->f
ilter()); | 245 SVGResourceFilter* filter = getFilterById(document(), style()->svgStyle()->f
ilter()); |
| 245 if (filter) | 246 if (filter) |
| 246 absoluteRect.unite(filter->filterBBoxForItemBBox(absoluteRect)); | 247 absoluteRect.unite(filter->filterBBoxForItemBBox(absoluteRect)); |
| 247 #endif | 248 #endif |
| 248 | 249 |
| 249 if (!absoluteRect.isEmpty()) | 250 if (!absoluteRect.isEmpty()) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 262 // this is called from paint() after the localTransform has already been app
lied | 263 // this is called from paint() after the localTransform has already been app
lied |
| 263 IntRect contentRect = enclosingIntRect(relativeBBox()); | 264 IntRect contentRect = enclosingIntRect(relativeBBox()); |
| 264 graphicsContext->addFocusRingRect(contentRect); | 265 graphicsContext->addFocusRingRect(contentRect); |
| 265 } | 266 } |
| 266 | 267 |
| 267 void RenderSVGImage::absoluteRects(Vector<IntRect>& rects, int, int, bool) | 268 void RenderSVGImage::absoluteRects(Vector<IntRect>& rects, int, int, bool) |
| 268 { | 269 { |
| 269 rects.append(absoluteClippedOverflowRect()); | 270 rects.append(absoluteClippedOverflowRect()); |
| 270 } | 271 } |
| 271 | 272 |
| 273 void RenderSVGImage::absoluteQuads(Vector<FloatQuad>& quads, bool topLevel) |
| 274 { |
| 275 quads.append(FloatRect(absoluteClippedOverflowRect())); |
| 276 } |
| 277 |
| 272 } | 278 } |
| 273 | 279 |
| 274 #endif // ENABLE(SVG) | 280 #endif // ENABLE(SVG) |
| OLD | NEW |