* @return The computed y coordinate of the content rectangle.
*/
private int computeCrOriginY() {
// Start at the parent's content origin.
int y = ancestorArea().crOriginY();
final AbsoluteDirection bpd = getWritingMode().getBpDirection();
if (bpd == AbsoluteDirection.TOP_TO_BOTTOM) {
y -= this.crOriginBPDOffset();
return y;
}
if (bpd == AbsoluteDirection.BOTTOM_TO_TOP) {
y += this.crOriginBPDOffset();
return y;
}
final AbsoluteDirection ipOdd = getWritingMode().getIpDirectionOdd();
if (ipOdd == AbsoluteDirection.TOP_TO_BOTTOM) {
y -= this.crOriginIPDOffset();
return y;
}
if (ipOdd == AbsoluteDirection.RIGHT_TO_LEFT) {