OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
10 * disclaimer. | 10 * disclaimer. |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 LayoutUnit lineHeight); | 131 LayoutUnit lineHeight); |
132 | 132 |
133 static ShapeOutsideInfo& ensureInfo(const LayoutBox& key) { | 133 static ShapeOutsideInfo& ensureInfo(const LayoutBox& key) { |
134 InfoMap& infoMap = ShapeOutsideInfo::infoMap(); | 134 InfoMap& infoMap = ShapeOutsideInfo::infoMap(); |
135 if (ShapeOutsideInfo* info = infoMap.get(&key)) | 135 if (ShapeOutsideInfo* info = infoMap.get(&key)) |
136 return *info; | 136 return *info; |
137 InfoMap::AddResult result = | 137 InfoMap::AddResult result = |
138 infoMap.add(&key, ShapeOutsideInfo::createInfo(key)); | 138 infoMap.add(&key, ShapeOutsideInfo::createInfo(key)); |
139 return *result.storedValue->value; | 139 return *result.storedValue->value; |
140 } | 140 } |
141 static void removeInfo(const LayoutBox& key) { infoMap().remove(&key); } | 141 static void removeInfo(const LayoutBox& key) { infoMap().erase(&key); } |
142 static ShapeOutsideInfo* info(const LayoutBox& key) { | 142 static ShapeOutsideInfo* info(const LayoutBox& key) { |
143 return infoMap().get(&key); | 143 return infoMap().get(&key); |
144 } | 144 } |
145 | 145 |
146 void markShapeAsDirty() { m_shape.reset(); } | 146 void markShapeAsDirty() { m_shape.reset(); } |
147 bool isShapeDirty() { return !m_shape.get(); } | 147 bool isShapeDirty() { return !m_shape.get(); } |
148 LayoutSize shapeSize() const { return m_referenceBoxLogicalSize; } | 148 LayoutSize shapeSize() const { return m_referenceBoxLogicalSize; } |
149 bool isComputingShape() const { return m_isComputingShape; } | 149 bool isComputingShape() const { return m_isComputingShape; } |
150 | 150 |
151 LayoutRect computedShapePhysicalBoundingBox() const; | 151 LayoutRect computedShapePhysicalBoundingBox() const; |
(...skipping 22 matching lines...) Expand all Loading... |
174 | 174 |
175 const LayoutBox& m_layoutBox; | 175 const LayoutBox& m_layoutBox; |
176 mutable std::unique_ptr<Shape> m_shape; | 176 mutable std::unique_ptr<Shape> m_shape; |
177 LayoutSize m_referenceBoxLogicalSize; | 177 LayoutSize m_referenceBoxLogicalSize; |
178 ShapeOutsideDeltas m_shapeOutsideDeltas; | 178 ShapeOutsideDeltas m_shapeOutsideDeltas; |
179 mutable bool m_isComputingShape; | 179 mutable bool m_isComputingShape; |
180 }; | 180 }; |
181 | 181 |
182 } // namespace blink | 182 } // namespace blink |
183 #endif | 183 #endif |
OLD | NEW |