Skip to content

Add window.open popup feature and BarProp.visible value update - #13322

Merged
ddbeck merged 1 commit into
mdn:mainfrom
arai-a:window-open-popup
Nov 30, 2021
Merged

ddbeck merged 1 commit into
mdn:mainfrom
arai-a:window-open-popup

Conversation

@arai-a

@arai-a arai-a commented Nov 7, 2021 •

Copy link
Copy Markdown
Contributor

for whatwg/html#6530

Summary

Add browser compat data for updated windowFeatures parameter behavior for window.open, and also BarProp.visible behavior, from the spec change in whatwg/html#6530.

Test results and supporting details

The behavior is tested by web-platform-tests/wpt#28243

Firefox: fixed in 96 (currently Nightly) https://bugzilla.mozilla.org/show_bug.cgi?id=1701001
Chrome: fixed in 98 (current Canary) https://bugs.chromium.org/p/chromium/issues/detail?id=1192701
Safari: bug is filed https://bugs.webkit.org/show_bug.cgi?id=223751

Related issues

@github-actions github-actions Bot added the data:api Compatibility data for Web API features. https://developer.mozilla.org/docs/Web/API label Nov 7, 2021
@arai-a
arai-a force-pushed the window-open-popup branch 3 times, most recently from 9d443cb to 5bbb274 Compare November 7, 2021 01:38

@ddbeck ddbeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for starting this PR, @arai-a. I don't completely understand this change, so I've got a few line comments to get a conversation started on how best to represent this information. Thank you again!

Comment thread api/BarProp.json Outdated
"deprecated": false
}
},
"is_popup": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I can't find this in the IDL for the BarProp interface, which makes me think this is not actually exposed to web developers directly. Instead, it seems to change the value of visible. Is that right?

If it is, I think the right way to go is to characterize this is as a change in the way visible works, rather than introducing a new feature entry here. I'm not sure how best to represent this change in Firefox 96, however. I think the core question is: before Firefox 96, what did visible return and what does it return from 96?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, the change is the value of visible.

https://html.spec.whatwg.org/multipage/window-object.html#dom-barprop-visible

The change is that:

  • before Firefox 96, BarProp.value was returning the actual visibility of each UI part (toolbar, menubar, etc), with exceptions that scrollbars.visible is always true
  • after Firefox 96, BarProp.value returns the negation of "is popup" of the top-level browsing context, regardless of the actual visibility of each UI parts

"is popup" of the top-level browsing context defaults to false, and is calculated from features parameter of window.open.

currently other browsers return different value for each, for BarProp.value.
Safari also returns the actual visibility of each UI parts, but with yet another exceptions.
Chrome returns whether each UI parts are enabled in features parameters of window.open, regardless of the actual UI parts visibility.

Comment thread api/Window.json Resolved
Comment thread api/Window.json Resolved
@arai-a
arai-a requested a review from ddbeck November 22, 2021 02:31

@ddbeck ddbeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the follow up, @arai-a. A couple of suggestions for you, but we're nearly there.

Comment thread api/BarProp.json Resolved
Comment thread api/BarProp.json Resolved
@arai-a
arai-a force-pushed the window-open-popup branch 2 times, most recently from 31d1822 to ecefec6 Compare November 30, 2021 12:37
@arai-a

arai-a commented Nov 30, 2021

Copy link
Copy Markdown
Contributor Author

oh, wait, chromium have implemented this feature as well. so I'll reflect the change here.
give me a moment to gather information

@arai-a

arai-a commented Nov 30, 2021

Copy link
Copy Markdown
Contributor Author

Also, given now that 2 browsers have implemented and it's in the spec itself, I think it's fine to flip "experimental" to false

@arai-a

arai-a commented Nov 30, 2021

Copy link
Copy Markdown
Contributor Author
  • Reflected chromium/edge support, from 98
  • Flipped experimental to false

https://groups.google.com/a/chromium.org/g/blink-dev/c/q6ybnmxxvpE

Estimated milestones
M98

@ddbeck ddbeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Thank you! 🎉

@ddbeck
ddbeck merged commit 639cea7 into mdn:main Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:api Compatibility data for Web API features. https://developer.mozilla.org/docs/Web/API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants