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 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2007, 2008 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. 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 * | 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 41 matching lines...) Loading... |
52 | 52 |
53 // Allow LayoutSVGViewportContainer to update its viewport. | 53 // Allow LayoutSVGViewportContainer to update its viewport. |
54 calcViewport(); | 54 calcViewport(); |
55 | 55 |
56 // Allow LayoutSVGTransformableContainer to update its transform. | 56 // Allow LayoutSVGTransformableContainer to update its transform. |
57 bool updatedTransform = calculateLocalTransform(); | 57 bool updatedTransform = calculateLocalTransform(); |
58 | 58 |
59 // LayoutSVGViewportContainer needs to set the 'layout size changed' flag. | 59 // LayoutSVGViewportContainer needs to set the 'layout size changed' flag. |
60 determineIfLayoutSizeChanged(); | 60 determineIfLayoutSizeChanged(); |
61 | 61 |
| 62 bool transformChanged = SVGLayoutSupport::transformToRootChanged(this); |
| 63 |
62 // If any of this container's children need to be laid out, and a filter is | 64 // If any of this container's children need to be laid out, and a filter is |
63 // applied to the container, we need to issue paint invalidations for all | 65 // applied to the container, we need to issue paint invalidations for all |
64 // the descendants. | 66 // the descendants. |
65 bool forceLayoutOfChildren = selfNeedsLayout() | 67 bool forceLayoutOfChildren = selfNeedsLayout() |
66 || (normalChildNeedsLayout() && SVGLayoutSupport::hasFilterResource(*thi
s)); | 68 || (normalChildNeedsLayout() && SVGLayoutSupport::hasFilterResource(*thi
s)); |
67 SVGLayoutSupport::layoutChildren(this, forceLayoutOfChildren); | 69 SVGLayoutSupport::layoutChildren(this, forceLayoutOfChildren, transformChang
ed); |
68 | 70 |
69 // Invalidate all resources of this client if our layout changed. | 71 // Invalidate all resources of this client if our layout changed. |
70 if (everHadLayout() && needsLayout()) | 72 if (everHadLayout() && needsLayout()) |
71 SVGResourcesCache::clientLayoutChanged(this); | 73 SVGResourcesCache::clientLayoutChanged(this); |
72 | 74 |
73 if (m_needsBoundariesUpdate || updatedTransform) { | 75 if (m_needsBoundariesUpdate || updatedTransform) { |
74 updateCachedBoundaries(); | 76 updateCachedBoundaries(); |
75 m_needsBoundariesUpdate = false; | 77 m_needsBoundariesUpdate = false; |
76 | 78 |
77 // If our bounds changed, notify the parents. | 79 // If our bounds changed, notify the parents. |
(...skipping 113 matching lines...) Loading... |
191 updateHitTestResult(result, localLayoutPoint); | 193 updateHitTestResult(result, localLayoutPoint); |
192 if (result.addNodeToListBasedTestResult(element(), localLayoutPoint)
== StopHitTesting) | 194 if (result.addNodeToListBasedTestResult(element(), localLayoutPoint)
== StopHitTesting) |
193 return true; | 195 return true; |
194 } | 196 } |
195 } | 197 } |
196 // 16.4: "If there are no graphics elements whose relevant graphics content
is under the pointer (i.e., there is no target element), the event is not dispat
ched." | 198 // 16.4: "If there are no graphics elements whose relevant graphics content
is under the pointer (i.e., there is no target element), the event is not dispat
ched." |
197 return false; | 199 return false; |
198 } | 200 } |
199 | 201 |
200 } // namespace blink | 202 } // namespace blink |
OLD | NEW |