コード例 #1
0
// FIXME: The entire concept of the skipTrailingWhitespace function is flawed, since we really need to be building
// line boxes even for containers that may ultimately collapse away. Otherwise we'll never get positioned
// elements quite right. In other words, we need to build this function's work into the normal line
// object iteration process.
// NB. this function will insert any floating elements that would otherwise
// be skipped but it will not position them.
void LineBreaker::skipTrailingWhitespace(InlineIterator& iterator, const LineInfo& lineInfo)
{
    while (!iterator.atEnd() && !requiresLineBox(iterator, lineInfo, TrailingWhitespace)) {
        RenderObject& object = *iterator.renderer();
        if (object.isOutOfFlowPositioned())
            setStaticPositions(m_block, downcast<RenderBox>(object));
        else if (object.isFloating())
            m_block.insertFloatingObject(downcast<RenderBox>(object));
        iterator.increment();
    }
}
コード例 #2
0
LineSegmentRange::LineSegmentRange(const InlineIterator& start, const InlineIterator& end)
    : start(start.root(), start.renderer(), start.offset())
    , end(end.root(), end.renderer(), end.offset())
    {
    }