| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 LayoutRect SVGRenderSupport::clippedOverflowRectForPaintInvalidation(const Rende
rObject* object, const RenderLayerModelObject* paintInvalidationContainer, const
PaintInvalidationState* paintInvalidationState) | 48 LayoutRect SVGRenderSupport::clippedOverflowRectForPaintInvalidation(const Rende
rObject* object, const RenderLayerModelObject* paintInvalidationContainer, const
PaintInvalidationState* paintInvalidationState) |
| 49 { | 49 { |
| 50 // Return early for any cases where we don't actually paint | 50 // Return early for any cases where we don't actually paint |
| 51 if (object->style()->visibility() != VISIBLE && !object->enclosingLayer()->h
asVisibleContent()) | 51 if (object->style()->visibility() != VISIBLE && !object->enclosingLayer()->h
asVisibleContent()) |
| 52 return LayoutRect(); | 52 return LayoutRect(); |
| 53 | 53 |
| 54 // Pass our local paint rect to computeRectForPaintInvalidation() which will | 54 // Pass our local paint rect to computeRectForPaintInvalidation() which will |
| 55 // map to parent coords and recurse up the parent chain. | 55 // map to parent coords and recurse up the parent chain. |
| 56 FloatRect paintInvalidationRect = object->paintInvalidationRectInLocalCoordi
nates(); | 56 FloatRect paintInvalidationRect = object->paintInvalidationRectInLocalCoordi
nates(); |
| 57 paintInvalidationRect.inflate(object->style()->outlineWidth()); |
| 58 |
| 57 object->computeFloatRectForPaintInvalidation(paintInvalidationContainer, pai
ntInvalidationRect, paintInvalidationState); | 59 object->computeFloatRectForPaintInvalidation(paintInvalidationContainer, pai
ntInvalidationRect, paintInvalidationState); |
| 58 return enclosingLayoutRect(paintInvalidationRect); | 60 return enclosingLayoutRect(paintInvalidationRect); |
| 59 } | 61 } |
| 60 | 62 |
| 61 void SVGRenderSupport::computeFloatRectForPaintInvalidation(const RenderObject*
object, const RenderLayerModelObject* paintInvalidationContainer, FloatRect& pai
ntInvalidationRect, const PaintInvalidationState* paintInvalidationState) | 63 void SVGRenderSupport::computeFloatRectForPaintInvalidation(const RenderObject*
object, const RenderLayerModelObject* paintInvalidationContainer, FloatRect& pai
ntInvalidationRect, const PaintInvalidationState* paintInvalidationState) |
| 62 { | 64 { |
| 63 paintInvalidationRect.inflate(object->style()->outlineWidth()); | |
| 64 | |
| 65 // Translate to coords in our parent renderer, and then call computeFloatRec
tForPaintInvalidation() on our parent. | 65 // Translate to coords in our parent renderer, and then call computeFloatRec
tForPaintInvalidation() on our parent. |
| 66 paintInvalidationRect = object->localToParentTransform().mapRect(paintInvali
dationRect); | 66 paintInvalidationRect = object->localToParentTransform().mapRect(paintInvali
dationRect); |
| 67 object->parent()->computeFloatRectForPaintInvalidation(paintInvalidationCont
ainer, paintInvalidationRect, paintInvalidationState); | 67 object->parent()->computeFloatRectForPaintInvalidation(paintInvalidationCont
ainer, paintInvalidationRect, paintInvalidationState); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void SVGRenderSupport::mapLocalToContainer(const RenderObject* object, const Ren
derLayerModelObject* paintInvalidationContainer, TransformState& transformState,
bool* wasFixed, const PaintInvalidationState* paintInvalidationState) | 70 void SVGRenderSupport::mapLocalToContainer(const RenderObject* object, const Ren
derLayerModelObject* paintInvalidationContainer, TransformState& transformState,
bool* wasFixed, const PaintInvalidationState* paintInvalidationState) |
| 71 { | 71 { |
| 72 transformState.applyTransform(object->localToParentTransform()); | 72 transformState.applyTransform(object->localToParentTransform()); |
| 73 | 73 |
| 74 RenderObject* parent = object->parent(); | 74 RenderObject* parent = object->parent(); |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 } | 376 } |
| 377 | 377 |
| 378 bool SVGRenderSupport::isRenderableTextNode(const RenderObject* object) | 378 bool SVGRenderSupport::isRenderableTextNode(const RenderObject* object) |
| 379 { | 379 { |
| 380 ASSERT(object->isText()); | 380 ASSERT(object->isText()); |
| 381 // <br> is marked as text, but is not handled by the SVG rendering code-path
. | 381 // <br> is marked as text, but is not handled by the SVG rendering code-path
. |
| 382 return object->isSVGInlineText() && !toRenderSVGInlineText(object)->hasEmpty
Text(); | 382 return object->isSVGInlineText() && !toRenderSVGInlineText(object)->hasEmpty
Text(); |
| 383 } | 383 } |
| 384 | 384 |
| 385 } | 385 } |
| OLD | NEW |