| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 virtual LayoutSVGResourceType resourceType() const = 0; | 56 virtual LayoutSVGResourceType resourceType() const = 0; |
| 57 | 57 |
| 58 bool isSVGPaintServer() const { | 58 bool isSVGPaintServer() const { |
| 59 LayoutSVGResourceType resourceType = this->resourceType(); | 59 LayoutSVGResourceType resourceType = this->resourceType(); |
| 60 return resourceType == PatternResourceType || | 60 return resourceType == PatternResourceType || |
| 61 resourceType == LinearGradientResourceType || | 61 resourceType == LinearGradientResourceType || |
| 62 resourceType == RadialGradientResourceType; | 62 resourceType == RadialGradientResourceType; |
| 63 } | 63 } |
| 64 | 64 |
| 65 void idChanged(const AtomicString& oldId, const AtomicString& newId); | 65 void idChanged(const AtomicString& oldId, const AtomicString& newId); |
| 66 void detachAllClients(const AtomicString& toId); |
| 67 |
| 68 void setRegistered(bool registered) { m_registered = registered; } |
| 69 bool isRegistered() const { return m_registered; } |
| 66 | 70 |
| 67 void invalidateCacheAndMarkForLayout(SubtreeLayoutScope* = nullptr); | 71 void invalidateCacheAndMarkForLayout(SubtreeLayoutScope* = nullptr); |
| 68 | 72 |
| 69 static void markForLayoutAndParentResourceInvalidation( | 73 static void markForLayoutAndParentResourceInvalidation( |
| 70 LayoutObject*, | 74 LayoutObject*, |
| 71 bool needsLayout = true); | 75 bool needsLayout = true); |
| 72 | 76 |
| 73 void clearInvalidationMask() { m_invalidationMask = 0; } | 77 void clearInvalidationMask() { m_invalidationMask = 0; } |
| 74 | 78 |
| 75 protected: | 79 protected: |
| (...skipping 14 matching lines...) Expand all Loading... |
| 90 SVGElementProxySet* elementProxySet(); | 94 SVGElementProxySet* elementProxySet(); |
| 91 | 95 |
| 92 void willBeDestroyed() override; | 96 void willBeDestroyed() override; |
| 93 | 97 |
| 94 bool m_isInLayout; | 98 bool m_isInLayout; |
| 95 | 99 |
| 96 private: | 100 private: |
| 97 friend class SVGResourcesCache; | 101 friend class SVGResourcesCache; |
| 98 void addClient(LayoutObject*); | 102 void addClient(LayoutObject*); |
| 99 void removeClient(LayoutObject*); | 103 void removeClient(LayoutObject*); |
| 100 void detachAllClients(); | |
| 101 | 104 |
| 102 // Track global (markAllClientsForInvalidation) invals to avoid redundant | 105 // Track global (markAllClientsForInvalidation) invals to avoid redundant |
| 103 // crawls. | 106 // crawls. |
| 104 unsigned m_invalidationMask : 8; | 107 unsigned m_invalidationMask : 8; |
| 105 | 108 |
| 106 unsigned m_registered : 1; | 109 unsigned m_registered : 1; |
| 107 unsigned m_isInvalidating : 1; | 110 unsigned m_isInvalidating : 1; |
| 108 // 22 padding bits available | 111 // 22 padding bits available |
| 109 | 112 |
| 110 HashSet<LayoutObject*> m_clients; | 113 HashSet<LayoutObject*> m_clients; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 125 isSVGResourceContainer()); | 128 isSVGResourceContainer()); |
| 126 | 129 |
| 127 #define DEFINE_LAYOUT_SVG_RESOURCE_TYPE_CASTS(thisType, typeName) \ | 130 #define DEFINE_LAYOUT_SVG_RESOURCE_TYPE_CASTS(thisType, typeName) \ |
| 128 DEFINE_TYPE_CASTS(thisType, LayoutSVGResourceContainer, resource, \ | 131 DEFINE_TYPE_CASTS(thisType, LayoutSVGResourceContainer, resource, \ |
| 129 resource->resourceType() == typeName, \ | 132 resource->resourceType() == typeName, \ |
| 130 resource.resourceType() == typeName) | 133 resource.resourceType() == typeName) |
| 131 | 134 |
| 132 } // namespace blink | 135 } // namespace blink |
| 133 | 136 |
| 134 #endif | 137 #endif |
| OLD | NEW |