| 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, 2010 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2014 Google, Inc. | 4 * Copyright (C) 2014 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 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 class SMILTimeContainer; | 34 class SMILTimeContainer; |
| 35 class SVGAngleTearOff; | 35 class SVGAngleTearOff; |
| 36 class SVGLengthTearOff; | 36 class SVGLengthTearOff; |
| 37 class SVGMatrixTearOff; | 37 class SVGMatrixTearOff; |
| 38 class SVGNumberTearOff; | 38 class SVGNumberTearOff; |
| 39 class SVGPointTearOff; | 39 class SVGPointTearOff; |
| 40 class SVGTransformTearOff; | 40 class SVGTransformTearOff; |
| 41 class SVGViewElement; | |
| 42 class SVGViewSpec; | 41 class SVGViewSpec; |
| 43 | 42 |
| 44 class SVGSVGElement final : public SVGGraphicsElement, | 43 class SVGSVGElement final : public SVGGraphicsElement, |
| 45 public SVGFitToViewBox, | 44 public SVGFitToViewBox, |
| 46 public SVGZoomAndPan { | 45 public SVGZoomAndPan { |
| 47 DEFINE_WRAPPERTYPEINFO(); | 46 DEFINE_WRAPPERTYPEINFO(); |
| 48 USING_GARBAGE_COLLECTED_MIXIN(SVGSVGElement); | 47 USING_GARBAGE_COLLECTED_MIXIN(SVGSVGElement); |
| 49 | 48 |
| 50 public: | 49 public: |
| 51 DECLARE_NODE_FACTORY(SVGSVGElement); | 50 DECLARE_NODE_FACTORY(SVGSVGElement); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 bool hasIntrinsicWidth() const; | 103 bool hasIntrinsicWidth() const; |
| 105 bool hasIntrinsicHeight() const; | 104 bool hasIntrinsicHeight() const; |
| 106 | 105 |
| 107 SVGAnimatedLength* x() const { return m_x.get(); } | 106 SVGAnimatedLength* x() const { return m_x.get(); } |
| 108 SVGAnimatedLength* y() const { return m_y.get(); } | 107 SVGAnimatedLength* y() const { return m_y.get(); } |
| 109 SVGAnimatedLength* width() const { return m_width.get(); } | 108 SVGAnimatedLength* width() const { return m_width.get(); } |
| 110 SVGAnimatedLength* height() const { return m_height.get(); } | 109 SVGAnimatedLength* height() const { return m_height.get(); } |
| 111 | 110 |
| 112 DECLARE_VIRTUAL_TRACE(); | 111 DECLARE_VIRTUAL_TRACE(); |
| 113 | 112 |
| 113 SVGViewSpec* viewSpec() const { return m_viewSpec; } |
| 114 void setViewSpec(SVGViewSpec*); |
| 115 |
| 114 private: | 116 private: |
| 115 explicit SVGSVGElement(Document&); | 117 explicit SVGSVGElement(Document&); |
| 116 ~SVGSVGElement() override; | 118 ~SVGSVGElement() override; |
| 117 | 119 |
| 118 SVGViewSpec& ensureViewSpec(); | 120 SVGViewSpec& ensureViewSpec(); |
| 119 | 121 |
| 120 void parseAttribute(const QualifiedName&, | 122 void parseAttribute(const QualifiedName&, |
| 121 const AtomicString&, | 123 const AtomicString&, |
| 122 const AtomicString&) override; | 124 const AtomicString&) override; |
| 123 bool isPresentationAttribute(const QualifiedName&) const override; | 125 bool isPresentationAttribute(const QualifiedName&) const override; |
| 124 bool isPresentationAttributeWithSVGDOM(const QualifiedName&) const override; | 126 bool isPresentationAttributeWithSVGDOM(const QualifiedName&) const override; |
| 125 void collectStyleForPresentationAttribute(const QualifiedName&, | 127 void collectStyleForPresentationAttribute(const QualifiedName&, |
| 126 const AtomicString&, | 128 const AtomicString&, |
| 127 MutableStylePropertySet*) override; | 129 MutableStylePropertySet*) override; |
| 128 | 130 |
| 129 bool layoutObjectIsNeeded(const ComputedStyle&) override; | 131 bool layoutObjectIsNeeded(const ComputedStyle&) override; |
| 130 LayoutObject* createLayoutObject(const ComputedStyle&) override; | 132 LayoutObject* createLayoutObject(const ComputedStyle&) override; |
| 131 | 133 |
| 132 InsertionNotificationRequest insertedInto(ContainerNode*) override; | 134 InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 133 void removedFrom(ContainerNode*) override; | 135 void removedFrom(ContainerNode*) override; |
| 134 | 136 |
| 135 void svgAttributeChanged(const QualifiedName&) override; | 137 void svgAttributeChanged(const QualifiedName&) override; |
| 136 | 138 |
| 137 bool selfHasRelativeLengths() const override; | 139 bool selfHasRelativeLengths() const override; |
| 138 | 140 |
| 139 void inheritViewAttributes(SVGViewElement*); | |
| 140 | |
| 141 bool shouldSynthesizeViewBox() const; | 141 bool shouldSynthesizeViewBox() const; |
| 142 void updateUserTransform(); | 142 void updateUserTransform(); |
| 143 | 143 |
| 144 void finishParsingChildren() override; | 144 void finishParsingChildren() override; |
| 145 | 145 |
| 146 enum CheckIntersectionOrEnclosure { CheckIntersection, CheckEnclosure }; | 146 enum CheckIntersectionOrEnclosure { CheckIntersection, CheckEnclosure }; |
| 147 | 147 |
| 148 bool checkIntersectionOrEnclosure(const SVGElement&, | 148 bool checkIntersectionOrEnclosure(const SVGElement&, |
| 149 const FloatRect&, | 149 const FloatRect&, |
| 150 CheckIntersectionOrEnclosure) const; | 150 CheckIntersectionOrEnclosure) const; |
| 151 StaticNodeList* collectIntersectionOrEnclosureList( | 151 StaticNodeList* collectIntersectionOrEnclosureList( |
| 152 const FloatRect&, | 152 const FloatRect&, |
| 153 SVGElement*, | 153 SVGElement*, |
| 154 CheckIntersectionOrEnclosure) const; | 154 CheckIntersectionOrEnclosure) const; |
| 155 | 155 |
| 156 Member<SVGAnimatedLength> m_x; | 156 Member<SVGAnimatedLength> m_x; |
| 157 Member<SVGAnimatedLength> m_y; | 157 Member<SVGAnimatedLength> m_y; |
| 158 Member<SVGAnimatedLength> m_width; | 158 Member<SVGAnimatedLength> m_width; |
| 159 Member<SVGAnimatedLength> m_height; | 159 Member<SVGAnimatedLength> m_height; |
| 160 | 160 |
| 161 AffineTransform localCoordinateSpaceTransform( | 161 AffineTransform localCoordinateSpaceTransform( |
| 162 SVGElement::CTMScope) const override; | 162 SVGElement::CTMScope) const override; |
| 163 | 163 |
| 164 bool m_useCurrentView; | |
| 165 Member<SMILTimeContainer> m_timeContainer; | 164 Member<SMILTimeContainer> m_timeContainer; |
| 166 Member<SVGPoint> m_translation; | 165 Member<SVGPoint> m_translation; |
| 167 Member<SVGViewSpec> m_viewSpec; | 166 Member<SVGViewSpec> m_viewSpec; |
| 168 float m_currentScale; | 167 float m_currentScale; |
| 169 | 168 |
| 170 friend class SVGCurrentTranslateTearOff; | 169 friend class SVGCurrentTranslateTearOff; |
| 171 }; | 170 }; |
| 172 | 171 |
| 173 } // namespace blink | 172 } // namespace blink |
| 174 | 173 |
| 175 #endif // SVGSVGElement_h | 174 #endif // SVGSVGElement_h |
| OLD | NEW |