This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28919 - DOMRect could be clearer about the sign of contained zeroes
Summary: DOMRect could be clearer about the sign of contained zeroes
Status: RESOLVED MOVED
Alias: None
Product: FXTF
Classification: Unclassified
Component: Geometry (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Simon Pieters
QA Contact: sideshowbarker+geometry
URL: http://dev.w3.org/fxtf/geometry/#DOMRect
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-06 19:39 UTC by Jeff Walden (remove +w3 to email)
Modified: 2018-04-15 17:38 UTC (History)
3 users (show)

See Also:


Attachments

Description Jeff Walden (remove +w3 to email) 2015-07-06 19:39:24 UTC
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.
Comment 1 Dirk Schulze 2018-04-15 17:38:11 UTC
https://github.com/w3c/fxtf-drafts/issues/272