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, 2007, 2008, 2009 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@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. | 5 * Copyright (C) 2009 Google, Inc. |
6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 SVGLayoutSupport::layoutResourcesIfNeeded(this); | 149 SVGLayoutSupport::layoutResourcesIfNeeded(this); |
150 | 150 |
151 SVGSVGElement* svg = toSVGSVGElement(node()); | 151 SVGSVGElement* svg = toSVGSVGElement(node()); |
152 ASSERT(svg); | 152 ASSERT(svg); |
153 // When hasRelativeLengths() is false, no descendants have relative lengths | 153 // When hasRelativeLengths() is false, no descendants have relative lengths |
154 // (hence no one is interested in viewport size changes). | 154 // (hence no one is interested in viewport size changes). |
155 m_isLayoutSizeChanged = | 155 m_isLayoutSizeChanged = |
156 svg->hasRelativeLengths() && (selfNeedsLayout() || oldSize != size()); | 156 svg->hasRelativeLengths() && (selfNeedsLayout() || oldSize != size()); |
157 | 157 |
| 158 // The scale of one or more of the SVG elements may have changed, so mark |
| 159 // the entire subtree as needing paint invalidation checking. |
| 160 if (m_isLayoutSizeChanged) |
| 161 setMayNeedPaintInvalidationSubtree(); |
| 162 |
158 SVGLayoutSupport::layoutChildren( | 163 SVGLayoutSupport::layoutChildren( |
159 firstChild(), false, m_didScreenScaleFactorChange, m_isLayoutSizeChanged); | 164 firstChild(), false, m_didScreenScaleFactorChange, m_isLayoutSizeChanged); |
160 | 165 |
161 if (m_needsBoundariesOrTransformUpdate) { | 166 if (m_needsBoundariesOrTransformUpdate) { |
162 updateCachedBoundaries(); | 167 updateCachedBoundaries(); |
163 m_needsBoundariesOrTransformUpdate = false; | 168 m_needsBoundariesOrTransformUpdate = false; |
164 } | 169 } |
165 | 170 |
166 m_overflow.reset(); | 171 m_overflow.reset(); |
167 addVisualEffectOverflow(); | 172 addVisualEffectOverflow(); |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 if (result.addNodeToListBasedTestResult(node(), locationInContainer, | 457 if (result.addNodeToListBasedTestResult(node(), locationInContainer, |
453 boundsRect) == StopHitTesting) | 458 boundsRect) == StopHitTesting) |
454 return true; | 459 return true; |
455 } | 460 } |
456 } | 461 } |
457 | 462 |
458 return false; | 463 return false; |
459 } | 464 } |
460 | 465 |
461 } // namespace blink | 466 } // namespace blink |
OLD | NEW |