if (currentBounds.y >= lastBounds.y && currentBounds.y < lastBounds.y + lastBounds.width) {
if (currentBounds.y >= lastBounds.y && currentBounds.y < lastBounds.y + lastBounds.height) {
    private void alignToLastFloat(CssContext cssCtx,             BlockFormattingContext bfc, FloatedBlockBox current, int direction) {                List floats = getFloats(direction);        if (floats.size() > 0) {            Point offset = bfc.getOffset();            FloatedBlockBox last = (FloatedBlockBox)floats.get(floats.size()-1);                        Rectangle currentBounds = current.getBounds(cssCtx, -offset.x, -offset.y);                        Point lastOffset = getOffset(last);            Rectangle lastBounds = last.getBounds(cssCtx, -lastOffset.x, -lastOffset.y);                        boolean moveOver = false;                        if (currentBounds.y < lastBounds.y) {                currentBounds.translate(0, lastBounds.y - currentBounds.y);                moveOver = true;            }                        if (currentBounds.y >= lastBounds.y && currentBounds.y < lastBounds.y + lastBounds.width) {                moveOver = true;            }                        if (moveOver) {                if (direction == LEFT) {                    currentBounds.x = lastBounds.x + last.getWidth();                } else if (direction == RIGHT) {                    currentBounds.x = lastBounds.x - current.getWidth();                }                                currentBounds.translate(offset.x, offset.y);                                current.x = currentBounds.x;                current.y = currentBounds.y;            }        }    }