| 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 17 matching lines...) Expand all Loading... |
| 28 namespace blink { | 28 namespace blink { |
| 29 | 29 |
| 30 class SVGElement; | 30 class SVGElement; |
| 31 | 31 |
| 32 class RenderSVGContainer : public RenderSVGModelObject { | 32 class RenderSVGContainer : public RenderSVGModelObject { |
| 33 public: | 33 public: |
| 34 explicit RenderSVGContainer(SVGElement*); | 34 explicit RenderSVGContainer(SVGElement*); |
| 35 virtual ~RenderSVGContainer(); | 35 virtual ~RenderSVGContainer(); |
| 36 virtual void trace(Visitor*) OVERRIDE; | 36 virtual void trace(Visitor*) OVERRIDE; |
| 37 | 37 |
| 38 RenderObject* firstChild() const { ASSERT(children() == virtualChildren());
return children()->firstChild(); } | |
| 39 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); r
eturn children()->lastChild(); } | |
| 40 | |
| 41 // If you have a RenderSVGContainer, use firstChild or lastChild instead. | 38 // If you have a RenderSVGContainer, use firstChild or lastChild instead. |
| 42 void slowFirstChild() const WTF_DELETED_FUNCTION; | 39 void slowFirstChild() const WTF_DELETED_FUNCTION; |
| 43 void slowLastChild() const WTF_DELETED_FUNCTION; | 40 void slowLastChild() const WTF_DELETED_FUNCTION; |
| 44 | 41 |
| 45 const RenderObjectChildList* children() const { return &m_children; } | |
| 46 RenderObjectChildList* children() { return &m_children; } | |
| 47 | 42 |
| 48 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; | 43 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; |
| 49 virtual void setNeedsBoundariesUpdate() OVERRIDE FINAL { m_needsBoundariesUp
date = true; } | 44 virtual void setNeedsBoundariesUpdate() OVERRIDE FINAL { m_needsBoundariesUp
date = true; } |
| 50 virtual bool didTransformToRootUpdate() { return false; } | 45 virtual bool didTransformToRootUpdate() { return false; } |
| 51 bool isObjectBoundingBoxValid() const { return m_objectBoundingBoxValid; } | 46 bool isObjectBoundingBoxValid() const { return m_objectBoundingBoxValid; } |
| 52 | 47 |
| 53 protected: | 48 protected: |
| 54 virtual RenderObjectChildList* virtualChildren() OVERRIDE FINAL { return chi
ldren(); } | 49 virtual RenderObjectChildList* virtualChildren() OVERRIDE FINAL { return chi
ldren(); } |
| 55 virtual const RenderObjectChildList* virtualChildren() const OVERRIDE FINAL
{ return children(); } | 50 virtual const RenderObjectChildList* virtualChildren() const OVERRIDE FINAL
{ return children(); } |
| 56 | 51 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 76 virtual void calcViewport() { } | 71 virtual void calcViewport() { } |
| 77 virtual void applyViewportClip(PaintInfo&) { } | 72 virtual void applyViewportClip(PaintInfo&) { } |
| 78 virtual bool pointIsInsideViewportClip(const FloatPoint& /*pointInParent*/)
{ return true; } | 73 virtual bool pointIsInsideViewportClip(const FloatPoint& /*pointInParent*/)
{ return true; } |
| 79 | 74 |
| 80 virtual void determineIfLayoutSizeChanged() { } | 75 virtual void determineIfLayoutSizeChanged() { } |
| 81 | 76 |
| 82 bool selfWillPaint(); | 77 bool selfWillPaint(); |
| 83 void updateCachedBoundaries(); | 78 void updateCachedBoundaries(); |
| 84 | 79 |
| 85 private: | 80 private: |
| 81 RenderObject* firstChild() const { ASSERT(children() == virtualChildren());
return children()->firstChild(); } |
| 82 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); r
eturn children()->lastChild(); } |
| 83 |
| 84 const RenderObjectChildList* children() const { return &m_children; } |
| 85 RenderObjectChildList* children() { return &m_children; } |
| 86 |
| 86 RenderObjectChildList m_children; | 87 RenderObjectChildList m_children; |
| 87 FloatRect m_objectBoundingBox; | 88 FloatRect m_objectBoundingBox; |
| 88 bool m_objectBoundingBoxValid; | 89 bool m_objectBoundingBoxValid; |
| 89 FloatRect m_strokeBoundingBox; | 90 FloatRect m_strokeBoundingBox; |
| 90 FloatRect m_paintInvalidationBoundingBox; | 91 FloatRect m_paintInvalidationBoundingBox; |
| 91 bool m_needsBoundariesUpdate : 1; | 92 bool m_needsBoundariesUpdate : 1; |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGContainer, isSVGContainer()); | 95 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGContainer, isSVGContainer()); |
| 95 | 96 |
| 96 } // namespace blink | 97 } // namespace blink |
| 97 | 98 |
| 98 #endif // RenderSVGContainer_h | 99 #endif // RenderSVGContainer_h |
| OLD | NEW |