Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 307621
Collapse All | Expand All

(-)file_not_specified_in_diff (-11 / +27 lines)
Line  Link Here
0
-- trunk/KDE/kdelibs/khtml/rendering/render_block.cpp  2010/01/28 10:28:10     1081434
0
++ trunk/KDE/kdelibs/khtml/rendering/render_block.cpp  2010/01/28 10:28:19     1081435
Lines 2697-2713 Link Here
2697
            break;
2697
            break;
2698
    }
2698
    }
2699
2699
2700
    // We also clear floats if we are too big to sit on the same line as a float, and happen to flow around floats.
2700
    // We also clear floats if we are too big to sit on the same line as
2701
    // FIXME: Note that the remaining space checks aren't quite accurate, since you should be able to clear only some floats (the minimum # needed
2701
    // a float, and happen to flow around floats.
2702
    // to fit) and not all (we should be using nearestFloatBottom and looping).
2703
    int result = clearSet ? qMax(0, bottom - yPos) : 0;
2702
    int result = clearSet ? qMax(0, bottom - yPos) : 0;
2704
    if (!result && child->flowAroundFloats() && !style()->width().isAuto()) {
2703
    if (!result && child->flowAroundFloats()) {
2705
        bool canClearLine;
2704
        bool canClear = true;
2706
        int lw = lineWidth(yPos, &canClearLine);
2705
        bool needsRecalc = child->usesLineWidth();
2707
        if (((child->style()->width().isPercent() && child->width() > lw) ||
2706
        int cury = yPos;
2708
            (child->style()->width().isFixed() && child->minWidth() > lw)) &&
2707
        int childw = 0;
2709
              child->minWidth() <= availableWidth() && canClearLine)
2708
        int aw = availableWidth();
2710
            result = qMax(0, floatBottom() - yPos);
2709
        while (true) {
2710
            int curw = lineWidth(cury, &canClear);
2711
            if (!canClear || curw == aw)
2712
                return cury-yPos;
2713
            if (!childw || needsRecalc) {
2714
                int oy = child->yPos();
2715
                int ow = child->width();
2716
                child->setPos(child->xPos(), cury);
2717
                child->calcWidth();
2718
                childw = child->width();
2719
                child->setPos(child->xPos(), oy);
2720
                child->setWidth(ow);
2721
            }
2722
            if (childw <= curw)
2723
                return cury-yPos;
2724
            if (!(cury = nearestFloatBottom(cury)))
2725
                return 0;
2726
        }
2711
    }
2727
    }
2712
    return result;
2728
    return result;
2713
}
2729
}

Return to bug 307621