| Index: Source/core/layout/LayoutBlockFlow.cpp
|
| diff --git a/Source/core/layout/LayoutBlockFlow.cpp b/Source/core/layout/LayoutBlockFlow.cpp
|
| index a834704f4aab72257e8a659a615eb575972ba931..8dd973bf8d1c41917ee1f604a178d51012ac365d 100644
|
| --- a/Source/core/layout/LayoutBlockFlow.cpp
|
| +++ b/Source/core/layout/LayoutBlockFlow.cpp
|
| @@ -1824,7 +1824,7 @@
|
| return newLogicalTop - logicalTop;
|
| }
|
|
|
| - newLogicalTop = nextFloatLogicalBottomBelowForBlock(newLogicalTop);
|
| + newLogicalTop = nextFloatLogicalBottomBelow(newLogicalTop);
|
| ASSERT(newLogicalTop >= logicalTop);
|
| if (newLogicalTop < logicalTop)
|
| break;
|
| @@ -2522,19 +2522,29 @@
|
| return m_floatingObjects->lowestFloatLogicalBottom(floatType);
|
| }
|
|
|
| -LayoutUnit LayoutBlockFlow::nextFloatLogicalBottomBelow(LayoutUnit logicalHeight) const
|
| +LayoutUnit LayoutBlockFlow::nextFloatLogicalBottomBelow(LayoutUnit logicalHeight, ShapeOutsideFloatOffsetMode offsetMode) const
|
| {
|
| if (!m_floatingObjects)
|
| return logicalHeight;
|
| - return m_floatingObjects->findNextFloatLogicalBottomBelow(logicalHeight);
|
| -}
|
| -
|
| -LayoutUnit LayoutBlockFlow::nextFloatLogicalBottomBelowForBlock(LayoutUnit logicalHeight) const
|
| -{
|
| - if (!m_floatingObjects)
|
| - return logicalHeight;
|
| -
|
| - return m_floatingObjects->findNextFloatLogicalBottomBelowForBlock(logicalHeight);
|
| +
|
| + LayoutUnit logicalBottom;
|
| + const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
|
| + FloatingObjectSetIterator end = floatingObjectSet.end();
|
| + for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++it) {
|
| + const FloatingObject& floatingObject = *it->get();
|
| + LayoutUnit floatLogicalBottom = logicalBottomForFloat(floatingObject);
|
| + ShapeOutsideInfo* shapeOutside = floatingObject.layoutObject()->shapeOutsideInfo();
|
| + if (shapeOutside && (offsetMode == ShapeOutsideFloatShapeOffset)) {
|
| + LayoutUnit shapeLogicalBottom = logicalTopForFloat(floatingObject) + marginBeforeForChild(*floatingObject.layoutObject()) + shapeOutside->shapeLogicalBottom();
|
| + // Use the shapeLogicalBottom unless it extends outside of the margin box, in which case it is clipped.
|
| + if (shapeLogicalBottom < floatLogicalBottom)
|
| + floatLogicalBottom = shapeLogicalBottom;
|
| + }
|
| + if (floatLogicalBottom > logicalHeight)
|
| + logicalBottom = logicalBottom ? std::min(floatLogicalBottom, logicalBottom) : floatLogicalBottom;
|
| + }
|
| +
|
| + return logicalBottom;
|
| }
|
|
|
| bool LayoutBlockFlow::hitTestFloats(HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset)
|
|
|