diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/rendering/RenderSVGImage.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/rendering/RenderSVGImage.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderSVGImage.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderSVGImage.cpp index b38352ec72..f4947092e4 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderSVGImage.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderSVGImage.cpp @@ -2,7 +2,7 @@ Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> Copyright (C) 2006 Apple Computer, Inc. Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> - Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> + Copyright (C) 2007, 2008, 2009 Rob Buis <buis@kde.org> Copyright (C) 2009, Google, Inc. This library is free software; you can redistribute it and/or @@ -59,7 +59,7 @@ void RenderSVGImage::adjustRectsForAspectRatio(FloatRect& destRect, FloatRect& s float widthToHeightMultiplier = srcRect.height() / srcRect.width(); if (origDestHeight > (origDestWidth * widthToHeightMultiplier)) { destRect.setHeight(origDestWidth * widthToHeightMultiplier); - switch(aspectRatio->align()) { + switch (aspectRatio->align()) { case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMINYMID: case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID: case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMID: @@ -74,7 +74,7 @@ void RenderSVGImage::adjustRectsForAspectRatio(FloatRect& destRect, FloatRect& s } if (origDestWidth > (origDestHeight / widthToHeightMultiplier)) { destRect.setWidth(origDestHeight / widthToHeightMultiplier); - switch(aspectRatio->align()) { + switch (aspectRatio->align()) { case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMIN: case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID: case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMAX: @@ -93,7 +93,7 @@ void RenderSVGImage::adjustRectsForAspectRatio(FloatRect& destRect, FloatRect& s if (origDestHeight < (origDestWidth * widthToHeightMultiplier)) { float destToSrcMultiplier = srcRect.width() / destRect.width(); srcRect.setHeight(destRect.height() * destToSrcMultiplier); - switch(aspectRatio->align()) { + switch (aspectRatio->align()) { case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMINYMID: case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID: case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMAXYMID: @@ -110,7 +110,7 @@ void RenderSVGImage::adjustRectsForAspectRatio(FloatRect& destRect, FloatRect& s if (origDestWidth < (origDestHeight / widthToHeightMultiplier)) { float destToSrcMultiplier = srcRect.height() / destRect.height(); srcRect.setWidth(destRect.width() * destToSrcMultiplier); - switch(aspectRatio->align()) { + switch (aspectRatio->align()) { case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMIN: case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMID: case SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_XMIDYMAX: @@ -227,9 +227,7 @@ FloatRect RenderSVGImage::repaintRectInLocalCoordinates() const void RenderSVGImage::imageChanged(WrappedImagePtr image, const IntRect* rect) { RenderImage::imageChanged(image, rect); - - // We override to invalidate a larger rect, since SVG images can draw outside their "bounds" - repaintRectangle(absoluteClippedOverflowRect()); // FIXME: Isn't this just repaint()? + repaint(); } IntRect RenderSVGImage::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) |