- From: <bugzilla@jessica.w3.org>
- Date: Mon, 06 Jul 2015 19:17:53 +0000
- To: public-css-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28918
Bug ID: 28918
Summary: getClientRects() and getBoundingClientRect() need to
be clearer about when the returned DOMRect might
contain -0 anywhere
Product: CSS
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: CSSOM View
Assignee: simonp@opera.com
Reporter: jwalden+w3@mit.edu
QA Contact: public-css-bugzilla@w3.org
The CSSOM spec is unclear about what the sign of getBoundingClientRect().top
is, when that value is zero. Is -0 a possibility, or is +0 the only permitted
value? Could it be either, and if so, when should the different signs be
observed?
This issue applies to all the other fields of DOMRect, as well. The DOMRect
spec is clear that width/height can be negative, but that could just as easily
be because |new DOMRect| lets you create a rect with arbitrary numeric
components, as because of any real-world reason. And one could imagine that
"negative" observation to be motivated by "real" negative numbers, not -0.
This issue is pretty nitpickery, of course. But I raise it because I stumbled
across a Gecko test that inadvertently compared gBCR().top with -0. It passes
because it ignores the sign on zero, but I'm changing the (general) comparison
mechanism to only equate same-signed zeroes, and it's not clear that the test's
comparison is exactly right or wrong.
--
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Monday, 6 July 2015 19:17:55 UTC