setAbsY(_staticEquivalent.getAbsY());
}
}
public void positionAbsolute(CssContext cssCtx, int direction) {
CalculatedStyle style = getStyle();
Rectangle boundingBox = null;
int cbContentHeight = getContainingBlock().getContentAreaEdge(0, 0, cssCtx).height;
if (getContainingBlock() instanceof BlockBox) {
boundingBox = getContainingBlock().getPaddingEdge(0, 0, cssCtx);
} else {
boundingBox = getContainingBlock().getContentAreaEdge(0, 0, cssCtx);
}
if ((direction & POSITION_HORIZONTALLY) != 0) {
setX(0);
if (!style.isIdent(CSSName.LEFT, IdentValue.AUTO)) {
setX((int) style.getFloatPropertyProportionalWidth(CSSName.LEFT, getContainingBlock().getContentWidth(), cssCtx));
} else if (!style.isIdent(CSSName.RIGHT, IdentValue.AUTO)) {
setX(boundingBox.width -
(int) style.getFloatPropertyProportionalWidth(CSSName.RIGHT, getContainingBlock().getContentWidth(), cssCtx) - getWidth());
}
setX(getX() + boundingBox.x);
}
if ((direction & POSITION_VERTICALLY) != 0) {
setY(0);
if (!style.isIdent(CSSName.TOP, IdentValue.AUTO)) {
setY((int) style.getFloatPropertyProportionalHeight(CSSName.TOP, cbContentHeight, cssCtx));
} else if (!style.isIdent(CSSName.BOTTOM, IdentValue.AUTO)) {
setY(boundingBox.height -
(int) style.getFloatPropertyProportionalWidth(CSSName.BOTTOM, cbContentHeight, cssCtx) - getHeight());
}
// Can't do this before now because our containing block
// must be completed layed out
int pinnedHeight = calcPinnedHeight(cssCtx);