diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/content/common/page_state.mojom | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/content/common/page_state.mojom')
-rw-r--r-- | chromium/content/common/page_state.mojom | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/chromium/content/common/page_state.mojom b/chromium/content/common/page_state.mojom index e4f2abcd424..ef6e9e5ba7a 100644 --- a/chromium/content/common/page_state.mojom +++ b/chromium/content/common/page_state.mojom @@ -15,17 +15,16 @@ import "ui/gfx/geometry/mojom/geometry.mojom"; // parts. The resultant generated code is used to serialize and deserialize // PageState for the purpose of history restore. // -// When adding fields: +// All structures here must maintain backward-compatibility (and hence must be +// marked [Stable]) according to mojom backward-compatibility rules. Namely, +// when adding new fields: // - Assign your new field an explicit ordinal(@n) and prefer to add fields to // the end of the struct to simplify finding the latest ordinal. -// - For backwards compatibility purposes: -// - New fields must be tagged with a [MinVersion=x] attribute; x is -// specified at the bottom of this comment block. -// - Only types with frozen/unchanging Mojo serialization may be used; -// for example, |string| is okay, but |url.mojom.Origin| is not. -// (note that if serialization of any of the types used in PageState -// changes in a backwards-incompatible way then it should be caught by -// one of PageStateSerializationTest, BackwardsCompat_vXX tests). +// - New fields must be tagged with a [MinVersion=x] attribute where x is larger +// than the MinVersion for any existing fields. The next available MinVersion +// value is specified at the bottom of this comment block for convenience. +// - Only builtin mojom types or other user-defined [Stable] types are allowed +// as transitive dependencies here. This is enforced at build time. // - You'll also need to read/write the new field's value when decoding and // encoding PageState, update PageStateSerializationTest to check that your // new field is preserved across serialization, and add a BackwardsCompat @@ -37,11 +36,15 @@ import "ui/gfx/geometry/mojom/geometry.mojom"; // compatibility. If re-ordering fields, make sure to retain the original // ordinal value. // +// Finally, note that any backward-incomptable changes will be caught by a +// presubmit check. +// // Update the below value if your change introduces fields using it. // Next MinVersion: 3 // Next Ordinal: 4 // FileSystemFile is no longer supported. +[Stable] struct DEPRECATED_FileSystemFile { url.mojom.Url filesystem_url@0; uint64 offset@1; @@ -50,6 +53,7 @@ struct DEPRECATED_FileSystemFile { }; // Next Ordinal: 4 +[Stable] struct File { mojo_base.mojom.String16 path@0; uint64 offset@1; @@ -58,6 +62,7 @@ struct File { }; // Next Ordinal: 4 +[Stable] union Element { string blob_uuid@0; array<uint8> bytes@1; @@ -67,6 +72,7 @@ union Element { }; // Next Ordinal: 3 +[Stable] struct RequestBody { array<Element> elements@0; int64 identifier@1; @@ -74,6 +80,7 @@ struct RequestBody { }; // Next Ordinal: 3 +[Stable] struct HttpBody { mojo_base.mojom.String16? http_content_type@0; RequestBody? request_body@1; @@ -82,13 +89,14 @@ struct HttpBody { // This enum's values must match blink::WebHistoryScrollRestorationType. This // is enforced with static asserts in page_state_serialization.cc. -[Extensible] +[Stable, Extensible] enum ScrollRestorationType { kAuto = 0, kManual = 1 }; // Next Ordinal: 6 +[Stable] struct ViewState { gfx.mojom.PointF visual_viewport_scroll_offset@0; gfx.mojom.Point scroll_offset@1; @@ -100,6 +108,7 @@ struct ViewState { }; // Next Ordinal: 13 +[Stable] struct FrameState { mojo_base.mojom.String16? url_string@0; mojo_base.mojom.String16? referrer@1; @@ -117,6 +126,7 @@ struct FrameState { }; // Next Ordinal: 2 +[Stable] struct PageState { array<mojo_base.mojom.String16?> referenced_files@0; FrameState top@1; |