private long computeRowPosition(final RenderNode node) { // The y-position of a box depends on the parent. final RenderBox parent = node.getParent(); // A table row is something special. Although it is a block box, // it layouts its children from left to right if (parent == null) { // there's no parent .. return 0; } final RenderNode prev = node.getPrev(); if (prev != null) { // we have a sibling. Position yourself directly to the right of your sibling .. return prev.getCachedX() + prev.getCachedWidth(); } else { return nodeContext.getParentX1(); } }