Returns this element's Y position. @return this element's Y position
()
| 1614 | * @return this element's Y position |
| 1615 | */ |
| 1616 | public int getPosY() { |
| 1617 | int cumulativeOffset = 0; |
| 1618 | final WebWindow webWindow = getPage().getEnclosingWindow(); |
| 1619 | |
| 1620 | HtmlElement element = this; |
| 1621 | while (element != null) { |
| 1622 | cumulativeOffset += element.getOffsetTop(); |
| 1623 | if (element != this) { |
| 1624 | final ComputedCssStyleDeclaration style = |
| 1625 | webWindow.getComputedStyle(element, null); |
| 1626 | cumulativeOffset += style.getBorderTopValue(); |
| 1627 | } |
| 1628 | element = element.getOffsetParentInternal(false); |
| 1629 | } |
| 1630 | |
| 1631 | return cumulativeOffset; |
| 1632 | } |
| 1633 | |
| 1634 | /** |
| 1635 | * {@inheritDoc} |
nothing calls this directly
no test coverage detected