| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
| 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 4 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. |
| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 bool needsReordering() const { return m_needsReordering; } | 56 bool needsReordering() const { return m_needsReordering; } |
| 57 const Vector<LayoutSVGInlineText*>& descendantTextNodes() const { | 57 const Vector<LayoutSVGInlineText*>& descendantTextNodes() const { |
| 58 return m_descendantTextNodes; | 58 return m_descendantTextNodes; |
| 59 } | 59 } |
| 60 | 60 |
| 61 void subtreeChildWasAdded(); | 61 void subtreeChildWasAdded(); |
| 62 void subtreeChildWillBeRemoved(); | 62 void subtreeChildWillBeRemoved(); |
| 63 void subtreeTextDidChange(); | 63 void subtreeTextDidChange(); |
| 64 | 64 |
| 65 const char* name() const override { return "LayoutSVGText"; } | 65 const char* name() const override { return "LayoutSVGText"; } |
| 66 char objectSize() const override { return sizeof(this); } |
| 67 char approximateHeapMemoryUsage() const override { |
| 68 int memory = LayoutSVGBlock::approximateHeapMemoryUsage(); |
| 69 // TODO(pdr): Include memory from m_descendantTextNodes. |
| 70 return memory; |
| 71 } |
| 66 | 72 |
| 67 private: | 73 private: |
| 68 bool isOfType(LayoutObjectType type) const override { | 74 bool isOfType(LayoutObjectType type) const override { |
| 69 return type == LayoutObjectSVGText || LayoutSVGBlock::isOfType(type); | 75 return type == LayoutObjectSVGText || LayoutSVGBlock::isOfType(type); |
| 70 } | 76 } |
| 71 | 77 |
| 72 void paint(const PaintInfo&, const LayoutPoint&) const override; | 78 void paint(const PaintInfo&, const LayoutPoint&) const override; |
| 73 bool nodeAtFloatPoint(HitTestResult&, | 79 bool nodeAtFloatPoint(HitTestResult&, |
| 74 const FloatPoint& pointInParent, | 80 const FloatPoint& pointInParent, |
| 75 HitTestAction) override; | 81 HitTestAction) override; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 96 bool m_needsTransformUpdate : 1; | 102 bool m_needsTransformUpdate : 1; |
| 97 bool m_needsTextMetricsUpdate : 1; | 103 bool m_needsTextMetricsUpdate : 1; |
| 98 Vector<LayoutSVGInlineText*> m_descendantTextNodes; | 104 Vector<LayoutSVGInlineText*> m_descendantTextNodes; |
| 99 }; | 105 }; |
| 100 | 106 |
| 101 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGText, isSVGText()); | 107 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGText, isSVGText()); |
| 102 | 108 |
| 103 } // namespace blink | 109 } // namespace blink |
| 104 | 110 |
| 105 #endif | 111 #endif |
| OLD | NEW |