| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 virtual void removeAllClientsFromCache(bool markForInvalidation = true) = 0; | 44 virtual void removeAllClientsFromCache(bool markForInvalidation = true) = 0; |
| 45 virtual void removeClientFromCache(LayoutObject*, | 45 virtual void removeClientFromCache(LayoutObject*, |
| 46 bool markForInvalidation = true) = 0; | 46 bool markForInvalidation = true) = 0; |
| 47 | 47 |
| 48 void layout() override; | 48 void layout() override; |
| 49 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) final; | 49 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) final; |
| 50 bool isOfType(LayoutObjectType type) const override { | 50 bool isOfType(LayoutObjectType type) const override { |
| 51 return type == LayoutObjectSVGResourceContainer || | 51 return type == LayoutObjectSVGResourceContainer || |
| 52 LayoutSVGHiddenContainer::isOfType(type); | 52 LayoutSVGHiddenContainer::isOfType(type); |
| 53 } | 53 } |
| 54 char objectSize() const override { return sizeof(this); } |
| 55 char approximateHeapMemoryUsage() const override { |
| 56 int memory = LayoutSVGHiddenContainer::approximateHeapMemoryUsage(); |
| 57 // TODO(pdr): Include memory from m_clients. |
| 58 return memory; |
| 59 } |
| 54 | 60 |
| 55 virtual LayoutSVGResourceType resourceType() const = 0; | 61 virtual LayoutSVGResourceType resourceType() const = 0; |
| 56 | 62 |
| 57 bool isSVGPaintServer() const { | 63 bool isSVGPaintServer() const { |
| 58 LayoutSVGResourceType resourceType = this->resourceType(); | 64 LayoutSVGResourceType resourceType = this->resourceType(); |
| 59 return resourceType == PatternResourceType || | 65 return resourceType == PatternResourceType || |
| 60 resourceType == LinearGradientResourceType || | 66 resourceType == LinearGradientResourceType || |
| 61 resourceType == RadialGradientResourceType; | 67 resourceType == RadialGradientResourceType; |
| 62 } | 68 } |
| 63 | 69 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 isSVGResourceContainer()); | 125 isSVGResourceContainer()); |
| 120 | 126 |
| 121 #define DEFINE_LAYOUT_SVG_RESOURCE_TYPE_CASTS(thisType, typeName) \ | 127 #define DEFINE_LAYOUT_SVG_RESOURCE_TYPE_CASTS(thisType, typeName) \ |
| 122 DEFINE_TYPE_CASTS(thisType, LayoutSVGResourceContainer, resource, \ | 128 DEFINE_TYPE_CASTS(thisType, LayoutSVGResourceContainer, resource, \ |
| 123 resource->resourceType() == typeName, \ | 129 resource->resourceType() == typeName, \ |
| 124 resource.resourceType() == typeName) | 130 resource.resourceType() == typeName) |
| 125 | 131 |
| 126 } // namespace blink | 132 } // namespace blink |
| 127 | 133 |
| 128 #endif | 134 #endif |
| OLD | NEW |