| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 return; | 96 return; |
| 97 | 97 |
| 98 const HashSet<SVGElementInstance*>& set = element->instancesForElement(); | 98 const HashSet<SVGElementInstance*>& set = element->instancesForElement(); |
| 99 if (set.isEmpty()) | 99 if (set.isEmpty()) |
| 100 return; | 100 return; |
| 101 | 101 |
| 102 // Mark all use elements referencing 'element' for rebuilding | 102 // Mark all use elements referencing 'element' for rebuilding |
| 103 const HashSet<SVGElementInstance*>::const_iterator end = set.end(); | 103 const HashSet<SVGElementInstance*>::const_iterator end = set.end(); |
| 104 for (HashSet<SVGElementInstance*>::const_iterator it = set.begin(); it != en
d; ++it) { | 104 for (HashSet<SVGElementInstance*>::const_iterator it = set.begin(); it != en
d; ++it) { |
| 105 ASSERT((*it)->correspondingElement() == element); | 105 ASSERT((*it)->correspondingElement() == element); |
| 106 (*it)->correspondingUseElement()->invalidateShadowTree(); | 106 if (SVGUseElement* element = (*it)->correspondingUseElement()) |
| 107 element->invalidateShadowTree(); |
| 107 } | 108 } |
| 108 | 109 |
| 109 // Be sure to rebuild use trees, if needed | 110 // Be sure to rebuild use trees, if needed |
| 110 element->document()->updateLayoutIgnorePendingStylesheets(); | 111 element->document()->updateLayoutIgnorePendingStylesheets(); |
| 111 } | 112 } |
| 112 | 113 |
| 113 ScriptExecutionContext* SVGElementInstance::scriptExecutionContext() const | 114 ScriptExecutionContext* SVGElementInstance::scriptExecutionContext() const |
| 114 { | 115 { |
| 115 return m_element->document(); | 116 return m_element->document(); |
| 116 } | 117 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 { | 158 { |
| 158 // EventTarget would use these methods if we were actually using its add/rem
oveEventListener logic. | 159 // EventTarget would use these methods if we were actually using its add/rem
oveEventListener logic. |
| 159 // As we're forwarding those calls to the correspondingElement(), no one sho
uld ever call this function. | 160 // As we're forwarding those calls to the correspondingElement(), no one sho
uld ever call this function. |
| 160 ASSERT_NOT_REACHED(); | 161 ASSERT_NOT_REACHED(); |
| 161 return 0; | 162 return 0; |
| 162 } | 163 } |
| 163 | 164 |
| 164 } | 165 } |
| 165 | 166 |
| 166 #endif | 167 #endif |
| OLD | NEW |