LayoutUnit ShapeInsideInfo::computeFirstFitPositionForFloat(const FloatSize& floatSize) const { if (!computedShape() || !floatSize.width() || shapeLogicalBottom() < logicalLineTop()) return 0; LayoutUnit firstFitPosition = 0; if (computedShape()->firstIncludedIntervalLogicalTop(m_shapeLineTop, floatSize, firstFitPosition) && (m_shapeLineTop <= firstFitPosition)) return firstFitPosition; return 0; }
bool ExclusionShapeInsideInfo::adjustLogicalLineTop(float minSegmentWidth) { const ExclusionShape* shape = computedShape(); if (!shape || m_lineHeight <= 0 || logicalLineTop() > shapeLogicalBottom()) return false; LayoutUnit newLineTop; if (shape->firstIncludedIntervalLogicalTop(m_shapeLineTop, LayoutSize(minSegmentWidth, m_lineHeight), newLineTop)) { if (newLineTop > m_shapeLineTop) { m_shapeLineTop = newLineTop; return true; } } return false; }