| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 bool isLayoutSizeChanged() const { return m_isLayoutSizeChanged; } | 49 bool isLayoutSizeChanged() const { return m_isLayoutSizeChanged; } |
| 50 virtual void setNeedsBoundariesUpdate() { m_needsBoundariesOrTransformUpdate
= true; } | 50 virtual void setNeedsBoundariesUpdate() { m_needsBoundariesOrTransformUpdate
= true; } |
| 51 virtual void setNeedsTransformUpdate() { m_needsBoundariesOrTransformUpdate
= true; } | 51 virtual void setNeedsTransformUpdate() { m_needsBoundariesOrTransformUpdate
= true; } |
| 52 | 52 |
| 53 IntSize containerSize() const { return m_containerSize; } | 53 IntSize containerSize() const { return m_containerSize; } |
| 54 void setContainerSize(const IntSize& containerSize) { m_containerSize = cont
ainerSize; } | 54 void setContainerSize(const IntSize& containerSize) { m_containerSize = cont
ainerSize; } |
| 55 | 55 |
| 56 virtual bool hasRelativeDimensions() const; | 56 virtual bool hasRelativeDimensions() const; |
| 57 | 57 |
| 58 // The flag is cleared at the beginning of each layout() pass. Elements then
call this |
| 59 // method during layout when they are invalidated by a filter. |
| 60 static void addResourceForClientInvalidation(RenderSVGResourceContainer*); |
| 61 |
| 58 private: | 62 private: |
| 59 virtual RenderObjectChildList* virtualChildren() { return children(); } | 63 virtual RenderObjectChildList* virtualChildren() { return children(); } |
| 60 virtual const RenderObjectChildList* virtualChildren() const { return childr
en(); } | 64 virtual const RenderObjectChildList* virtualChildren() const { return childr
en(); } |
| 61 virtual bool canHaveChildren() const { return true; } | 65 virtual bool canHaveChildren() const { return true; } |
| 62 | 66 |
| 63 virtual bool isSVGRoot() const { return true; } | 67 virtual bool isSVGRoot() const { return true; } |
| 64 virtual const char* renderName() const { return "RenderSVGRoot"; } | 68 virtual const char* renderName() const { return "RenderSVGRoot"; } |
| 65 | 69 |
| 66 virtual LayoutUnit computeReplacedLogicalWidth(bool includeMaxWidth = true)
const; | 70 virtual LayoutUnit computeReplacedLogicalWidth(bool includeMaxWidth = true)
const; |
| 67 virtual LayoutUnit computeReplacedLogicalHeight() const; | 71 virtual LayoutUnit computeReplacedLogicalHeight() const; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 93 void updateCachedBoundaries(); | 97 void updateCachedBoundaries(); |
| 94 void buildLocalToBorderBoxTransform(); | 98 void buildLocalToBorderBoxTransform(); |
| 95 | 99 |
| 96 RenderObjectChildList m_children; | 100 RenderObjectChildList m_children; |
| 97 IntSize m_containerSize; | 101 IntSize m_containerSize; |
| 98 FloatRect m_objectBoundingBox; | 102 FloatRect m_objectBoundingBox; |
| 99 FloatRect m_strokeBoundingBox; | 103 FloatRect m_strokeBoundingBox; |
| 100 FloatRect m_repaintBoundingBox; | 104 FloatRect m_repaintBoundingBox; |
| 101 mutable AffineTransform m_localToParentTransform; | 105 mutable AffineTransform m_localToParentTransform; |
| 102 AffineTransform m_localToBorderBoxTransform; | 106 AffineTransform m_localToBorderBoxTransform; |
| 107 HashSet<RenderSVGResourceContainer*> m_resourcesNeedingToInvalidateClients; |
| 103 bool m_isLayoutSizeChanged : 1; | 108 bool m_isLayoutSizeChanged : 1; |
| 104 bool m_needsBoundariesOrTransformUpdate : 1; | 109 bool m_needsBoundariesOrTransformUpdate : 1; |
| 105 }; | 110 }; |
| 106 | 111 |
| 107 inline RenderSVGRoot* toRenderSVGRoot(RenderObject* object) | 112 inline RenderSVGRoot* toRenderSVGRoot(RenderObject* object) |
| 108 { | 113 { |
| 109 ASSERT(!object || object->isSVGRoot()); | 114 ASSERT(!object || object->isSVGRoot()); |
| 110 return static_cast<RenderSVGRoot*>(object); | 115 return static_cast<RenderSVGRoot*>(object); |
| 111 } | 116 } |
| 112 | 117 |
| 113 inline const RenderSVGRoot* toRenderSVGRoot(const RenderObject* object) | 118 inline const RenderSVGRoot* toRenderSVGRoot(const RenderObject* object) |
| 114 { | 119 { |
| 115 ASSERT(!object || object->isSVGRoot()); | 120 ASSERT(!object || object->isSVGRoot()); |
| 116 return static_cast<const RenderSVGRoot*>(object); | 121 return static_cast<const RenderSVGRoot*>(object); |
| 117 } | 122 } |
| 118 | 123 |
| 119 // This will catch anyone doing an unnecessary cast. | 124 // This will catch anyone doing an unnecessary cast. |
| 120 void toRenderSVGRoot(const RenderSVGRoot*); | 125 void toRenderSVGRoot(const RenderSVGRoot*); |
| 121 | 126 |
| 122 } // namespace WebCore | 127 } // namespace WebCore |
| 123 | 128 |
| 124 #endif // ENABLE(SVG) | 129 #endif // ENABLE(SVG) |
| 125 #endif // RenderSVGRoot_h | 130 #endif // RenderSVGRoot_h |
| OLD | NEW |