Skip to content

Commit

Permalink
Restore writeable attribute of geometry interfaces (#1070)
Browse files Browse the repository at this point in the history
Fixes the first issue raised in #1067.
  • Loading branch information
saschanaz authored Jul 17, 2021
1 parent ca77744 commit 2daa986
Show file tree
Hide file tree
Showing 6 changed files with 148 additions and 5 deletions.
30 changes: 30 additions & 0 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3760,6 +3760,28 @@ declare var DOMImplementation: {
};

interface DOMMatrix extends DOMMatrixReadOnly {
a: number;
b: number;
c: number;
d: number;
e: number;
f: number;
m11: number;
m12: number;
m13: number;
m14: number;
m21: number;
m22: number;
m23: number;
m24: number;
m31: number;
m32: number;
m33: number;
m34: number;
m41: number;
m42: number;
m43: number;
m44: number;
invertSelf(): DOMMatrix;
multiplySelf(other?: DOMMatrixInit): DOMMatrix;
preMultiplySelf(other?: DOMMatrixInit): DOMMatrix;
Expand Down Expand Up @@ -3863,6 +3885,10 @@ declare var DOMParser: {
};

interface DOMPoint extends DOMPointReadOnly {
w: number;
x: number;
y: number;
z: number;
}

declare var DOMPoint: {
Expand Down Expand Up @@ -3906,6 +3932,10 @@ declare var DOMQuad: {
};

interface DOMRect extends DOMRectReadOnly {
height: number;
width: number;
x: number;
y: number;
}

declare var DOMRect: {
Expand Down
30 changes: 30 additions & 0 deletions baselines/serviceworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,28 @@ declare var DOMException: {
};

interface DOMMatrix extends DOMMatrixReadOnly {
a: number;
b: number;
c: number;
d: number;
e: number;
f: number;
m11: number;
m12: number;
m13: number;
m14: number;
m21: number;
m22: number;
m23: number;
m24: number;
m31: number;
m32: number;
m33: number;
m34: number;
m41: number;
m42: number;
m43: number;
m44: number;
invertSelf(): DOMMatrix;
multiplySelf(other?: DOMMatrixInit): DOMMatrix;
preMultiplySelf(other?: DOMMatrixInit): DOMMatrix;
Expand Down Expand Up @@ -1085,6 +1107,10 @@ declare var DOMMatrixReadOnly: {
};

interface DOMPoint extends DOMPointReadOnly {
w: number;
x: number;
y: number;
z: number;
}

declare var DOMPoint: {
Expand Down Expand Up @@ -1125,6 +1151,10 @@ declare var DOMQuad: {
};

interface DOMRect extends DOMRectReadOnly {
height: number;
width: number;
x: number;
y: number;
}

declare var DOMRect: {
Expand Down
30 changes: 30 additions & 0 deletions baselines/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,28 @@ declare var DOMException: {
};

interface DOMMatrix extends DOMMatrixReadOnly {
a: number;
b: number;
c: number;
d: number;
e: number;
f: number;
m11: number;
m12: number;
m13: number;
m14: number;
m21: number;
m22: number;
m23: number;
m24: number;
m31: number;
m32: number;
m33: number;
m34: number;
m41: number;
m42: number;
m43: number;
m44: number;
invertSelf(): DOMMatrix;
multiplySelf(other?: DOMMatrixInit): DOMMatrix;
preMultiplySelf(other?: DOMMatrixInit): DOMMatrix;
Expand Down Expand Up @@ -1029,6 +1051,10 @@ declare var DOMMatrixReadOnly: {
};

interface DOMPoint extends DOMPointReadOnly {
w: number;
x: number;
y: number;
z: number;
}

declare var DOMPoint: {
Expand Down Expand Up @@ -1069,6 +1095,10 @@ declare var DOMQuad: {
};

interface DOMRect extends DOMRectReadOnly {
height: number;
width: number;
x: number;
y: number;
}

declare var DOMRect: {
Expand Down
30 changes: 30 additions & 0 deletions baselines/webworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,28 @@ declare var DOMException: {
};

interface DOMMatrix extends DOMMatrixReadOnly {
a: number;
b: number;
c: number;
d: number;
e: number;
f: number;
m11: number;
m12: number;
m13: number;
m14: number;
m21: number;
m22: number;
m23: number;
m24: number;
m31: number;
m32: number;
m33: number;
m34: number;
m41: number;
m42: number;
m43: number;
m44: number;
invertSelf(): DOMMatrix;
multiplySelf(other?: DOMMatrixInit): DOMMatrix;
preMultiplySelf(other?: DOMMatrixInit): DOMMatrix;
Expand Down Expand Up @@ -1096,6 +1118,10 @@ declare var DOMMatrixReadOnly: {
};

interface DOMPoint extends DOMPointReadOnly {
w: number;
x: number;
y: number;
z: number;
}

declare var DOMPoint: {
Expand Down Expand Up @@ -1136,6 +1162,10 @@ declare var DOMQuad: {
};

interface DOMRect extends DOMRectReadOnly {
height: number;
width: number;
x: number;
y: number;
}

declare var DOMRect: {
Expand Down
30 changes: 28 additions & 2 deletions src/build/bcd/keep-alive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,34 @@ export const forceKeepAlive: Record<string, string[]> = {
],
CloseEvent: ["code", "reason", "wasClean"],
DOMRectList: ["item", "length"],
DOMMatrix: ["fromFloat32Array", "fromFloat64Array", "fromMatrix"],
DOMRect: ["fromRect"],
DOMMatrix: [
"fromFloat32Array",
"fromFloat64Array",
"fromMatrix",
"a",
"b",
"c",
"d",
"e",
"f",
"m11",
"m12",
"m13",
"m14",
"m21",
"m22",
"m23",
"m24",
"m31",
"m32",
"m33",
"m34",
"m41",
"m42",
"m43",
"m44",
],
DOMRect: ["fromRect", "x", "y", "width", "height"],
Document: ["charset", "inputEncoding"],
Element: ["webkitMatchesSelector"],
FileReader: ["onloadstart"],
Expand Down
3 changes: 0 additions & 3 deletions src/build/widlprocess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,6 @@ function convertInterfaceCommon(
member.name
);
} else if (member.type === "attribute") {
if ((member.special as string) === "inherit") {
continue; // no need to redeclare
}
const { properties } = result;
const prop = convertAttribute(member, result.exposed);
addComments(prop, commentMap, i.name, member.name);
Expand Down

0 comments on commit 2daa986

Please sign in to comment.