[geometry] DOMRect: allowing negative height/width

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

Allowing negative height and width leads to additional complexity in the implementation that I don’t see a compelling use case for, and prevents DOMRect being implemented in terms of existing Rect classes that always normalize rectangles to have zero or positive height and width.

Since the arguments allow negative height and width, we could add a normalization step that either clamps negative values to zero, or normalizes the rect by recomputing x and y.

Simon

Received on Saturday, 15 October 2016 21:48:19 UTC