Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jridgewell committed Jan 10, 2019
1 parent 573a2e8 commit 79c2164
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/service/viewport/viewport-binding-ios-embed-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ export class ViewportBindingIosEmbedWrapper_ {
/** @private @const {boolean} */
this.useLayers_ = isExperimentOn(this.win, 'layers');

/** @private {number} */
this.paddingTop_ = 0;

// Setup UI.
/** @private {boolean} */
this.setupDone_ = false;
Expand Down Expand Up @@ -165,6 +168,7 @@ export class ViewportBindingIosEmbedWrapper_ {

/** @override */
updatePaddingTop(paddingTop) {
this.paddingTop_ = paddingTop;
setImportantStyles(this.wrapper_, {
'padding-top': px(paddingTop),
});
Expand Down Expand Up @@ -234,11 +238,11 @@ export class ViewportBindingIosEmbedWrapper_ {

/** @override */
getContentHeight() {
const scrollingElement = this.wrapper_;
const scrollingElement = this.win.document.body;
const rect = scrollingElement./*OK*/getBoundingClientRect();
const style = getComputedStyle(scrollingElement);
return rect.height
+ this.getBorderTop()
+ this.paddingTop_
+ parseInt(style.marginTop, 10)
+ parseInt(style.marginBottom, 10);
}
Expand Down

0 comments on commit 79c2164

Please sign in to comment.