inline void ComputeFloatOffsetAdapter<FloatTypeValue>::collectIfNeeded(const IntervalType& interval) { const FloatingObject* floatingObject = interval.data(); if (floatingObject->type() != FloatTypeValue || !rangesIntersect(interval.low(), interval.high(), m_lineTop, m_lineBottom)) return; // All the objects returned from the tree should be already placed. ASSERT(floatingObject->isPlaced()); ASSERT(rangesIntersect(m_renderer->pixelSnappedLogicalTopForFloat(floatingObject), m_renderer->pixelSnappedLogicalBottomForFloat(floatingObject), m_lineTop, m_lineBottom)); bool floatIsNewExtreme = updateOffsetIfNeeded(floatingObject); if (floatIsNewExtreme) m_outermostFloat = floatingObject; }
inline void FindNextFloatLogicalBottomAdapter::collectIfNeeded(const IntervalType& interval) { const auto& floatingObject = *interval.data(); if (!rangesIntersect(interval.low(), interval.high(), m_belowLogicalHeight, m_aboveLogicalHeight)) return; // All the objects returned from the tree should be already placed. ASSERT(floatingObject.isPlaced()); ASSERT(rangesIntersect(m_renderer.logicalTopForFloat(floatingObject), m_renderer.logicalBottomForFloat(floatingObject), m_belowLogicalHeight, m_aboveLogicalHeight)); LayoutUnit floatBottom = m_renderer.logicalBottomForFloat(floatingObject); if (m_nextLogicalBottom < floatBottom) return; if (ShapeOutsideInfo* shapeOutside = floatingObject.renderer().shapeOutsideInfo()) { LayoutUnit shapeBottom = m_renderer.logicalTopForFloat(floatingObject) + m_renderer.marginBeforeForChild(floatingObject.renderer()) + shapeOutside->shapeLogicalBottom(); // Use the shapeBottom unless it extends outside of the margin box, in which case it is clipped. m_nextShapeLogicalBottom = std::min(shapeBottom, floatBottom); } else m_nextShapeLogicalBottom = floatBottom; m_nextLogicalBottom = floatBottom; }
inline void ComputeFloatOffsetAdapter<FloatTypeValue>::collectIfNeeded(const IntervalType& interval) { const FloatingObject& floatingObject = *(interval.data()); if (floatingObject.type() != FloatTypeValue || !rangesIntersect(interval.low(), interval.high(), m_lineTop, m_lineBottom)) return; // Make sure the float hasn't changed since it was added to the placed floats tree. ASSERT(floatingObject.isPlaced()); ASSERT(interval.low() == m_layoutObject->pixelSnappedLogicalTopForFloat(floatingObject)); ASSERT(interval.high() == m_layoutObject->pixelSnappedLogicalBottomForFloat(floatingObject)); bool floatIsNewExtreme = updateOffsetIfNeeded(floatingObject); if (floatIsNewExtreme) m_outermostFloat = &floatingObject; }