[fxtf-drafts] [geometry] DOMRect could be clearer about the sign of contained zeroes

dirkschulze has just created a new issue for https://github.com/w3c/fxtf-drafts:

== [geometry] DOMRect could be clearer about the sign of contained zeroes ==
Reported by Jeff Walden on https://www.w3.org/Bugs/Public/show_bug.cgi?id=28919:

>Aside from explicitly noting that width/height may be negative, the spec is silent as to the sign of any particular attribute when that >attribute is zero, for get
>
>Presumably because of the DOMRect constructor lets you create a DOMRect with arbitrary x/y/width/height, you can have -0 for anything.  If so, >it seems like it might be best to explicitly note that any field might be -0.
>
>Additionally, because the language defining a Rect's origin introduces a sharp distinction for negative/non-negative width/height -- "When the >rectangle has a non-negative width dimension, the rectangle’s horizontal origin is the left edge; otherwise, it is the right edge." and >mutatis mutandis for height -- that language could use evaluation in light of -0, too.
>
>I...somewhat think this all is distinct from the presence of -0, as described by users of DOMRect.  I also filed >https://www.w3.org/Bugs/Public/show_bug.cgi?id=28918 for the getBoundingClientRect()/getClientRects() side of the -0 question.

Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/272 using your GitHub account

Received on Sunday, 15 April 2018 17:38:00 UTC