Chromium Code Reviews| Index: Source/core/rendering/FloatingObjects.cpp |
| diff --git a/Source/core/rendering/FloatingObjects.cpp b/Source/core/rendering/FloatingObjects.cpp |
| index cfb314d623bf2978fd3af4220187aab2581d00fb..1f143aaa46157573a020ec34361f26ebf7db1bfa 100644 |
| --- a/Source/core/rendering/FloatingObjects.cpp |
| +++ b/Source/core/rendering/FloatingObjects.cpp |
| @@ -487,13 +487,11 @@ inline void ComputeFloatOffsetAdapter<FloatTypeValue>::collectIfNeeded(const Int |
| m_outermostFloat = floatingObject; |
| } |
| -static inline ShapeOutsideInfo* shapeInfoForFloat(const FloatingObject* floatingObject, const RenderBlockFlow* containingBlock, LayoutUnit lineTop, LayoutUnit lineBottom) |
| +static inline ShapeOutsideInfo* shapeInfoForFloat(const FloatingObject& floatingObject, const RenderBlockFlow& containingBlock, LayoutUnit lineTop, LayoutUnit lineBottom) |
| { |
| - if (floatingObject) { |
| - if (ShapeOutsideInfo* shapeOutside = floatingObject->renderer()->shapeOutsideInfo()) { |
| - shapeOutside->updateDeltasForContainingBlockLine(containingBlock, floatingObject, lineTop, lineBottom - lineTop); |
| - return shapeOutside; |
| - } |
| + if (ShapeOutsideInfo* shapeOutside = floatingObject.renderer()->shapeOutsideInfo()) { |
| + shapeOutside->updateDeltasForContainingBlockLine(containingBlock, floatingObject, lineTop, lineBottom - lineTop); |
| + return shapeOutside; |
| } |
| return 0; |
| @@ -503,7 +501,7 @@ template<> |
| inline bool ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded(const FloatingObject* floatingObject) |
| { |
| LayoutUnit logicalRight = m_renderer->logicalRightForFloat(floatingObject); |
| - if (ShapeOutsideInfo* shapeOutside = shapeInfoForFloat(floatingObject, m_renderer, m_lineTop, m_lineBottom)) { |
| + if (ShapeOutsideInfo* shapeOutside = shapeInfoForFloat(*floatingObject, *m_renderer, m_lineTop, m_lineBottom)) { |
|
adamk
2014/03/04 19:45:05
It's not clear from this function why you know it'
|
| if (!shapeOutside->lineOverlapsShape()) |
| return false; |
| @@ -521,7 +519,7 @@ template<> |
| inline bool ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded(const FloatingObject* floatingObject) |
| { |
| LayoutUnit logicalLeft = m_renderer->logicalLeftForFloat(floatingObject); |
| - if (ShapeOutsideInfo* shapeOutside = shapeInfoForFloat(floatingObject, m_renderer, m_lineTop, m_lineBottom)) { |
| + if (ShapeOutsideInfo* shapeOutside = shapeInfoForFloat(*floatingObject, *m_renderer, m_lineTop, m_lineBottom)) { |
|
adamk
2014/03/04 19:45:05
Same comment here as above, an ASSERT(floatingObje
|
| if (!shapeOutside->lineOverlapsShape()) |
| return false; |