mirror of
https://github.com/servo/servo.git
synced 2025-09-30 16:49:16 +01:00
Make DOM geometry structs serializable (#38828)
Makes the following DOM geometry structs serializable: - `DOMRect` - `DOMRectReadOnly` - `DOMQuad` - `DOMMatrix` - `DOMMatrixReadOnly` Testing: Covered by WPT (`css/geometry/structured-serialization.html`). --------- Signed-off-by: lumiscosity <averyrudelphe@gmail.com>
This commit is contained in:
parent
e00f39d827
commit
39f3ce7a2e
19 changed files with 529 additions and 89 deletions
|
@ -11,8 +11,8 @@ mod transferable;
|
|||
use std::collections::HashMap;
|
||||
|
||||
use base::id::{
|
||||
BlobId, DomExceptionId, DomPointId, ImageBitmapId, MessagePortId, OffscreenCanvasId,
|
||||
QuotaExceededErrorId,
|
||||
BlobId, DomExceptionId, DomMatrixId, DomPointId, DomQuadId, DomRectId, ImageBitmapId,
|
||||
MessagePortId, OffscreenCanvasId, QuotaExceededErrorId,
|
||||
};
|
||||
use log::warn;
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
|
@ -31,6 +31,12 @@ pub struct StructuredSerializedData {
|
|||
pub blobs: Option<HashMap<BlobId, BlobImpl>>,
|
||||
/// Serialized point objects.
|
||||
pub points: Option<HashMap<DomPointId, DomPoint>>,
|
||||
/// Serialized rect objects.
|
||||
pub rects: Option<HashMap<DomRectId, DomRect>>,
|
||||
/// Serialized quad objects.
|
||||
pub quads: Option<HashMap<DomQuadId, DomQuad>>,
|
||||
/// Serialized matrix objects.
|
||||
pub matrices: Option<HashMap<DomMatrixId, DomMatrix>>,
|
||||
/// Serialized exception objects.
|
||||
pub exceptions: Option<HashMap<DomExceptionId, DomException>>,
|
||||
/// Serialized quota exceeded errors.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue