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

Should window.visualViewport be null if there's no associated browsing context? #51

Closed
alijuma opened this issue Nov 16, 2017 · 1 comment · Fixed by #53
Closed

Should window.visualViewport be null if there's no associated browsing context? #51

alijuma opened this issue Nov 16, 2017 · 1 comment · Fixed by #53

Comments

@alijuma
Copy link

alijuma commented Nov 16, 2017

Several Window APIs currently return null when there's no associated browsing context (e.g., this happens when we have a window object corresponding to an iframe element that has been removed from the DOM). See calls to "IsCurrentlyDisplayedInFrame" in LocalDOMWindow.cpp in Blink for examples.

Should window.visualViewport behave the same way? Currently in Blink, it's non-null even when there's no associated browsing context, but the question of whether it should really be null came up in a WebKit code review: https://bugs.webkit.org/show_bug.cgi?id=179385#c7

@bokand
Copy link
Collaborator

bokand commented Nov 16, 2017

Yeah, it doesn't make much sense to return a visualViewport for a detached iframe. We already return 0 for all the DOMVisualViewport accessors in that case. I'll make the change in Blink and add that to the spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants