summaryrefslogtreecommitdiff
path: root/dom/base/DOMPoint.h
diff options
context:
space:
mode:
authorJob Bautista <jobbautista9@aol.com>2023-05-12 13:45:39 +0800
committerJob Bautista <jobbautista9@aol.com>2023-05-12 16:26:05 +0800
commit709c34a4484a45c19c5a7c52a7a0052d5fca9678 (patch)
treea2b1e45852a855887220463ba087e442c31b4fc3 /dom/base/DOMPoint.h
parent0adb8cc71fba46afe05a85ac89d92a3586346ea1 (diff)
downloaduxp-709c34a4484a45c19c5a7c52a7a0052d5fca9678.tar.gz
Issue #2241 - Part 5: Expose Geometry interfaces to web workers.
Exposes DOMMatrix, DOMPoint, DOMQuad, and DOMRect to workers. Backported from Mozilla bug 1420580.
Diffstat (limited to 'dom/base/DOMPoint.h')
-rw-r--r--dom/base/DOMPoint.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/dom/base/DOMPoint.h b/dom/base/DOMPoint.h
index 79937f83a3..f460ea725c 100644
--- a/dom/base/DOMPoint.h
+++ b/dom/base/DOMPoint.h
@@ -6,6 +6,7 @@
#ifndef MOZILLA_DOMPOINT_H_
#define MOZILLA_DOMPOINT_H_
+#include "js/StructuredClone.h"
#include "nsWrapperCache.h"
#include "nsISupports.h"
#include "nsCycleCollectionParticipant.h"
@@ -23,8 +24,8 @@ struct DOMPointInit;
class DOMPointReadOnly : public nsWrapperCache
{
public:
- DOMPointReadOnly(nsISupports* aParent, double aX, double aY,
- double aZ, double aW)
+ explicit DOMPointReadOnly(nsISupports* aParent, double aX = 0.0,
+ double aY = 0.0, double aZ = 0.0, double aW = 1.0)
: mParent(aParent)
, mX(aX)
, mY(aY)
@@ -50,6 +51,10 @@ public:
nsISupports* GetParentObject() const { return mParent; }
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
+ bool WriteStructuredClone(JSStructuredCloneWriter* aWriter) const;
+
+ bool ReadStructuredClone(JSStructuredCloneReader* aReader);
+
protected:
virtual ~DOMPointReadOnly() {}