Re: [fxtf-drafts] [geometry] DOMRect: use of unrestricted doubles - min(x, NaN)

The `Math.max`/`.min` way according to https://bug-163464-attachments.webkit.org/attachment.cgi?id=291752

Demo: http://software.hixie.ch/utilities/js/live-dom-viewer/saved/5914
```
<!DOCTYPE html>
<script>
var q = new DOMQuad({x:NaN}, {x:NaN}, {x:NaN}, {x:NaN});
w(q.getBounds().left)
 </script>
```
logs `NaN` in Safari TP and Chrome canary; also in Firefox Nightly if I change `getBounds()` to `bounds`

-- 
GitHub Notification of comment by zcorpan
Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/222#issuecomment-381967941 using your GitHub account

Received on Tuesday, 17 April 2018 12:06:43 UTC