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 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 4 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 241 |
242 return element->dispatchEvent(event); | 242 return element->dispatchEvent(event); |
243 } | 243 } |
244 | 244 |
245 EventTargetData* SVGElementInstance::eventTargetData() | 245 EventTargetData* SVGElementInstance::eventTargetData() |
246 { | 246 { |
247 // Since no event listeners are added to an SVGElementInstance, we don't hav
e eventTargetData. | 247 // Since no event listeners are added to an SVGElementInstance, we don't hav
e eventTargetData. |
248 return 0; | 248 return 0; |
249 } | 249 } |
250 | 250 |
251 EventTargetData* SVGElementInstance::ensureEventTargetData() | 251 EventTargetData& SVGElementInstance::ensureEventTargetData() |
252 { | 252 { |
253 // EventTarget would use these methods if we were actually using its add/rem
oveEventListener logic. | 253 // EventTarget would use these methods if we were actually using its add/rem
oveEventListener logic. |
254 // As we're forwarding those calls to the correspondingElement(), no one sho
uld ever call this function. | 254 // As we're forwarding those calls to the correspondingElement(), no one sho
uld ever call this function. |
255 ASSERT_NOT_REACHED(); | 255 ASSERT_NOT_REACHED(); |
256 return 0; | 256 return *eventTargetData(); |
257 } | 257 } |
258 | 258 |
259 SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker(SVGElement* tar
getElement) | 259 SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker(SVGElement* tar
getElement) |
260 : m_targetElement(targetElement) | 260 : m_targetElement(targetElement) |
261 { | 261 { |
262 if (m_targetElement) | 262 if (m_targetElement) |
263 m_targetElement->setInstanceUpdatesBlocked(true); | 263 m_targetElement->setInstanceUpdatesBlocked(true); |
264 } | 264 } |
265 | 265 |
266 SVGElementInstance::InstanceUpdateBlocker::~InstanceUpdateBlocker() | 266 SVGElementInstance::InstanceUpdateBlocker::~InstanceUpdateBlocker() |
267 { | 267 { |
268 if (m_targetElement) | 268 if (m_targetElement) |
269 m_targetElement->setInstanceUpdatesBlocked(false); | 269 m_targetElement->setInstanceUpdatesBlocked(false); |
270 } | 270 } |
271 | 271 |
272 } | 272 } |
OLD | NEW |