mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #23844 - saschanaz:tojson, r=Manishearth
Support default toJSON in WebIDL <!-- Please describe your changes on the following line: --> Ported related lines from gecko. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #22781 <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23844) <!-- Reviewable:end -->
This commit is contained in:
commit
4275420a56
9 changed files with 99 additions and 158 deletions
|
@ -81,7 +81,6 @@ interface DOMMatrixReadOnly {
|
|||
DOMPoint transformPoint(optional DOMPointInit point = {});
|
||||
Float32Array toFloat32Array();
|
||||
Float64Array toFloat64Array();
|
||||
// stringifier;
|
||||
// serializer = { attribute };
|
||||
|
||||
// [Exposed=Window] stringifier;
|
||||
[Default] object toJSON();
|
||||
};
|
||||
|
|
|
@ -20,4 +20,6 @@ interface DOMPointReadOnly {
|
|||
readonly attribute unrestricted double y;
|
||||
readonly attribute unrestricted double z;
|
||||
readonly attribute unrestricted double w;
|
||||
|
||||
[Default] object toJSON();
|
||||
};
|
||||
|
|
|
@ -22,6 +22,8 @@ interface DOMQuad {
|
|||
[SameObject] readonly attribute DOMPoint p3;
|
||||
[SameObject] readonly attribute DOMPoint p4;
|
||||
[NewObject] DOMRect getBounds();
|
||||
|
||||
[Default] object toJSON();
|
||||
};
|
||||
|
||||
dictionary DOMQuadInit {
|
||||
|
|
|
@ -17,6 +17,8 @@ interface DOMRectReadOnly {
|
|||
readonly attribute unrestricted double right;
|
||||
readonly attribute unrestricted double bottom;
|
||||
readonly attribute unrestricted double left;
|
||||
|
||||
[Default] object toJSON();
|
||||
};
|
||||
|
||||
// https://drafts.fxtf.org/geometry/#dictdef-domrectinit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue