Description[GeometryInterface] add fromRect function in DOMQuad.
The fromRect(other) static method on DOMQuad
must create a DOMQuad from the DOMRectInit dictionary other.
To create a DOMQuad from a DOMRectInit dictionary other,
follow these steps:
1.Let x, y, width and height be the value of other’s x, y,
width and height attributes, respectively.
2.Let point 1 be a new DOMPoint object with x set to x,
y set to y, z set to zero and w set to one.
3.Let point 2 be a new DOMPoint object with x set to x + width,
y set to y, z set to zero and w set to one.
4.Let point 3 be a new DOMPoint object with x set to x + width,
y set to y + height, z set to zero and w set to one.
5.Let point 4 be a new DOMPoint object with x set to x,
y set to y + height, z set to zero and w set to one.
6.Return a new DOMQuad with p1 set to point 1, p2 set to point 2,
p3 set to point 3 and p4 set to point 4.
spec list:
https://drafts.fxtf.org/geometry/#dom-domquad-fromrect
BUG=678237
Review-Url: https://codereview.chromium.org/2639983002
Cr-Commit-Position: refs/heads/master@{#444666}
Committed: https://chromium.googlesource.com/chromium/src/+/05e25435cee9bdd3da715ed0725f06ee2b8cdd03
Patch Set 1 #Patch Set 2 : [GeometryInterface] add fromRect function in DOMQuad. #Patch Set 3 : [GeometryInterface] add fromRect function in DOMQuad. #Patch Set 4 : [GeometryInterface] add fromRect function in DOMQuad. #
Messages
Total messages: 20 (16 generated)
|