if (box.getBlockFormattingContext() != null) { bfc = box.getBlockFormattingContext();
if (box.getPersistentBFC() != null) { bfc = new BlockFormattingContext(box.getPersistentBFC());
    public static Box findElementBox(Box box, int x, int y,                              BlockFormattingContext bfc) {//TODO: why is this used? 								  //A better way? should be in a render util?		//Uu.p("find element box: " + x + " " + y + " " + box + " " + bfc);        if (box == null) {            return null;        }        // go down to the next bfc        if (box.getBlockFormattingContext() != null) {            bfc = box.getBlockFormattingContext();        }				// test if the point is within the box at all		if(!box.contains(x,y) && !box.isChildrenExceedBounds()) {			//System.out.println("it's outside: " + box + " " + x + " " + y);			if(box.element != null) {				//System.out.println(box.element.getNodeName());			}			return null;		}				if(box.element != null) {			Uu.p(box.element.getNodeName());		}        // loop through the children first        Iterator it = box.getChildIterator();        while (it.hasNext()) {            Box bx = (Box) it.next();			Uu.p("box = " + bx);            int tx = x;            int ty = y;			//Uu.p("tx = " + tx + "," + ty);            tx -= bx.x;			//Uu.p("tx = " + tx + "," + ty);            tx -= bx.tx;			//Uu.p("tx = " + tx + "," + ty);            ty -= bx.y;            ty -= bx.ty;            if (bx.absolute) {				Uu.p("abs");                int[] adj = adjustForAbsolute(bx, tx, ty, bfc);                tx = adj[0];                ty = adj[1];            }			Uu.p("tx = " + tx + "," + ty);            // test the contents            Box retbox = null;			bfc.translate(bx.tx,bx.ty);            retbox = findElementBox(bx, tx, ty, bfc);			bfc.translate(-bx.tx,-bx.ty);            if (retbox != null) {                return retbox;            }                        // test the box itself                        // skip if it's text only so that we can            // hit the parent instead			            // skip line boxes            if (bx instanceof LineBox) {                continue;            }            int tty = y;            if (bx instanceof InlineBox) {                InlineBox ibx = (InlineBox) bx;                LineBox lbx = (LineBox) box;                int off = lbx.getBaseline() + ibx.y - ibx.height;//not really correct                tty -= off;            }            			Uu.p("x = " + x + " y = " + y + " tty = " + tty + " bx.x = " + bx.x + " bx.y = " + bx.y);			Uu.p("tx = " + tx + "," + ty);			if(bfc != null) {				tx = x - bfc.getX();				ty = tty - bfc.getY();			}            Uu.p("tx = " + tx + "," + ty);			//if (bx.contains(tx-bx.x,ty-bx.y)) {//x - bx.x, tty - bx.y)) {			if(bx.contains(x-bx.x,tty-bx.y)) {					//TODO: if this is InlineBox, we need to find the first previous sibling with a pushStyle				Uu.p("found: " + bx);                return bx;            }        }        return null;    }