| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
| 5 * Copyright (C) 2011 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2011 Dirk Schulze <krit@webkit.org> |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 // clipPath can also be clipped by another clipPath. | 178 // clipPath can also be clipped by another clipPath. |
| 179 SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObj
ect(this); | 179 SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObj
ect(this); |
| 180 RenderSVGResourceClipper* clipPathClipper = resources ? resources->clipp
er() : 0; | 180 RenderSVGResourceClipper* clipPathClipper = resources ? resources->clipp
er() : 0; |
| 181 ClipperState clipPathClipperState = ClipperNotApplied; | 181 ClipperState clipPathClipperState = ClipperNotApplied; |
| 182 if (clipPathClipper && !clipPathClipper->applyClippingToContext(this, ta
rgetBoundingBox, paintInvalidationRect, context, clipPathClipperState)) { | 182 if (clipPathClipper && !clipPathClipper->applyClippingToContext(this, ta
rgetBoundingBox, paintInvalidationRect, context, clipPathClipperState)) { |
| 183 // FIXME: Awkward state micro-management. Ideally, GraphicsContextSt
ateSaver should | 183 // FIXME: Awkward state micro-management. Ideally, GraphicsContextSt
ateSaver should |
| 184 // a) pop saveLayers also | 184 // a) pop saveLayers also |
| 185 // b) pop multiple states if needed (similarly to SkCanvas::restor
eToCount()) | 185 // b) pop multiple states if needed (similarly to SkCanvas::restor
eToCount()) |
| 186 // Then we should be able to replace this mess with a single, top-le
vel GCSS. | 186 // Then we should be able to replace this mess with a single, top-le
vel GCSS. |
| 187 maskContentSaver.restore(); | 187 maskContentSaver.restore(); |
| 188 context->restoreLayer(); | 188 context->endLayer(); |
| 189 return false; | 189 return false; |
| 190 } | 190 } |
| 191 | 191 |
| 192 drawClipMaskContent(context, targetBoundingBox); | 192 drawClipMaskContent(context, targetBoundingBox); |
| 193 | 193 |
| 194 if (clipPathClipper) | 194 if (clipPathClipper) |
| 195 clipPathClipper->postApplyStatefulResource(this, context, clipPathCl
ipperState); | 195 clipPathClipper->postApplyStatefulResource(this, context, clipPathCl
ipperState); |
| 196 } | 196 } |
| 197 | 197 |
| 198 // Masked content layer start. | 198 // Masked content layer start. |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 AffineTransform transform; | 358 AffineTransform transform; |
| 359 transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); | 359 transform.translate(objectBoundingBox.x(), objectBoundingBox.y()); |
| 360 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h
eight()); | 360 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.h
eight()); |
| 361 return transform.mapRect(m_clipBoundaries); | 361 return transform.mapRect(m_clipBoundaries); |
| 362 } | 362 } |
| 363 | 363 |
| 364 return m_clipBoundaries; | 364 return m_clipBoundaries; |
| 365 } | 365 } |
| 366 | 366 |
| 367 } | 367 } |
| OLD | NEW |