OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> |
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@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. All rights reserved. | 5 * Copyright (C) 2009 Google, Inc. All rights reserved. |
6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // Offset by SVG root paint offset and apply clipping as needed. | 91 // Offset by SVG root paint offset and apply clipping as needed. |
92 rect.move(paintInvalidationState->paintOffset()); | 92 rect.move(paintInvalidationState->paintOffset()); |
93 if (paintInvalidationState->isClipped()) | 93 if (paintInvalidationState->isClipped()) |
94 rect.intersect(paintInvalidationState->clipRect()); | 94 rect.intersect(paintInvalidationState->clipRect()); |
95 return rect; | 95 return rect; |
96 } | 96 } |
97 | 97 |
98 LayoutRect rect; | 98 LayoutRect rect; |
99 const LayoutSVGRoot& svgRoot = mapRectToSVGRootForPaintInvalidation(object, | 99 const LayoutSVGRoot& svgRoot = mapRectToSVGRootForPaintInvalidation(object, |
100 paintInvalidationRect, rect, strokeWidthForHairlinePadding); | 100 paintInvalidationRect, rect, strokeWidthForHairlinePadding); |
101 svgRoot.mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect,
paintInvalidationState); | 101 svgRoot.mapToVisibleRectInContainerSpace(paintInvalidationContainer, rect, p
aintInvalidationState); |
102 return rect; | 102 return rect; |
103 } | 103 } |
104 | 104 |
105 const LayoutSVGRoot& SVGLayoutSupport::mapRectToSVGRootForPaintInvalidation(cons
t LayoutObject& object, | 105 const LayoutSVGRoot& SVGLayoutSupport::mapRectToSVGRootForPaintInvalidation(cons
t LayoutObject& object, |
106 const FloatRect& localPaintInvalidationRect, LayoutRect& rect, float strokeW
idthForHairlinePadding) | 106 const FloatRect& localPaintInvalidationRect, LayoutRect& rect, float strokeW
idthForHairlinePadding) |
107 { | 107 { |
108 ASSERT(object.isSVG() && !object.isSVGRoot()); | 108 ASSERT(object.isSVG() && !object.isSVGRoot()); |
109 | 109 |
110 const LayoutObject* parent; | 110 const LayoutObject* parent; |
111 AffineTransform rootBorderBoxTransform; | 111 AffineTransform rootBorderBoxTransform; |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 | 475 |
476 // FIXME: trying to compute a device space transform at record time is wrong
. All clients | 476 // FIXME: trying to compute a device space transform at record time is wrong
. All clients |
477 // should be updated to avoid relying on this information, and the method sh
ould be removed. | 477 // should be updated to avoid relying on this information, and the method sh
ould be removed. |
478 AffineTransform ctm = deprecatedCalculateTransformToLayer(layoutObject) * cu
rrentContentTransformation(); | 478 AffineTransform ctm = deprecatedCalculateTransformToLayer(layoutObject) * cu
rrentContentTransformation(); |
479 ctm.scale(layoutObject->document().frameHost()->deviceScaleFactor()); | 479 ctm.scale(layoutObject->document().frameHost()->deviceScaleFactor()); |
480 | 480 |
481 return narrowPrecisionToFloat(sqrt((pow(ctm.xScale(), 2) + pow(ctm.yScale(),
2)) / 2)); | 481 return narrowPrecisionToFloat(sqrt((pow(ctm.xScale(), 2) + pow(ctm.yScale(),
2)) / 2)); |
482 } | 482 } |
483 | 483 |
484 } | 484 } |
OLD | NEW |