| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2008 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2005, 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2005, 2007 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2009 Google, Inc. | 5 * Copyright (C) 2009 Google, Inc. |
| 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 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 8 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> | 8 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> |
| 9 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> | 9 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> |
| 10 * Copyright (C) 2011 University of Szeged | 10 * Copyright (C) 2011 University of Szeged |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 177 |
| 178 // Invalidate all resources of this client if our layout changed. | 178 // Invalidate all resources of this client if our layout changed. |
| 179 if (everHadLayout() && selfNeedsLayout()) | 179 if (everHadLayout() && selfNeedsLayout()) |
| 180 SVGResourcesCache::clientLayoutChanged(this); | 180 SVGResourcesCache::clientLayoutChanged(this); |
| 181 | 181 |
| 182 bool updateParentBoundaries = false; | 182 bool updateParentBoundaries = false; |
| 183 // updateShapeFromElement() also updates the object & stroke bounds - which | 183 // updateShapeFromElement() also updates the object & stroke bounds - which |
| 184 // feeds into the paint invalidation rect - so we need to call it for both | 184 // feeds into the paint invalidation rect - so we need to call it for both |
| 185 // the shape-update and the bounds-update flag, since . | 185 // the shape-update and the bounds-update flag, since . |
| 186 if (m_needsShapeUpdate || m_needsBoundariesUpdate) { | 186 if (m_needsShapeUpdate || m_needsBoundariesUpdate) { |
| 187 FloatRect oldObjectBoundingBox = objectBoundingBox(); |
| 187 updateShapeFromElement(); | 188 updateShapeFromElement(); |
| 189 if (oldObjectBoundingBox != objectBoundingBox()) |
| 190 setShouldDoFullPaintInvalidation(); |
| 188 m_needsShapeUpdate = false; | 191 m_needsShapeUpdate = false; |
| 189 | 192 |
| 190 m_paintInvalidationBoundingBox = strokeBoundingBox(); | 193 m_paintInvalidationBoundingBox = strokeBoundingBox(); |
| 191 SVGLayoutSupport::intersectPaintInvalidationRectWithResources( | 194 SVGLayoutSupport::intersectPaintInvalidationRectWithResources( |
| 192 this, m_paintInvalidationBoundingBox); | 195 this, m_paintInvalidationBoundingBox); |
| 193 m_needsBoundariesUpdate = false; | 196 m_needsBoundariesUpdate = false; |
| 194 | 197 |
| 195 updateParentBoundaries = true; | 198 updateParentBoundaries = true; |
| 196 } | 199 } |
| 197 | 200 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 return lengthContext.valueForLength(style()->svgStyle().strokeWidth()); | 332 return lengthContext.valueForLength(style()->svgStyle().strokeWidth()); |
| 330 } | 333 } |
| 331 | 334 |
| 332 LayoutSVGShapeRareData& LayoutSVGShape::ensureRareData() const { | 335 LayoutSVGShapeRareData& LayoutSVGShape::ensureRareData() const { |
| 333 if (!m_rareData) | 336 if (!m_rareData) |
| 334 m_rareData = wrapUnique(new LayoutSVGShapeRareData()); | 337 m_rareData = wrapUnique(new LayoutSVGShapeRareData()); |
| 335 return *m_rareData.get(); | 338 return *m_rareData.get(); |
| 336 } | 339 } |
| 337 | 340 |
| 338 } // namespace blink | 341 } // namespace blink |
| OLD | NEW |