| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 m_object = object; | 92 m_object = object; |
| 93 m_paintInfo = &paintInfo; | 93 m_paintInfo = &paintInfo; |
| 94 m_filter = 0; | 94 m_filter = 0; |
| 95 | 95 |
| 96 RenderStyle* style = m_object->style(); | 96 RenderStyle* style = m_object->style(); |
| 97 ASSERT(style); | 97 ASSERT(style); |
| 98 | 98 |
| 99 const SVGRenderStyle& svgStyle = style->svgStyle(); | 99 const SVGRenderStyle& svgStyle = style->svgStyle(); |
| 100 | 100 |
| 101 // Setup transparency layers before setting up SVG resources! | 101 // Setup transparency layers before setting up SVG resources! |
| 102 bool isRenderingMask = SVGRenderSupport::isRenderingMaskImage(*m_object); | 102 bool isRenderingMask = SVGRenderSupport::isRenderingClipPathAsMaskImage(*m_o
bject); |
| 103 // RenderLayer takes care of root opacity. | 103 // RenderLayer takes care of root opacity. |
| 104 float opacity = (object->isSVGRoot() || isRenderingMask) ? 1 : style->opacit
y(); | 104 float opacity = (object->isSVGRoot() || isRenderingMask) ? 1 : style->opacit
y(); |
| 105 bool hasBlendMode = style->hasBlendMode() && !isRenderingMask; | 105 bool hasBlendMode = style->hasBlendMode() && !isRenderingMask; |
| 106 | 106 |
| 107 if (opacity < 1 || hasBlendMode || style->hasIsolation()) { | 107 if (opacity < 1 || hasBlendMode || style->hasIsolation()) { |
| 108 FloatRect paintInvalidationRect = m_object->paintInvalidationRectInLocal
Coordinates(); | 108 FloatRect paintInvalidationRect = m_object->paintInvalidationRectInLocal
Coordinates(); |
| 109 m_paintInfo->context->clip(paintInvalidationRect); | 109 m_paintInfo->context->clip(paintInvalidationRect); |
| 110 | 110 |
| 111 if (hasBlendMode) { | 111 if (hasBlendMode) { |
| 112 if (!(m_renderingFlags & RestoreGraphicsContext)) { | 112 if (!(m_renderingFlags & RestoreGraphicsContext)) { |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 SVGImagePainter::paintForeground(toRenderSVGImage(*m_object), buffer
edInfo); | 289 SVGImagePainter::paintForeground(toRenderSVGImage(*m_object), buffer
edInfo); |
| 290 } else | 290 } else |
| 291 return false; | 291 return false; |
| 292 } | 292 } |
| 293 | 293 |
| 294 m_paintInfo->context->drawImageBuffer(imageBuffer.get(), boundingBox); | 294 m_paintInfo->context->drawImageBuffer(imageBuffer.get(), boundingBox); |
| 295 return true; | 295 return true; |
| 296 } | 296 } |
| 297 | 297 |
| 298 } // namespace blink | 298 } // namespace blink |
| OLD | NEW |