| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2009 Google, Inc. All rights reserved. | 4 * Copyright (C) 2009 Google, Inc. All rights reserved. |
| 5 * Copyright (C) 2009 Apple Inc. All rights reserved. | 5 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 IntSize containerSize() const { return m_containerSize; } | 56 IntSize containerSize() const { return m_containerSize; } |
| 57 void setContainerSize(const IntSize& containerSize) { m_containerSize = cont
ainerSize; } | 57 void setContainerSize(const IntSize& containerSize) { m_containerSize = cont
ainerSize; } |
| 58 | 58 |
| 59 virtual bool hasRelativeDimensions() const OVERRIDE; | 59 virtual bool hasRelativeDimensions() const OVERRIDE; |
| 60 virtual bool hasRelativeIntrinsicLogicalWidth() const OVERRIDE; | 60 virtual bool hasRelativeIntrinsicLogicalWidth() const OVERRIDE; |
| 61 virtual bool hasRelativeLogicalHeight() const OVERRIDE; | 61 virtual bool hasRelativeLogicalHeight() const OVERRIDE; |
| 62 | 62 |
| 63 // localToBorderBoxTransform maps local SVG viewport coordinates to local CS
S box coordinates. | 63 // localToBorderBoxTransform maps local SVG viewport coordinates to local CS
S box coordinates. |
| 64 const AffineTransform& localToBorderBoxTransform() const { return m_localToB
orderBoxTransform; } | 64 const AffineTransform& localToBorderBoxTransform() const { return m_localToB
orderBoxTransform; } |
| 65 | 65 |
| 66 // The flag is cleared at the beginning of each layout() pass. Elements then
call this | |
| 67 // method during layout when they are invalidated by a filter. | |
| 68 static void addResourceForClientInvalidation(RenderSVGResourceContainer*); | |
| 69 | |
| 70 private: | 66 private: |
| 71 virtual RenderObjectChildList* virtualChildren() { return children(); } | 67 virtual RenderObjectChildList* virtualChildren() { return children(); } |
| 72 virtual const RenderObjectChildList* virtualChildren() const { return childr
en(); } | 68 virtual const RenderObjectChildList* virtualChildren() const { return childr
en(); } |
| 73 | 69 |
| 74 virtual bool isSVGRoot() const { return true; } | 70 virtual bool isSVGRoot() const { return true; } |
| 75 virtual const char* renderName() const { return "RenderSVGRoot"; } | 71 virtual const char* renderName() const { return "RenderSVGRoot"; } |
| 76 | 72 |
| 77 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com
puteActual) const OVERRIDE; | 73 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com
puteActual) const OVERRIDE; |
| 78 virtual LayoutUnit computeReplacedLogicalHeight() const; | 74 virtual LayoutUnit computeReplacedLogicalHeight() const; |
| 79 virtual void layout(); | 75 virtual void layout(); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 void buildLocalToBorderBoxTransform(); | 108 void buildLocalToBorderBoxTransform(); |
| 113 | 109 |
| 114 RenderObjectChildList m_children; | 110 RenderObjectChildList m_children; |
| 115 IntSize m_containerSize; | 111 IntSize m_containerSize; |
| 116 FloatRect m_objectBoundingBox; | 112 FloatRect m_objectBoundingBox; |
| 117 bool m_objectBoundingBoxValid; | 113 bool m_objectBoundingBoxValid; |
| 118 FloatRect m_strokeBoundingBox; | 114 FloatRect m_strokeBoundingBox; |
| 119 FloatRect m_repaintBoundingBox; | 115 FloatRect m_repaintBoundingBox; |
| 120 mutable AffineTransform m_localToParentTransform; | 116 mutable AffineTransform m_localToParentTransform; |
| 121 AffineTransform m_localToBorderBoxTransform; | 117 AffineTransform m_localToBorderBoxTransform; |
| 122 HashSet<RenderSVGResourceContainer*> m_resourcesNeedingToInvalidateClients; | |
| 123 bool m_isLayoutSizeChanged : 1; | 118 bool m_isLayoutSizeChanged : 1; |
| 124 bool m_needsBoundariesOrTransformUpdate : 1; | 119 bool m_needsBoundariesOrTransformUpdate : 1; |
| 125 }; | 120 }; |
| 126 | 121 |
| 127 inline RenderSVGRoot* toRenderSVGRoot(RenderObject* object) | 122 inline RenderSVGRoot* toRenderSVGRoot(RenderObject* object) |
| 128 { | 123 { |
| 129 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isSVGRoot()); | 124 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isSVGRoot()); |
| 130 return static_cast<RenderSVGRoot*>(object); | 125 return static_cast<RenderSVGRoot*>(object); |
| 131 } | 126 } |
| 132 | 127 |
| 133 inline const RenderSVGRoot* toRenderSVGRoot(const RenderObject* object) | 128 inline const RenderSVGRoot* toRenderSVGRoot(const RenderObject* object) |
| 134 { | 129 { |
| 135 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isSVGRoot()); | 130 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isSVGRoot()); |
| 136 return static_cast<const RenderSVGRoot*>(object); | 131 return static_cast<const RenderSVGRoot*>(object); |
| 137 } | 132 } |
| 138 | 133 |
| 139 // This will catch anyone doing an unnecessary cast. | 134 // This will catch anyone doing an unnecessary cast. |
| 140 void toRenderSVGRoot(const RenderSVGRoot*); | 135 void toRenderSVGRoot(const RenderSVGRoot*); |
| 141 | 136 |
| 142 } // namespace WebCore | 137 } // namespace WebCore |
| 143 | 138 |
| 144 #endif // RenderSVGRoot_h | 139 #endif // RenderSVGRoot_h |
| OLD | NEW |