Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4058,11 +4058,11 @@ <h4><dfn>Set Window Rect</dfn></h4>
<li><p>If <var>y</var> is <a>undefined</a>, let <var>y</var> be null.

<li><p>If <var>width</var> or <var>height</var> is neither null, nor
a <a>Number</a> from 0 to 2<sup>31</sup> − 1, return <a>error</a>
an integer from 0 to 2<sup>31</sup> − 1, return <a>error</a>
Copy link
Contributor

Choose a reason for hiding this comment

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

Good find. But lets take one more thing into account. In WebDriver BiDi we actually use a range from 0 to maximum safe integer. We probably should do the same here as well even though those high values won't be able to get applied. The same applies for x and y.

Copy link
Member Author

@yezhizhen yezhizhen Jul 7, 2025

Choose a reason for hiding this comment

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

In WebDriver BiDi we actually use a range from 0 to maximum safe integer.

Can you show a reference of this case in BiDi? I cannot find it anywhere.

I only see usage of "maximum safe integer" in Add Cookie/Timeout.

Copy link
Member Author

Choose a reason for hiding this comment

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

The same applies for x and y.

https://github.com/mozilla-firefox/firefox/blob/dc64a7e82ff4e2e31b7dafaaa0a9599640a2c87c/testing/webdriver/src/command.rs#L850-L861

Also it seems x and y can be negative? How would we phrase it if upper bound is maximum safe integer?

Copy link
Contributor

Choose a reason for hiding this comment

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

The CDDL definition uses https://w3c.github.io/webdriver-bidi/#cddl-type-js-uint. That's basically the maximum safe value. There is also js-int for the full range. In WebDriver classic see https://w3c.github.io/webdriver/#dfn-maximum-safe-integer.

with <a>error code</a> <a>invalid argument</a>.

<li><p>If <var>x</var> or <var>y</var> is neither null, nor
a <a>Number</a> from −(2<sup>31</sup>) to 2<sup>31</sup> − 1,
an integer from −(2<sup>31</sup>) to 2<sup>31</sup> − 1,
return <a>error</a> with <a>error code</a> <a>invalid argument</a>.

<li><p>If the <a>remote end</a> does not support
Expand Down