| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2009 Google, Inc. | 5 * Copyright (C) 2009 Google, Inc. |
| 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 if (!firstChild()) { | 249 if (!firstChild()) { |
| 250 SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObj
ect(this); | 250 SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObj
ect(this); |
| 251 if (!resources || !resources->filter()) | 251 if (!resources || !resources->filter()) |
| 252 return; | 252 return; |
| 253 } | 253 } |
| 254 | 254 |
| 255 // Make a copy of the PaintInfo because applyTransform will modify the damag
e rect. | 255 // Make a copy of the PaintInfo because applyTransform will modify the damag
e rect. |
| 256 PaintInfo childPaintInfo(paintInfo); | 256 PaintInfo childPaintInfo(paintInfo); |
| 257 childPaintInfo.context->save(); | 257 childPaintInfo.context->save(); |
| 258 | 258 |
| 259 // Apply initial viewport clip - not affected by overflow handling | 259 // Apply initial viewport clip, the outermost svg is clipped if auto |
| 260 childPaintInfo.context->clip(pixelSnappedIntRect(overflowClipRect(paintOffse
t))); | 260 if (style()->overflowX() == OHIDDEN || style()->overflowX() == OAUTO) |
| 261 childPaintInfo.context->clip(pixelSnappedIntRect(overflowClipRect(paintO
ffset))); |
| 261 | 262 |
| 262 // Convert from container offsets (html renderers) to a relative transform (
svg renderers). | 263 // Convert from container offsets (html renderers) to a relative transform (
svg renderers). |
| 263 // Transform from our paint container's coordinate system to our local coord
s. | 264 // Transform from our paint container's coordinate system to our local coord
s. |
| 264 IntPoint adjustedPaintOffset = roundedIntPoint(paintOffset); | 265 IntPoint adjustedPaintOffset = roundedIntPoint(paintOffset); |
| 265 childPaintInfo.applyTransform(AffineTransform::translation(adjustedPaintOffs
et.x(), adjustedPaintOffset.y()) * localToBorderBoxTransform()); | 266 childPaintInfo.applyTransform(AffineTransform::translation(adjustedPaintOffs
et.x(), adjustedPaintOffset.y()) * localToBorderBoxTransform()); |
| 266 | 267 |
| 267 // SVGRenderingContext must be destroyed before we restore the childPaintInf
o.context, because a filter may have | 268 // SVGRenderingContext must be destroyed before we restore the childPaintInf
o.context, because a filter may have |
| 268 // changed the context and it is only reverted when the SVGRenderingContext
destructor finishes applying the filter. | 269 // changed the context and it is only reverted when the SVGRenderingContext
destructor finishes applying the filter. |
| 269 { | 270 { |
| 270 SVGRenderingContext renderingContext; | 271 SVGRenderingContext renderingContext; |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 | 442 |
| 442 bool RenderSVGRoot::hasRelativeLogicalHeight() const | 443 bool RenderSVGRoot::hasRelativeLogicalHeight() const |
| 443 { | 444 { |
| 444 SVGSVGElement* svg = toSVGSVGElement(node()); | 445 SVGSVGElement* svg = toSVGSVGElement(node()); |
| 445 ASSERT(svg); | 446 ASSERT(svg); |
| 446 | 447 |
| 447 return svg->intrinsicHeight(SVGSVGElement::IgnoreCSSProperties).isPercent(); | 448 return svg->intrinsicHeight(SVGSVGElement::IgnoreCSSProperties).isPercent(); |
| 448 } | 449 } |
| 449 | 450 |
| 450 } | 451 } |
| OLD | NEW |