Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure safeframe geom matches gpt #13830

Merged
merged 2 commits into from Mar 6, 2018
Merged

Make sure safeframe geom matches gpt #13830

merged 2 commits into from Mar 6, 2018

Conversation

bradfrizzell
Copy link
Contributor

@bradfrizzell bradfrizzell commented Mar 6, 2018

There was a mismatch between $sf.ext.geom().self on AMP pages and non-AMP pages. This should fix that.

On AMP pages, self was being measured relative to the top of the viewport. However, on non-amp pages self is measured relative to the top of the page.

Copy link
Contributor

@warrengm warrengm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate on the mismatch between AMP and DFP host implementations?

@@ -218,6 +218,13 @@ describes.realWin('DoubleClick Fast Fetch - Safeframe', realWinConfig, env => {
});

it('should get current geometry when safeframe fills amp-ad', () => {
sandbox./*OK*/stub(safeframeHost.baseInstance_,
'getPageLayoutBox').returns({
top: 0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update this to return a different value than iframeBox? As it is, the asserts won't fail if you reverted the changes in safeframe-host.js.

Same for other tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@keithwrightbos keithwrightbos merged commit 5654683 into master Mar 6, 2018
RanAbram pushed a commit to RanAbram/amphtml that referenced this pull request Mar 12, 2018
* Make sure safeframe geom matches gpt

* Respond to feedback
@bradfrizzell bradfrizzell deleted the frizz-sf-fix branch April 12, 2018 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants