| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 SVGLayoutSupport::layoutResourcesIfNeeded(this); | 154 SVGLayoutSupport::layoutResourcesIfNeeded(this); |
| 155 | 155 |
| 156 // selfNeedsLayout() will cover changes to one (or more) of viewBox, | 156 // selfNeedsLayout() will cover changes to one (or more) of viewBox, |
| 157 // current{Scale,Translate} and decorations. | 157 // current{Scale,Translate} and decorations. |
| 158 const bool viewportMayHaveChanged = selfNeedsLayout() || oldSize != size(); | 158 const bool viewportMayHaveChanged = selfNeedsLayout() || oldSize != size(); |
| 159 | 159 |
| 160 // The scale of one or more of the SVG elements may have changed, or new | 160 // The scale of one or more of the SVG elements may have changed, or new |
| 161 // content may have been exposed, so mark the entire subtree as needing paint | 161 // content may have been exposed, so mark the entire subtree as needing paint |
| 162 // invalidation checking. (It is only somewhat by coincidence that this | 162 // invalidation checking. (It is only somewhat by coincidence that this |
| 163 // condition happens to be the same as the one for viewport changes.) | 163 // condition happens to be the same as the one for viewport changes.) |
| 164 if (viewportMayHaveChanged) | 164 if (viewportMayHaveChanged) { |
| 165 setMayNeedPaintInvalidationSubtree(); | 165 setMayNeedPaintInvalidationSubtree(); |
| 166 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) |
| 167 setNeedsPaintPropertyUpdate(); |
| 168 } |
| 166 | 169 |
| 167 SVGSVGElement* svg = toSVGSVGElement(node()); | 170 SVGSVGElement* svg = toSVGSVGElement(node()); |
| 168 ASSERT(svg); | 171 ASSERT(svg); |
| 169 // When hasRelativeLengths() is false, no descendants have relative lengths | 172 // When hasRelativeLengths() is false, no descendants have relative lengths |
| 170 // (hence no one is interested in viewport size changes). | 173 // (hence no one is interested in viewport size changes). |
| 171 m_isLayoutSizeChanged = viewportMayHaveChanged && svg->hasRelativeLengths(); | 174 m_isLayoutSizeChanged = viewportMayHaveChanged && svg->hasRelativeLengths(); |
| 172 | 175 |
| 173 SVGLayoutSupport::layoutChildren( | 176 SVGLayoutSupport::layoutChildren( |
| 174 firstChild(), false, m_didScreenScaleFactorChange, m_isLayoutSizeChanged); | 177 firstChild(), false, m_didScreenScaleFactorChange, m_isLayoutSizeChanged); |
| 175 | 178 |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 if (result.addNodeToListBasedTestResult(node(), locationInContainer, | 468 if (result.addNodeToListBasedTestResult(node(), locationInContainer, |
| 466 boundsRect) == StopHitTesting) | 469 boundsRect) == StopHitTesting) |
| 467 return true; | 470 return true; |
| 468 } | 471 } |
| 469 } | 472 } |
| 470 | 473 |
| 471 return false; | 474 return false; |
| 472 } | 475 } |
| 473 | 476 |
| 474 } // namespace blink | 477 } // namespace blink |
| OLD | NEW |