| 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 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 #include "bindings/core/v8/ScriptEventListener.h" | 25 #include "bindings/core/v8/ScriptEventListener.h" |
| 26 #include "core/HTMLNames.h" | 26 #include "core/HTMLNames.h" |
| 27 #include "core/SVGNames.h" | 27 #include "core/SVGNames.h" |
| 28 #include "core/css/CSSHelper.h" | 28 #include "core/css/CSSHelper.h" |
| 29 #include "core/dom/Document.h" | 29 #include "core/dom/Document.h" |
| 30 #include "core/dom/ElementTraversal.h" | 30 #include "core/dom/ElementTraversal.h" |
| 31 #include "core/dom/StaticNodeList.h" | 31 #include "core/dom/StaticNodeList.h" |
| 32 #include "core/editing/FrameSelection.h" | 32 #include "core/editing/FrameSelection.h" |
| 33 #include "core/events/EventListener.h" | 33 #include "core/events/EventListener.h" |
| 34 #include "core/frame/Deprecation.h" |
| 35 #include "core/frame/FrameView.h" |
| 34 #include "core/frame/LocalFrame.h" | 36 #include "core/frame/LocalFrame.h" |
| 35 #include "core/page/FrameTree.h" | |
| 36 #include "core/frame/FrameView.h" | |
| 37 #include "core/frame/UseCounter.h" | |
| 38 #include "core/layout/LayoutObject.h" | 37 #include "core/layout/LayoutObject.h" |
| 39 #include "core/layout/svg/LayoutSVGModelObject.h" | 38 #include "core/layout/svg/LayoutSVGModelObject.h" |
| 40 #include "core/layout/svg/LayoutSVGRoot.h" | 39 #include "core/layout/svg/LayoutSVGRoot.h" |
| 41 #include "core/layout/svg/LayoutSVGViewportContainer.h" | 40 #include "core/layout/svg/LayoutSVGViewportContainer.h" |
| 41 #include "core/page/FrameTree.h" |
| 42 #include "core/svg/SVGAngleTearOff.h" | 42 #include "core/svg/SVGAngleTearOff.h" |
| 43 #include "core/svg/SVGDocumentExtensions.h" | 43 #include "core/svg/SVGDocumentExtensions.h" |
| 44 #include "core/svg/SVGNumberTearOff.h" | 44 #include "core/svg/SVGNumberTearOff.h" |
| 45 #include "core/svg/SVGPreserveAspectRatio.h" | 45 #include "core/svg/SVGPreserveAspectRatio.h" |
| 46 #include "core/svg/SVGRectTearOff.h" | 46 #include "core/svg/SVGRectTearOff.h" |
| 47 #include "core/svg/SVGTransform.h" | 47 #include "core/svg/SVGTransform.h" |
| 48 #include "core/svg/SVGTransformList.h" | 48 #include "core/svg/SVGTransformList.h" |
| 49 #include "core/svg/SVGTransformTearOff.h" | 49 #include "core/svg/SVGTransformTearOff.h" |
| 50 #include "core/svg/SVGViewElement.h" | 50 #include "core/svg/SVGViewElement.h" |
| 51 #include "core/svg/SVGViewSpec.h" | 51 #include "core/svg/SVGViewSpec.h" |
| (...skipping 142 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 Deprecation::countDeprecation(document(), UseCounter::DeprecateSVGZo
omEvent); |
| 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 |