Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Side by Side Diff: third_party/WebKit/Source/core/layout/shapes/ShapeOutsideInfo.h

Issue 2014483003: Rename OwnPtr::clear() to reset() in core/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 { 102 {
103 InfoMap& infoMap = ShapeOutsideInfo::infoMap(); 103 InfoMap& infoMap = ShapeOutsideInfo::infoMap();
104 if (ShapeOutsideInfo* info = infoMap.get(&key)) 104 if (ShapeOutsideInfo* info = infoMap.get(&key))
105 return *info; 105 return *info;
106 InfoMap::AddResult result = infoMap.add(&key, ShapeOutsideInfo::createIn fo(key)); 106 InfoMap::AddResult result = infoMap.add(&key, ShapeOutsideInfo::createIn fo(key));
107 return *result.storedValue->value; 107 return *result.storedValue->value;
108 } 108 }
109 static void removeInfo(const LayoutBox& key) { infoMap().remove(&key); } 109 static void removeInfo(const LayoutBox& key) { infoMap().remove(&key); }
110 static ShapeOutsideInfo* info(const LayoutBox& key) { return infoMap().get(& key); } 110 static ShapeOutsideInfo* info(const LayoutBox& key) { return infoMap().get(& key); }
111 111
112 void markShapeAsDirty() { m_shape.clear(); } 112 void markShapeAsDirty() { m_shape.reset(); }
113 bool isShapeDirty() { return !m_shape.get(); } 113 bool isShapeDirty() { return !m_shape.get(); }
114 LayoutSize shapeSize() const { return m_referenceBoxLogicalSize; } 114 LayoutSize shapeSize() const { return m_referenceBoxLogicalSize; }
115 bool isComputingShape() const { return m_isComputingShape; } 115 bool isComputingShape() const { return m_isComputingShape; }
116 116
117 LayoutRect computedShapePhysicalBoundingBox() const; 117 LayoutRect computedShapePhysicalBoundingBox() const;
118 FloatPoint shapeToLayoutObjectPoint(FloatPoint) const; 118 FloatPoint shapeToLayoutObjectPoint(FloatPoint) const;
119 FloatSize shapeToLayoutObjectSize(FloatSize) const; 119 FloatSize shapeToLayoutObjectSize(FloatSize) const;
120 const Shape& computedShape() const; 120 const Shape& computedShape() const;
121 121
122 protected: 122 protected:
(...skipping 17 matching lines...) Expand all
140 140
141 const LayoutBox& m_layoutBox; 141 const LayoutBox& m_layoutBox;
142 mutable OwnPtr<Shape> m_shape; 142 mutable OwnPtr<Shape> m_shape;
143 LayoutSize m_referenceBoxLogicalSize; 143 LayoutSize m_referenceBoxLogicalSize;
144 ShapeOutsideDeltas m_shapeOutsideDeltas; 144 ShapeOutsideDeltas m_shapeOutsideDeltas;
145 mutable bool m_isComputingShape; 145 mutable bool m_isComputingShape;
146 }; 146 };
147 147
148 } // namespace blink 148 } // namespace blink
149 #endif 149 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698