From c0f828ba303b0f6704ee87a78381a15aa649f7d0 Mon Sep 17 00:00:00 2001 From: James Graham Date: Wed, 17 Jul 2024 13:53:51 +0100 Subject: [PATCH 1/2] Fix some small problems with set window rect changes * Restore handling both missing and null values for parameters. * Fix some grammar errors. --- index.html | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/index.html b/index.html index 7d92a662..0b26bd59 100644 --- a/index.html +++ b/index.html @@ -4046,28 +4046,39 @@

Set Window Rect

getting a property named "width" from parameters. +
  • If width is undefined let width + be null. +

  • Let height be the result of getting a property named "height" from parameters. +

  • If height is undefined let height + be null. +

  • Let x be the result of getting a property named "x" from parameters. +

  • If x is undefined let x be null. +

  • Let y be the result of getting a property named "y" from parameters. -

  • If width or height is neither undefined - nor a Number from 0 to 231 − 1, - return error with error code invalid argument. +

  • If y is undefined let y be null. -

  • If x or y is neither undefined - nor a Number from −(231) to 231 − 1, +

  • If width or height is neither null, nor + a Number from 0 to 231 − 1, return error + with error code invalid argument. + +

  • If x or y is neither null, nor + a Number from −(231) to 231 − 1, return error with error code invalid argument.

  • If the remote end does not support the Set Window Rect command for - session's current top-level browsing context for any reason, - return error with error code unsupported operation. + session's current top-level browsing context + for any reason, return error with error + code unsupported operation.

    In case the Set Window Rect command is partially supported (i.e. some combinations of arguments are @@ -4092,12 +4103,12 @@

    Set Window Rect

    of window:
      -
    1. If width is not undefined, set the width, +

    2. If width is not null, set the width, in CSS pixels, of window, including any browser chrome and externally drawn window decorations, to a value that is as close as possible to width. -

    3. If height is not undefined, set the height, +

    4. If height is not null, set the height, in CSS pixels, of window, including any browser chrome and externally drawn window decorations, to a value that is as close as possible to height. @@ -4127,13 +4138,13 @@

      Set Window Rect

    5. If the implementation is able to set the position of window:

        -
      1. If x is not undefined, run specific - steps set the x-coordinate of the left edge of window - to a value that is as close as possible to x. +

      2. If x is not null, set the x-coordinate of the + left edge of window to a value that is as close as + possible to x. -

      3. If y is not undefined, run specific - steps set the y-coordinate of the top edge of window to - a value that is as close as possible to y. +

      4. If y is not null, set the y-coordinate of the top + edge of window to a value that is as close as possible + to y.