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

Side by Side Diff: Source/core/rendering/shapes/ShapeOutsideInfo.h

Issue 635533003: Don't delete nodes in the float interval tree while traversing it. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add correct png! Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/shapes/ShapeOutsideInfo.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 return *info; 104 return *info;
105 InfoMap::AddResult result = infoMap.add(&key, ShapeOutsideInfo::createIn fo(key)); 105 InfoMap::AddResult result = infoMap.add(&key, ShapeOutsideInfo::createIn fo(key));
106 return *result.storedValue->value; 106 return *result.storedValue->value;
107 } 107 }
108 static void removeInfo(const RenderBox& key) { infoMap().remove(&key); } 108 static void removeInfo(const RenderBox& key) { infoMap().remove(&key); }
109 static ShapeOutsideInfo* info(const RenderBox& key) { return infoMap().get(& key); } 109 static ShapeOutsideInfo* info(const RenderBox& key) { return infoMap().get(& key); }
110 110
111 void markShapeAsDirty() { m_shape.clear(); } 111 void markShapeAsDirty() { m_shape.clear(); }
112 bool isShapeDirty() { return !m_shape.get(); } 112 bool isShapeDirty() { return !m_shape.get(); }
113 LayoutSize shapeSize() const { return m_referenceBoxLogicalSize; } 113 LayoutSize shapeSize() const { return m_referenceBoxLogicalSize; }
114 bool isComputingShape() const { return m_isComputingShape; }
114 115
115 LayoutRect computedShapePhysicalBoundingBox() const; 116 LayoutRect computedShapePhysicalBoundingBox() const;
116 FloatPoint shapeToRendererPoint(FloatPoint) const; 117 FloatPoint shapeToRendererPoint(FloatPoint) const;
117 FloatSize shapeToRendererSize(FloatSize) const; 118 FloatSize shapeToRendererSize(FloatSize) const;
118 const Shape& computedShape() const; 119 const Shape& computedShape() const;
119 120
120 protected: 121 protected:
121 ShapeOutsideInfo(const RenderBox& renderer) 122 ShapeOutsideInfo(const RenderBox& renderer)
122 : m_renderer(renderer) 123 : m_renderer(renderer)
124 , m_isComputingShape(false)
123 { } 125 { }
124 126
125 private: 127 private:
126 PassOwnPtr<Shape> createShapeForImage(StyleImage*, float shapeImageThreshold , WritingMode, float margin) const; 128 PassOwnPtr<Shape> createShapeForImage(StyleImage*, float shapeImageThreshold , WritingMode, float margin) const;
127 129
128 LayoutUnit logicalTopOffset() const; 130 LayoutUnit logicalTopOffset() const;
129 LayoutUnit logicalLeftOffset() const; 131 LayoutUnit logicalLeftOffset() const;
130 132
131 typedef HashMap<const RenderBox*, OwnPtr<ShapeOutsideInfo> > InfoMap; 133 typedef HashMap<const RenderBox*, OwnPtr<ShapeOutsideInfo> > InfoMap;
132 static InfoMap& infoMap() 134 static InfoMap& infoMap()
133 { 135 {
134 DEFINE_STATIC_LOCAL(InfoMap, staticInfoMap, ()); 136 DEFINE_STATIC_LOCAL(InfoMap, staticInfoMap, ());
135 return staticInfoMap; 137 return staticInfoMap;
136 } 138 }
137 139
138 const RenderBox& m_renderer; 140 const RenderBox& m_renderer;
139 mutable OwnPtr<Shape> m_shape; 141 mutable OwnPtr<Shape> m_shape;
140 LayoutSize m_referenceBoxLogicalSize; 142 LayoutSize m_referenceBoxLogicalSize;
141 ShapeOutsideDeltas m_shapeOutsideDeltas; 143 ShapeOutsideDeltas m_shapeOutsideDeltas;
144 mutable bool m_isComputingShape;
142 }; 145 };
143 146
144 } 147 }
145 #endif 148 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | Source/core/rendering/shapes/ShapeOutsideInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698