-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add disallowPositionReuse #119
Add disallowPositionReuse #119
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it could be useful to include a note after steps 12 and 13 of the requestWindow(options) method steps, saying something along the lines of "if the website says disallowPositionReuse, then you might want to not do that"
+1 to adding a note. However, 12 and 13 don't mention bounds caching at all. i'll add some text that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: https://wicg.github.io/document-picture-in-picture/ spec is still showing allowReturnToOpener
, not disallowReturnToOpener
. @steimelchrome I assume https://github.com/WICG/document-picture-in-picture/actions/runs/8284843825/job/22671289688 is the culprit one. Can you fix it?
Good catch. I re-ran the failed job and it should be fixed now |
nit: Please consider if rephrasing in the positive might be clearer. For example, |
Defaulting to true was avoided on purpose. See #115 (comment) |
Would using an enum be a valid way of sidestepping that? |
An enum would let us specify a default value, but it feels like cheating a bit if it's just a boolean in disguise. I don't know if we ever plan to have multiple options for this.
I agree that the original name |
If the guidance were against booleans in an of themselves, yes, that'd have been cheating. But since the problem stated was with auto-conversion of |
i'm fairly new at spec-land, so i'll not have too strong an opinion on booleans vs enums. If we go the enum route, If we stay with the boolean, maybe |
If precedents are useful, btw, here is a case where we have four enums (as of the time of writing) that are all just |
After some thought, i decided to go with I considered an enum, but couldn't come up with a case where we'd want more than two options (640k is enough!), and As an aside, I expect that we'll have another option to describe how initial window placement should work ("upper left"), so "prefer initial" as a boolean fits pretty well into that. |
Add `preferInitialWindowPlacement` to DocumentPictureInPictureOptions to provide a hint to the UA that the bounds of any previously opened pip window probably shouldn't be re-used. See WICG/document-picture-in-picture#119 and https://chromestatus.com/feature/5183881532932096 for more details. Change-Id: I3c3cf468046f4e08cbedbde93532e4b34e12a29a Bug: 312495380
Add `preferInitialWindowPlacement` to DocumentPictureInPictureOptions to provide a hint to the UA that the bounds of any previously opened pip window probably shouldn't be re-used. See WICG/document-picture-in-picture#119 and https://chromestatus.com/feature/5183881532932096 for more details. Change-Id: I3c3cf468046f4e08cbedbde93532e4b34e12a29a Bug: 312495380 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5608743 Reviewed-by: Philip Rogers <[email protected]> Commit-Queue: Frank Liberato <[email protected]> Reviewed-by: Tommy Steimel <[email protected]> Auto-Submit: Frank Liberato <[email protected]> Cr-Commit-Position: refs/heads/main@{#1328934}
Add `preferInitialWindowPlacement` to DocumentPictureInPictureOptions to provide a hint to the UA that the bounds of any previously opened pip window probably shouldn't be re-used. See WICG/document-picture-in-picture#119 and https://chromestatus.com/feature/5183881532932096 for more details. Change-Id: I3c3cf468046f4e08cbedbde93532e4b34e12a29a Bug: 312495380 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5608743 Reviewed-by: Philip Rogers <[email protected]> Commit-Queue: Frank Liberato <[email protected]> Reviewed-by: Tommy Steimel <[email protected]> Auto-Submit: Frank Liberato <[email protected]> Cr-Commit-Position: refs/heads/main@{#1328934}
Add `preferInitialWindowPlacement` to DocumentPictureInPictureOptions to provide a hint to the UA that the bounds of any previously opened pip window probably shouldn't be re-used. See WICG/document-picture-in-picture#119 and https://chromestatus.com/feature/5183881532932096 for more details. Change-Id: I3c3cf468046f4e08cbedbde93532e4b34e12a29a Bug: 312495380 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5608743 Reviewed-by: Philip Rogers <[email protected]> Commit-Queue: Frank Liberato <[email protected]> Reviewed-by: Tommy Steimel <[email protected]> Auto-Submit: Frank Liberato <[email protected]> Cr-Commit-Position: refs/heads/main@{#1328934}
Add `preferInitialWindowPlacement` to DocumentPictureInPictureOptions to provide a hint to the UA that the bounds of any previously opened pip window probably shouldn't be re-used. See WICG/document-picture-in-picture#119 and https://chromestatus.com/feature/5183881532932096 for more details. Change-Id: I3c3cf468046f4e08cbedbde93532e4b34e12a29a Bug: 312495380 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5608743 Reviewed-by: Philip Rogers <[email protected]> Commit-Queue: Frank Liberato <[email protected]> Reviewed-by: Tommy Steimel <[email protected]> Auto-Submit: Frank Liberato <[email protected]> Cr-Commit-Position: refs/heads/main@{#1328934}
…stonly Automatic update from web-platform-tests [pip] preferInitialWindowPlacement Add `preferInitialWindowPlacement` to DocumentPictureInPictureOptions to provide a hint to the UA that the bounds of any previously opened pip window probably shouldn't be re-used. See WICG/document-picture-in-picture#119 and https://chromestatus.com/feature/5183881532932096 for more details. Change-Id: I3c3cf468046f4e08cbedbde93532e4b34e12a29a Bug: 312495380 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5608743 Reviewed-by: Philip Rogers <[email protected]> Commit-Queue: Frank Liberato <[email protected]> Reviewed-by: Tommy Steimel <[email protected]> Auto-Submit: Frank Liberato <[email protected]> Cr-Commit-Position: refs/heads/main@{#1328934} -- wpt-commits: e8d28702c3fdb25e0e049f60a258b56bdce673ea wpt-pr: 47178
…stonly Automatic update from web-platform-tests [pip] preferInitialWindowPlacement Add `preferInitialWindowPlacement` to DocumentPictureInPictureOptions to provide a hint to the UA that the bounds of any previously opened pip window probably shouldn't be re-used. See WICG/document-picture-in-picture#119 and https://chromestatus.com/feature/5183881532932096 for more details. Change-Id: I3c3cf468046f4e08cbedbde93532e4b34e12a29a Bug: 312495380 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5608743 Reviewed-by: Philip Rogers <[email protected]> Commit-Queue: Frank Liberato <[email protected]> Reviewed-by: Tommy Steimel <[email protected]> Auto-Submit: Frank Liberato <[email protected]> Cr-Commit-Position: refs/heads/main@{#1328934} -- wpt-commits: e8d28702c3fdb25e0e049f60a258b56bdce673ea wpt-pr: 47178
…stonly Automatic update from web-platform-tests [pip] preferInitialWindowPlacement Add `preferInitialWindowPlacement` to DocumentPictureInPictureOptions to provide a hint to the UA that the bounds of any previously opened pip window probably shouldn't be re-used. See WICG/document-picture-in-picture#119 and https://chromestatus.com/feature/5183881532932096 for more details. Change-Id: I3c3cf468046f4e08cbedbde93532e4b34e12a29a Bug: 312495380 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5608743 Reviewed-by: Philip Rogers <[email protected]> Commit-Queue: Frank Liberato <[email protected]> Reviewed-by: Tommy Steimel <[email protected]> Auto-Submit: Frank Liberato <[email protected]> Cr-Commit-Position: refs/heads/main@{#1328934} -- wpt-commits: e8d28702c3fdb25e0e049f60a258b56bdce673ea wpt-pr: 47178
Add `preferInitialWindowPlacement` to DocumentPictureInPictureOptions to provide a hint to the UA that the bounds of any previously opened pip window probably shouldn't be re-used. See WICG/document-picture-in-picture#119 and https://chromestatus.com/feature/5183881532932096 for more details. Change-Id: I3c3cf468046f4e08cbedbde93532e4b34e12a29a Bug: 312495380 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5608743 Reviewed-by: Philip Rogers <[email protected]> Commit-Queue: Frank Liberato <[email protected]> Reviewed-by: Tommy Steimel <[email protected]> Auto-Submit: Frank Liberato <[email protected]> Cr-Commit-Position: refs/heads/main@{#1328934}
A UA is free to select a position and size for a document PiP window that does not conform to the size requested by the site with
requestWindow()
. A typical use is to allow user resizes to take precedence if a PiP window is closed and reopened later by the same site, so that the user's preference takes precedence.This change adds the
disallowPositionReuse
flag to notify the user agent that this PiP window is semantically unrelated to the previous one, so ignoring the most recent user-selected size might be more appropriate, as if this were the first PiP window opened by the site.