[cssom-view] Ability to replace points of a DOMQuad

The interface for DOMQuad currently in CSSOM View is:

[Constructor(DOMPointLiteral p1, DOMPointLiteral p2, DOMPointLiteral p3,  
DOMPointLiteral p4),
  Constructor(DOMRectAny rect)]
interface DOMQuad {
   [SameObject] readonly attribute DOMPoint p1;
   [SameObject] readonly attribute DOMPoint p2;
   [SameObject] readonly attribute DOMPoint p3;
   [SameObject] readonly attribute DOMPoint p4;
   [SameObject] readonly attribute DOMRectImmutable bounds;


The points can be modified by setting their attributes, e.g.:

quad.p1.x = 10;
quad.p1.y = 20;

Do we want to allow the following?

quad.p1 = {x:10, y:20};
quad.p1 = new DOMPoint(10, 20);

If so, what should they do?

(a) The old DOMPoint object is mutated with the values of the new object.
(b) A new DOMPoint object is created with the values of the new object and  
replaces the old DOMPoint object.
(c) The new object replaces the old object, except if it is a  
DOMPointLiteral which acts like (b).
(d) ???

Simon Pieters
Opera Software

Received on Thursday, 26 September 2013 13:46:32 UTC