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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 buildLocalToBorderBoxTransform(); | 146 buildLocalToBorderBoxTransform(); |
147 // TODO(fs): Temporarily, needing a layout implies that the local transform | 147 // TODO(fs): Temporarily, needing a layout implies that the local transform |
148 // has changed. This should be updated to be more precise and factor in the | 148 // has changed. This should be updated to be more precise and factor in the |
149 // actual (relevant) changes to the computed user-space transform. | 149 // actual (relevant) changes to the computed user-space transform. |
150 m_didScreenScaleFactorChange = selfNeedsLayout(); | 150 m_didScreenScaleFactorChange = selfNeedsLayout(); |
151 | 151 |
152 SVGLayoutSupport::layoutResourcesIfNeeded(this); | 152 SVGLayoutSupport::layoutResourcesIfNeeded(this); |
153 | 153 |
154 SVGSVGElement* svg = toSVGSVGElement(node()); | 154 SVGSVGElement* svg = toSVGSVGElement(node()); |
155 ASSERT(svg); | 155 ASSERT(svg); |
| 156 m_isLayoutSizeChanged = selfNeedsLayout() || (svg->hasRelativeLengths() && o
ldSize != size()); |
156 // When hasRelativeLengths() is false, no descendants have relative lengths | 157 // When hasRelativeLengths() is false, no descendants have relative lengths |
157 // (hence no one is interested in viewport size changes). | 158 // (hence no one is interested in viewport size changes). |
158 m_isLayoutSizeChanged = svg->hasRelativeLengths() && (selfNeedsLayout() || o
ldSize != size()); | 159 bool layoutSizeChanged = m_isLayoutSizeChanged && svg->hasRelativeLengths(); |
159 | 160 |
160 SVGLayoutSupport::layoutChildren(firstChild(), false, m_didScreenScaleFactor
Change, m_isLayoutSizeChanged); | 161 SVGLayoutSupport::layoutChildren(firstChild(), false, m_didScreenScaleFactor
Change, layoutSizeChanged); |
161 | 162 |
162 if (m_needsBoundariesOrTransformUpdate) { | 163 if (m_needsBoundariesOrTransformUpdate) { |
163 updateCachedBoundaries(); | 164 updateCachedBoundaries(); |
164 m_needsBoundariesOrTransformUpdate = false; | 165 m_needsBoundariesOrTransformUpdate = false; |
165 } | 166 } |
166 | 167 |
167 m_overflow.reset(); | 168 m_overflow.reset(); |
168 addVisualEffectOverflow(); | 169 addVisualEffectOverflow(); |
169 | 170 |
170 if (!shouldApplyViewportClip()) { | 171 if (!shouldApplyViewportClip()) { |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 updateHitTestResult(result, pointInBorderBox); | 419 updateHitTestResult(result, pointInBorderBox); |
419 if (result.addNodeToListBasedTestResult(node(), locationInContainer,
boundsRect) == StopHitTesting) | 420 if (result.addNodeToListBasedTestResult(node(), locationInContainer,
boundsRect) == StopHitTesting) |
420 return true; | 421 return true; |
421 } | 422 } |
422 } | 423 } |
423 | 424 |
424 return false; | 425 return false; |
425 } | 426 } |
426 | 427 |
427 } // namespace blink | 428 } // namespace blink |
OLD | NEW |