[geometry] DOMRect: use of unrestricted doubles

https://drafts.fxtf.org/geometry/#DOMRect <https://drafts.fxtf.org/geometry/#DOMRect>

Using unrestricted doubles forces implementors to handle NaN and Inf values for x, y, width and height, and to correctly propagate NaN and Inf through steps used to calculate left, top, right, bottom (assuming IEEE rules, though the spec does not make this explicit). This is non-trivial, since std::min<> and  std::max<> do not follow the same NaN propagation rules as Math.min()/Math.max(). Implementors have to add isnan() checks to left, top, right, bottom implementations. Is the complexity worth it?

Simon

Received on Saturday, 15 October 2016 21:47:58 UTC