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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // When hasRelativeLengths() is false, no descendants have relative lengths | 64 // When hasRelativeLengths() is false, no descendants have relative lengths |
65 // (hence no one is interested in viewport size changes). | 65 // (hence no one is interested in viewport size changes). |
66 bool layoutSizeChanged = element()->hasRelativeLengths() | 66 bool layoutSizeChanged = element()->hasRelativeLengths() |
67 && SVGLayoutSupport::layoutSizeOfNearestViewportChanged(this); | 67 && SVGLayoutSupport::layoutSizeOfNearestViewportChanged(this); |
68 | 68 |
69 // If any of this container's children need to be laid out, and a filter is | 69 // If any of this container's children need to be laid out, and a filter is |
70 // applied to the container, we need to issue paint invalidations for all | 70 // applied to the container, we need to issue paint invalidations for all |
71 // the descendants. | 71 // the descendants. |
72 bool forceLayoutOfChildren = selfNeedsLayout() | 72 bool forceLayoutOfChildren = selfNeedsLayout() |
73 || (normalChildNeedsLayout() && SVGLayoutSupport::hasFilterResource(*thi
s)); | 73 || (normalChildNeedsLayout() && SVGLayoutSupport::hasFilterResource(*thi
s)); |
74 SVGLayoutSupport::layoutChildren(this, forceLayoutOfChildren, transformChang
ed, layoutSizeChanged); | 74 SVGLayoutSupport::layoutChildren(firstChild(), forceLayoutOfChildren, transf
ormChanged, layoutSizeChanged); |
75 | 75 |
76 // Invalidate all resources of this client if our layout changed. | 76 // Invalidate all resources of this client if our layout changed. |
77 if (everHadLayout() && needsLayout()) | 77 if (everHadLayout() && needsLayout()) |
78 SVGResourcesCache::clientLayoutChanged(this); | 78 SVGResourcesCache::clientLayoutChanged(this); |
79 | 79 |
80 if (m_needsBoundariesUpdate || updatedTransform) { | 80 if (m_needsBoundariesUpdate || updatedTransform) { |
81 updateCachedBoundaries(); | 81 updateCachedBoundaries(); |
82 m_needsBoundariesUpdate = false; | 82 m_needsBoundariesUpdate = false; |
83 | 83 |
84 // If our bounds changed, notify the parents. | 84 // If our bounds changed, notify the parents. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 updateHitTestResult(result, localLayoutPoint); | 198 updateHitTestResult(result, localLayoutPoint); |
199 if (result.addNodeToListBasedTestResult(element(), localLayoutPoint)
== StopHitTesting) | 199 if (result.addNodeToListBasedTestResult(element(), localLayoutPoint)
== StopHitTesting) |
200 return true; | 200 return true; |
201 } | 201 } |
202 } | 202 } |
203 // 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." | 203 // 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." |
204 return false; | 204 return false; |
205 } | 205 } |
206 | 206 |
207 } // namespace blink | 207 } // namespace blink |
OLD | NEW |