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

Allow ignoring position or dimensions in set window rect #1830

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

jgraham
Copy link
Member

@jgraham jgraham commented Jul 16, 2024

Previously it was unclear if it was acceptable to return without error from set window rect if the implementation is unable to set some of the properties.

This updates the spec so that:

  • It's unambiguously OK to run the command even if you don't support some aspects of the functionality on the current platform / configuration (you are expected to continue to return an error if you don't support any aspect of the functionality).

  • It's clear that both position and dimension properties are best effort, and even if you are able to adjust them there's no guarantee that you get the exact requested values.

  • It's clear what to do if you get just an x coordinate but not y, or just width but not height, or vice-versa. Previously this was undefined.


Preview | Diff

Previously it was unclear if it was acceptable to return without error
from set window rect if the implementation is unable to set some of
the properties.

This updates the spec so that:

* It's unambiguously OK to run the command even if you don't support
some aspects of the functionality on the current platform /
configuration (you are expected to continue to return an error if you
don't support any aspect of the functionality).

* It's clear that both position and dimension properties are best
effort, and even if you are able to adjust them there's no guarantee
that you get the exact requested values.

* It's clear what to do if you get just an x coordinate but not y, or
just width but not height, or vice-versa. Previously this was undefined.
Copy link
Contributor

@whimboo whimboo left a comment

Choose a reason for hiding this comment

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

Thanks James! The changes look good to me.

@whimboo whimboo requested a review from gsnedders July 16, 2024 09:39
@OrKoN
Copy link
Contributor

OrKoN commented Jul 16, 2024

cc @nechaev-chromium

@jgraham jgraham merged commit bb939cc into master Jul 17, 2024
2 checks passed
@jgraham jgraham deleted the set_window_rect branch July 17, 2024 10:35
@jgraham
Copy link
Member Author

jgraham commented Jul 17, 2024

After merging this I noticed we have some uniformly passing tests that assume that input like {x: 200} is just silently ignored rather than either producing an error or setting the x-coordinate to 200 (where possible). Silently ignoring broken input seems like bad design, but I guess I should revert that part on the basis that's the defacto behviour.

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 this pull request may close these issues.

3 participants