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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 return LayoutRect(enclosingIntRect(rect)); | 52 return LayoutRect(enclosingIntRect(rect)); |
53 } | 53 } |
54 | 54 |
55 LayoutRect SVGLayoutSupport::clippedOverflowRectForPaintInvalidation(const Layou
tObject& object, const LayoutBoxModelObject* paintInvalidationContainer, const P
aintInvalidationState* paintInvalidationState) | 55 LayoutRect SVGLayoutSupport::clippedOverflowRectForPaintInvalidation(const Layou
tObject& object, const LayoutBoxModelObject* paintInvalidationContainer, const P
aintInvalidationState* paintInvalidationState) |
56 { | 56 { |
57 // Return early for any cases where we don't actually paint | 57 // Return early for any cases where we don't actually paint |
58 if (object.styleRef().visibility() != VISIBLE && !object.enclosingLayer()->h
asVisibleContent()) | 58 if (object.styleRef().visibility() != VISIBLE && !object.enclosingLayer()->h
asVisibleContent()) |
59 return LayoutRect(); | 59 return LayoutRect(); |
60 | 60 |
61 FloatRect paintInvalidationRect = object.paintInvalidationRectInLocalCoordin
ates(); | 61 FloatRect paintInvalidationRect = object.paintInvalidationRectInLocalCoordin
ates(); |
62 if (int outlineOutset = object.styleRef().outlineOutset()) | 62 if (int outlineOutset = object.styleRef().outlineOutsetExtent()) |
63 paintInvalidationRect.inflate(outlineOutset); | 63 paintInvalidationRect.inflate(outlineOutset); |
64 | 64 |
65 if (paintInvalidationState && paintInvalidationState->canMapToContainer(pain
tInvalidationContainer)) { | 65 if (paintInvalidationState && paintInvalidationState->canMapToContainer(pain
tInvalidationContainer)) { |
66 // Compute accumulated SVG transform and apply to local paint rect. | 66 // Compute accumulated SVG transform and apply to local paint rect. |
67 AffineTransform transform = paintInvalidationState->svgTransform() * obj
ect.localToParentTransform(); | 67 AffineTransform transform = paintInvalidationState->svgTransform() * obj
ect.localToParentTransform(); |
68 // FIXME: These are quirks carried forward from the old paint invalidati
on infrastructure. | 68 // FIXME: These are quirks carried forward from the old paint invalidati
on infrastructure. |
69 LayoutRect rect = enclosingIntRectIfNotEmpty(transform.mapRect(paintInva
lidationRect)); | 69 LayoutRect rect = enclosingIntRectIfNotEmpty(transform.mapRect(paintInva
lidationRect)); |
70 // Offset by SVG root paint offset and apply clipping as needed. | 70 // Offset by SVG root paint offset and apply clipping as needed. |
71 rect.move(paintInvalidationState->paintOffset()); | 71 rect.move(paintInvalidationState->paintOffset()); |
72 if (paintInvalidationState->isClipped()) | 72 if (paintInvalidationState->isClipped()) |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 | 456 |
457 // FIXME: trying to compute a device space transform at record time is wrong
. All clients | 457 // FIXME: trying to compute a device space transform at record time is wrong
. All clients |
458 // should be updated to avoid relying on this information, and the method sh
ould be removed. | 458 // should be updated to avoid relying on this information, and the method sh
ould be removed. |
459 AffineTransform ctm = deprecatedCalculateTransformToLayer(layoutObject) * cu
rrentContentTransformation(); | 459 AffineTransform ctm = deprecatedCalculateTransformToLayer(layoutObject) * cu
rrentContentTransformation(); |
460 ctm.scale(layoutObject->document().frameHost()->deviceScaleFactor()); | 460 ctm.scale(layoutObject->document().frameHost()->deviceScaleFactor()); |
461 | 461 |
462 return narrowPrecisionToFloat(sqrt((pow(ctm.xScale(), 2) + pow(ctm.yScale(),
2)) / 2)); | 462 return narrowPrecisionToFloat(sqrt((pow(ctm.xScale(), 2) + pow(ctm.yScale(),
2)) / 2)); |
463 } | 463 } |
464 | 464 |
465 } | 465 } |
OLD | NEW |