| 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 27 matching lines...) Expand all Loading... |
| 38 class SVGNumberTearOff; | 38 class SVGNumberTearOff; |
| 39 class SVGTransformTearOff; | 39 class SVGTransformTearOff; |
| 40 class SVGViewSpec; | 40 class SVGViewSpec; |
| 41 class SVGViewElement; | 41 class SVGViewElement; |
| 42 class SMILTimeContainer; | 42 class SMILTimeContainer; |
| 43 | 43 |
| 44 class SVGSVGElement final : public SVGGraphicsElement, | 44 class SVGSVGElement final : public SVGGraphicsElement, |
| 45 public SVGFitToViewBox, | 45 public SVGFitToViewBox, |
| 46 public SVGZoomAndPan { | 46 public SVGZoomAndPan { |
| 47 DEFINE_WRAPPERTYPEINFO(); | 47 DEFINE_WRAPPERTYPEINFO(); |
| 48 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SVGSVGElement); | 48 USING_GARBAGE_COLLECTED_MIXIN(SVGSVGElement); |
| 49 public: | 49 public: |
| 50 DECLARE_NODE_FACTORY(SVGSVGElement); | 50 DECLARE_NODE_FACTORY(SVGSVGElement); |
| 51 | 51 |
| 52 #if !ENABLE(OILPAN) | 52 #if !ENABLE(OILPAN) |
| 53 using SVGGraphicsElement::ref; | 53 using SVGGraphicsElement::ref; |
| 54 using SVGGraphicsElement::deref; | 54 using SVGGraphicsElement::deref; |
| 55 #endif | 55 #endif |
| 56 | 56 |
| 57 // 'SVGSVGElement' functions | 57 // 'SVGSVGElement' functions |
| 58 PassRefPtrWillBeRawPtr<SVGRectTearOff> viewport() const; | 58 RawPtr<SVGRectTearOff> viewport() const; |
| 59 | 59 |
| 60 bool useCurrentView() const { return m_useCurrentView; } | 60 bool useCurrentView() const { return m_useCurrentView; } |
| 61 SVGViewSpec* currentView(); | 61 SVGViewSpec* currentView(); |
| 62 | 62 |
| 63 float intrinsicWidth() const; | 63 float intrinsicWidth() const; |
| 64 float intrinsicHeight() const; | 64 float intrinsicHeight() const; |
| 65 FloatSize currentViewportSize() const; | 65 FloatSize currentViewportSize() const; |
| 66 FloatRect currentViewBoxRect() const; | 66 FloatRect currentViewBoxRect() const; |
| 67 | 67 |
| 68 float currentScale() const; | 68 float currentScale() const; |
| 69 void setCurrentScale(float scale); | 69 void setCurrentScale(float scale); |
| 70 | 70 |
| 71 FloatPoint currentTranslate() { return m_translation->value(); } | 71 FloatPoint currentTranslate() { return m_translation->value(); } |
| 72 void setCurrentTranslate(const FloatPoint&); | 72 void setCurrentTranslate(const FloatPoint&); |
| 73 PassRefPtrWillBeRawPtr<SVGPointTearOff> currentTranslateFromJavascript(); | 73 RawPtr<SVGPointTearOff> currentTranslateFromJavascript(); |
| 74 | 74 |
| 75 SMILTimeContainer* timeContainer() const { return m_timeContainer.get(); } | 75 SMILTimeContainer* timeContainer() const { return m_timeContainer.get(); } |
| 76 | 76 |
| 77 void pauseAnimations(); | 77 void pauseAnimations(); |
| 78 void unpauseAnimations(); | 78 void unpauseAnimations(); |
| 79 bool animationsPaused() const; | 79 bool animationsPaused() const; |
| 80 | 80 |
| 81 float getCurrentTime() const; | 81 float getCurrentTime() const; |
| 82 void setCurrentTime(float seconds); | 82 void setCurrentTime(float seconds); |
| 83 | 83 |
| 84 // Stubs for the deprecated 'redraw' interface. | 84 // Stubs for the deprecated 'redraw' interface. |
| 85 unsigned suspendRedraw(unsigned) { return 1; } | 85 unsigned suspendRedraw(unsigned) { return 1; } |
| 86 void unsuspendRedraw(unsigned) { } | 86 void unsuspendRedraw(unsigned) { } |
| 87 void unsuspendRedrawAll() { } | 87 void unsuspendRedrawAll() { } |
| 88 void forceRedraw() { } | 88 void forceRedraw() { } |
| 89 | 89 |
| 90 PassRefPtrWillBeRawPtr<StaticNodeList> getIntersectionList(PassRefPtrWillBeR
awPtr<SVGRectTearOff>, SVGElement* referenceElement) const; | 90 RawPtr<StaticNodeList> getIntersectionList(RawPtr<SVGRectTearOff>, SVGElemen
t* referenceElement) const; |
| 91 PassRefPtrWillBeRawPtr<StaticNodeList> getEnclosureList(PassRefPtrWillBeRawP
tr<SVGRectTearOff>, SVGElement* referenceElement) const; | 91 RawPtr<StaticNodeList> getEnclosureList(RawPtr<SVGRectTearOff>, SVGElement*
referenceElement) const; |
| 92 bool checkIntersection(SVGElement*, PassRefPtrWillBeRawPtr<SVGRectTearOff>)
const; | 92 bool checkIntersection(SVGElement*, RawPtr<SVGRectTearOff>) const; |
| 93 bool checkEnclosure(SVGElement*, PassRefPtrWillBeRawPtr<SVGRectTearOff>) con
st; | 93 bool checkEnclosure(SVGElement*, RawPtr<SVGRectTearOff>) const; |
| 94 void deselectAll(); | 94 void deselectAll(); |
| 95 | 95 |
| 96 static PassRefPtrWillBeRawPtr<SVGNumberTearOff> createSVGNumber(); | 96 static RawPtr<SVGNumberTearOff> createSVGNumber(); |
| 97 static PassRefPtrWillBeRawPtr<SVGLengthTearOff> createSVGLength(); | 97 static RawPtr<SVGLengthTearOff> createSVGLength(); |
| 98 static PassRefPtrWillBeRawPtr<SVGAngleTearOff> createSVGAngle(); | 98 static RawPtr<SVGAngleTearOff> createSVGAngle(); |
| 99 static PassRefPtrWillBeRawPtr<SVGPointTearOff> createSVGPoint(); | 99 static RawPtr<SVGPointTearOff> createSVGPoint(); |
| 100 static PassRefPtrWillBeRawPtr<SVGMatrixTearOff> createSVGMatrix(); | 100 static RawPtr<SVGMatrixTearOff> createSVGMatrix(); |
| 101 static PassRefPtrWillBeRawPtr<SVGRectTearOff> createSVGRect(); | 101 static RawPtr<SVGRectTearOff> createSVGRect(); |
| 102 static PassRefPtrWillBeRawPtr<SVGTransformTearOff> createSVGTransform(); | 102 static RawPtr<SVGTransformTearOff> createSVGTransform(); |
| 103 static PassRefPtrWillBeRawPtr<SVGTransformTearOff> createSVGTransformFromMat
rix(PassRefPtrWillBeRawPtr<SVGMatrixTearOff>); | 103 static RawPtr<SVGTransformTearOff> createSVGTransformFromMatrix(RawPtr<SVGMa
trixTearOff>); |
| 104 | 104 |
| 105 AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) co
nst; | 105 AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) co
nst; |
| 106 | 106 |
| 107 void setupInitialView(const String& fragmentIdentifier, Element* anchorNode)
; | 107 void setupInitialView(const String& fragmentIdentifier, Element* anchorNode)
; |
| 108 bool zoomAndPanEnabled() const; | 108 bool zoomAndPanEnabled() const; |
| 109 | 109 |
| 110 bool hasIntrinsicWidth() const; | 110 bool hasIntrinsicWidth() const; |
| 111 bool hasIntrinsicHeight() const; | 111 bool hasIntrinsicHeight() const; |
| 112 | 112 |
| 113 SVGAnimatedLength* x() const { return m_x.get(); } | 113 SVGAnimatedLength* x() const { return m_x.get(); } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 141 void updateCurrentTranslate(); | 141 void updateCurrentTranslate(); |
| 142 | 142 |
| 143 void finishParsingChildren() override; | 143 void finishParsingChildren() override; |
| 144 | 144 |
| 145 enum CheckIntersectionOrEnclosure { | 145 enum CheckIntersectionOrEnclosure { |
| 146 CheckIntersection, | 146 CheckIntersection, |
| 147 CheckEnclosure | 147 CheckEnclosure |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 bool checkIntersectionOrEnclosure(const SVGElement&, const FloatRect&, Check
IntersectionOrEnclosure) const; | 150 bool checkIntersectionOrEnclosure(const SVGElement&, const FloatRect&, Check
IntersectionOrEnclosure) const; |
| 151 PassRefPtrWillBeRawPtr<StaticNodeList> collectIntersectionOrEnclosureList(co
nst FloatRect&, SVGElement*, CheckIntersectionOrEnclosure) const; | 151 RawPtr<StaticNodeList> collectIntersectionOrEnclosureList(const FloatRect&,
SVGElement*, CheckIntersectionOrEnclosure) const; |
| 152 | 152 |
| 153 RefPtrWillBeMember<SVGAnimatedLength> m_x; | 153 Member<SVGAnimatedLength> m_x; |
| 154 RefPtrWillBeMember<SVGAnimatedLength> m_y; | 154 Member<SVGAnimatedLength> m_y; |
| 155 RefPtrWillBeMember<SVGAnimatedLength> m_width; | 155 Member<SVGAnimatedLength> m_width; |
| 156 RefPtrWillBeMember<SVGAnimatedLength> m_height; | 156 Member<SVGAnimatedLength> m_height; |
| 157 | 157 |
| 158 AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope) const ov
erride; | 158 AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope) const ov
erride; |
| 159 | 159 |
| 160 bool m_useCurrentView; | 160 bool m_useCurrentView; |
| 161 RefPtrWillBeMember<SMILTimeContainer> m_timeContainer; | 161 Member<SMILTimeContainer> m_timeContainer; |
| 162 RefPtrWillBeMember<SVGPoint> m_translation; | 162 Member<SVGPoint> m_translation; |
| 163 RefPtrWillBeMember<SVGViewSpec> m_viewSpec; | 163 Member<SVGViewSpec> m_viewSpec; |
| 164 | 164 |
| 165 friend class SVGCurrentTranslateTearOff; | 165 friend class SVGCurrentTranslateTearOff; |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 } // namespace blink | 168 } // namespace blink |
| 169 | 169 |
| 170 #endif // SVGSVGElement_h | 170 #endif // SVGSVGElement_h |
| OLD | NEW |