OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2009 Google, Inc. | 4 * Copyright (C) 2009 Google, Inc. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 29 matching lines...) Expand all Loading... |
40 static bool hasValidPredecessor(const Node* node) | 40 static bool hasValidPredecessor(const Node* node) |
41 { | 41 { |
42 ASSERT(node); | 42 ASSERT(node); |
43 for (node = node->previousSibling(); node; node = node->previousSibling()) { | 43 for (node = node->previousSibling(); node; node = node->previousSibling()) { |
44 if (node->isSVGElement() && toSVGElement(node)->isValid()) | 44 if (node->isSVGElement() && toSVGElement(node)->isValid()) |
45 return true; | 45 return true; |
46 } | 46 } |
47 return false; | 47 return false; |
48 } | 48 } |
49 | 49 |
50 bool LayoutSVGTransformableContainer::isChildAllowed(LayoutObject* child, const
LayoutStyle& style) const | 50 bool LayoutSVGTransformableContainer::isChildAllowed(LayoutObject* child, const
ComputedStyle& style) const |
51 { | 51 { |
52 ASSERT(element()); | 52 ASSERT(element()); |
53 if (isSVGSwitchElement(*element())) { | 53 if (isSVGSwitchElement(*element())) { |
54 Node* node = child->node(); | 54 Node* node = child->node(); |
55 // Reject non-SVG/non-valid elements. | 55 // Reject non-SVG/non-valid elements. |
56 if (!node->isSVGElement() || !toSVGElement(node)->isValid()) | 56 if (!node->isSVGElement() || !toSVGElement(node)->isValid()) |
57 return false; | 57 return false; |
58 // Reject this child if it isn't the first valid node. | 58 // Reject this child if it isn't the first valid node. |
59 if (hasValidPredecessor(node)) | 59 if (hasValidPredecessor(node)) |
60 return false; | 60 return false; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 if (!m_needsTransformUpdate) | 100 if (!m_needsTransformUpdate) |
101 return false; | 101 return false; |
102 | 102 |
103 m_localTransform = element->calculateAnimatedLocalTransform(); | 103 m_localTransform = element->calculateAnimatedLocalTransform(); |
104 m_localTransform.translate(m_lastTranslation.width(), m_lastTranslation.heig
ht()); | 104 m_localTransform.translate(m_lastTranslation.width(), m_lastTranslation.heig
ht()); |
105 m_needsTransformUpdate = false; | 105 m_needsTransformUpdate = false; |
106 return true; | 106 return true; |
107 } | 107 } |
108 | 108 |
109 } | 109 } |
OLD | NEW |