OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 { | 60 { |
61 ASSERT(object); | 61 ASSERT(object); |
62 ASSERT(context); | 62 ASSERT(context); |
63 ASSERT(style()); | 63 ASSERT(style()); |
64 ASSERT_UNUSED(resourceMode, resourceMode == ApplyToDefaultMode); | 64 ASSERT_UNUSED(resourceMode, resourceMode == ApplyToDefaultMode); |
65 ASSERT_WITH_SECURITY_IMPLICATION(!needsLayout()); | 65 ASSERT_WITH_SECURITY_IMPLICATION(!needsLayout()); |
66 | 66 |
67 clearInvalidationMask(); | 67 clearInvalidationMask(); |
68 | 68 |
69 FloatRect repaintRect = object->repaintRectInLocalCoordinates(); | 69 FloatRect repaintRect = object->repaintRectInLocalCoordinates(); |
70 if (repaintRect.isEmpty() || !element()->hasChildNodes()) | 70 if (repaintRect.isEmpty() || !element()->hasChildren()) |
71 return false; | 71 return false; |
72 | 72 |
73 // Content layer start. | 73 // Content layer start. |
74 context->beginTransparencyLayer(1, &repaintRect); | 74 context->beginTransparencyLayer(1, &repaintRect); |
75 | 75 |
76 return true; | 76 return true; |
77 } | 77 } |
78 | 78 |
79 void RenderSVGResourceMasker::postApplyResource(RenderObject* object, GraphicsCo
ntext*& context, | 79 void RenderSVGResourceMasker::postApplyResource(RenderObject* object, GraphicsCo
ntext*& context, |
80 unsigned short resourceMode, const Path*, const RenderSVGShape*) | 80 unsigned short resourceMode, const Path*, const RenderSVGShape*) |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); | 185 transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); |
186 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h
eight()); | 186 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h
eight()); |
187 maskRect = transform.mapRect(maskRect); | 187 maskRect = transform.mapRect(maskRect); |
188 } | 188 } |
189 | 189 |
190 maskRect.intersect(maskBoundaries); | 190 maskRect.intersect(maskBoundaries); |
191 return maskRect; | 191 return maskRect; |
192 } | 192 } |
193 | 193 |
194 } | 194 } |
OLD | NEW |