OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2007 Apple Inc. All rights reserved. |
5 * Copyright (C) 2014 Google, Inc. | 5 * Copyright (C) 2014 Google, Inc. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 currentViewSpec = m_viewSpec.get(); | 194 currentViewSpec = m_viewSpec.get(); |
195 return currentViewSpec && currentViewSpec->zoomAndPan() == SVGZoomAndPanMagn
ify; | 195 return currentViewSpec && currentViewSpec->zoomAndPan() == SVGZoomAndPanMagn
ify; |
196 } | 196 } |
197 | 197 |
198 void SVGSVGElement::parseAttribute(const QualifiedName& name, const AtomicString
& oldValue, const AtomicString& value) | 198 void SVGSVGElement::parseAttribute(const QualifiedName& name, const AtomicString
& oldValue, const AtomicString& value) |
199 { | 199 { |
200 if (!nearestViewportElement()) { | 200 if (!nearestViewportElement()) { |
201 bool setListener = true; | 201 bool setListener = true; |
202 | 202 |
203 // Only handle events if we're the outermost <svg> element | 203 // Only handle events if we're the outermost <svg> element |
204 if (name == HTMLNames::onunloadAttr) | 204 if (name == HTMLNames::onunloadAttr) { |
205 document().setWindowAttributeEventListener(EventTypeNames::unload, c
reateAttributeEventListener(document().frame(), name, value, eventParameterName(
))); | 205 document().setWindowAttributeEventListener(EventTypeNames::unload, c
reateAttributeEventListener(document().frame(), name, value, eventParameterName(
))); |
206 else if (name == HTMLNames::onresizeAttr) | 206 } else if (name == HTMLNames::onresizeAttr) { |
207 document().setWindowAttributeEventListener(EventTypeNames::resize, c
reateAttributeEventListener(document().frame(), name, value, eventParameterName(
))); | 207 document().setWindowAttributeEventListener(EventTypeNames::resize, c
reateAttributeEventListener(document().frame(), name, value, eventParameterName(
))); |
208 else if (name == HTMLNames::onscrollAttr) | 208 } else if (name == HTMLNames::onscrollAttr) { |
209 document().setWindowAttributeEventListener(EventTypeNames::scroll, c
reateAttributeEventListener(document().frame(), name, value, eventParameterName(
))); | 209 document().setWindowAttributeEventListener(EventTypeNames::scroll, c
reateAttributeEventListener(document().frame(), name, value, eventParameterName(
))); |
210 else if (name == SVGNames::onzoomAttr) | 210 } else if (name == SVGNames::onzoomAttr) { |
| 211 UseCounter::countDeprecation(document(), UseCounter::DeprecateSVGZoo
mEvent); |
211 document().setWindowAttributeEventListener(EventTypeNames::zoom, cre
ateAttributeEventListener(document().frame(), name, value, eventParameterName())
); | 212 document().setWindowAttributeEventListener(EventTypeNames::zoom, cre
ateAttributeEventListener(document().frame(), name, value, eventParameterName())
); |
212 else | 213 } else { |
213 setListener = false; | 214 setListener = false; |
| 215 } |
214 | 216 |
215 if (setListener) | 217 if (setListener) |
216 return; | 218 return; |
217 } | 219 } |
218 | 220 |
219 if (name == HTMLNames::onabortAttr) { | 221 if (name == HTMLNames::onabortAttr) { |
220 document().setWindowAttributeEventListener(EventTypeNames::abort, create
AttributeEventListener(document().frame(), name, value, eventParameterName())); | 222 document().setWindowAttributeEventListener(EventTypeNames::abort, create
AttributeEventListener(document().frame(), name, value, eventParameterName())); |
221 } else if (name == HTMLNames::onerrorAttr) { | 223 } else if (name == HTMLNames::onerrorAttr) { |
222 document().setWindowAttributeEventListener(EventTypeNames::error, create
AttributeEventListener(document().frame(), name, value, eventParameterName())); | 224 document().setWindowAttributeEventListener(EventTypeNames::error, create
AttributeEventListener(document().frame(), name, value, eventParameterName())); |
223 } else if (SVGZoomAndPan::parseAttribute(name, value)) { | 225 } else if (SVGZoomAndPan::parseAttribute(name, value)) { |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 visitor->trace(m_width); | 761 visitor->trace(m_width); |
760 visitor->trace(m_height); | 762 visitor->trace(m_height); |
761 visitor->trace(m_translation); | 763 visitor->trace(m_translation); |
762 visitor->trace(m_timeContainer); | 764 visitor->trace(m_timeContainer); |
763 visitor->trace(m_viewSpec); | 765 visitor->trace(m_viewSpec); |
764 SVGGraphicsElement::trace(visitor); | 766 SVGGraphicsElement::trace(visitor); |
765 SVGFitToViewBox::trace(visitor); | 767 SVGFitToViewBox::trace(visitor); |
766 } | 768 } |
767 | 769 |
768 } // namespace blink | 770 } // namespace blink |
OLD | NEW |