Chromium Code Reviews| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 void slowLastChild() const WTF_DELETED_FUNCTION; | 43 void slowLastChild() const WTF_DELETED_FUNCTION; |
| 44 | 44 |
| 45 const RenderObjectChildList* children() const { return &m_children; } | 45 const RenderObjectChildList* children() const { return &m_children; } |
| 46 RenderObjectChildList* children() { return &m_children; } | 46 RenderObjectChildList* children() { return &m_children; } |
| 47 | 47 |
| 48 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; | 48 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; |
| 49 virtual void setNeedsBoundariesUpdate() OVERRIDE FINAL { m_needsBoundariesUp date = true; } | 49 virtual void setNeedsBoundariesUpdate() OVERRIDE FINAL { m_needsBoundariesUp date = true; } |
| 50 virtual bool didTransformToRootUpdate() { return false; } | 50 virtual bool didTransformToRootUpdate() { return false; } |
| 51 bool isObjectBoundingBoxValid() const { return m_objectBoundingBoxValid; } | 51 bool isObjectBoundingBoxValid() const { return m_objectBoundingBoxValid; } |
| 52 | 52 |
| 53 virtual FloatRect paintInvalidationRectInLocalCoordinates() const OVERRIDE F INAL { return m_paintInvalidationBoundingBox; } | |
| 54 bool selfWillPaint(); | |
| 55 | |
| 53 protected: | 56 protected: |
| 54 virtual RenderObjectChildList* virtualChildren() OVERRIDE FINAL { return chi ldren(); } | 57 virtual RenderObjectChildList* virtualChildren() OVERRIDE FINAL { return chi ldren(); } |
| 55 virtual const RenderObjectChildList* virtualChildren() const OVERRIDE FINAL { return children(); } | 58 virtual const RenderObjectChildList* virtualChildren() const OVERRIDE FINAL { return children(); } |
| 56 | 59 |
| 57 virtual bool isSVGContainer() const OVERRIDE FINAL { return true; } | 60 virtual bool isSVGContainer() const OVERRIDE FINAL { return true; } |
| 58 virtual const char* renderName() const OVERRIDE { return "RenderSVGContainer "; } | 61 virtual const char* renderName() const OVERRIDE { return "RenderSVGContainer "; } |
| 59 | 62 |
| 60 virtual void layout() OVERRIDE; | 63 virtual void layout() OVERRIDE; |
| 61 | 64 |
| 62 virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0) OV ERRIDE FINAL; | 65 virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0) OV ERRIDE FINAL; |
| 63 virtual void removeChild(RenderObject*) OVERRIDE FINAL; | 66 virtual void removeChild(RenderObject*) OVERRIDE FINAL; |
| 64 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit ionalOffset, const RenderLayerModelObject* paintContainer) const OVERRIDE FINAL; | 67 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit ionalOffset, const RenderLayerModelObject* paintContainer) const OVERRIDE FINAL; |
| 65 | 68 |
| 66 virtual FloatRect objectBoundingBox() const OVERRIDE FINAL { return m_object BoundingBox; } | 69 virtual FloatRect objectBoundingBox() const OVERRIDE FINAL { return m_object BoundingBox; } |
| 67 virtual FloatRect strokeBoundingBox() const OVERRIDE FINAL { return m_stroke BoundingBox; } | 70 virtual FloatRect strokeBoundingBox() const OVERRIDE FINAL { return m_stroke BoundingBox; } |
| 68 virtual FloatRect paintInvalidationRectInLocalCoordinates() const OVERRIDE F INAL { return m_paintInvalidationBoundingBox; } | |
| 69 | 71 |
| 70 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F loatPoint& pointInParent, HitTestAction) OVERRIDE; | 72 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F loatPoint& pointInParent, HitTestAction) OVERRIDE; |
| 71 | 73 |
| 72 // Allow RenderSVGTransformableContainer to hook in at the right time in lay out() | 74 // Allow RenderSVGTransformableContainer to hook in at the right time in lay out() |
| 73 virtual bool calculateLocalTransform() { return false; } | 75 virtual bool calculateLocalTransform() { return false; } |
| 74 | 76 |
| 75 // Allow RenderSVGViewportContainer to hook in at the right times in layout( ), paint() and nodeAtFloatPoint() | 77 // Allow RenderSVGViewportContainer to hook in at the right times in layout( ) and nodeAtFloatPoint(). |
| 76 virtual void calcViewport() { } | 78 virtual void calcViewport() { } |
| 77 virtual void applyViewportClip(PaintInfo&) { } | |
|
f(malita)
2014/09/25 13:42:50
Can you explain why de-encapsulating applyViewport
pdr.
2014/10/08 20:45:31
Our goal here is to move all paint-related code in
| |
| 78 virtual bool pointIsInsideViewportClip(const FloatPoint& /*pointInParent*/) { return true; } | 79 virtual bool pointIsInsideViewportClip(const FloatPoint& /*pointInParent*/) { return true; } |
| 79 | 80 |
| 80 virtual void determineIfLayoutSizeChanged() { } | 81 virtual void determineIfLayoutSizeChanged() { } |
| 81 | 82 |
| 82 bool selfWillPaint(); | |
| 83 void updateCachedBoundaries(); | 83 void updateCachedBoundaries(); |
| 84 | 84 |
| 85 private: | 85 private: |
| 86 RenderObjectChildList m_children; | 86 RenderObjectChildList m_children; |
| 87 FloatRect m_objectBoundingBox; | 87 FloatRect m_objectBoundingBox; |
| 88 bool m_objectBoundingBoxValid; | 88 bool m_objectBoundingBoxValid; |
| 89 FloatRect m_strokeBoundingBox; | 89 FloatRect m_strokeBoundingBox; |
| 90 FloatRect m_paintInvalidationBoundingBox; | 90 FloatRect m_paintInvalidationBoundingBox; |
| 91 bool m_needsBoundariesUpdate : 1; | 91 bool m_needsBoundariesUpdate : 1; |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGContainer, isSVGContainer()); | 94 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGContainer, isSVGContainer()); |
| 95 | 95 |
| 96 } // namespace blink | 96 } // namespace blink |
| 97 | 97 |
| 98 #endif // RenderSVGContainer_h | 98 #endif // RenderSVGContainer_h |
| OLD | NEW |