Skip to content

Commit 041cb3c

Browse files
committed
try to get rid of using the js peer
1 parent e591a5a commit 041cb3c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/org/htmlunit/css/ComputedCssStyleDeclaration.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@
136136
import org.htmlunit.html.HtmlUnknownElement;
137137
import org.htmlunit.html.HtmlVariable;
138138
import org.htmlunit.html.HtmlWordBreak;
139-
import org.htmlunit.javascript.host.html.HTMLElement;
140139
import org.htmlunit.platform.Platform;
141140

142141
/**
@@ -758,8 +757,7 @@ public String getHeight() {
758757
.pixelString(elem, new CssPixelValueConverter.CssValue(0, windowHeight) {
759758
@Override
760759
public String get(final ComputedCssStyleDeclaration style) {
761-
// TODO don't reach out to the js peer
762-
final String offsetHeight = ((HTMLElement) elem.getScriptableObject()).getOffsetHeight() + "px";
760+
final String offsetHeight = style.getCalculatedHeight(true, true) + "px";
763761
return defaultIfEmpty(style.getStyleAttribute(Definition.HEIGHT, true), offsetHeight, AUTO);
764762
}
765763
});

0 commit comments

Comments
 (0)