LibWeb: Rename current settings object to 'current principal'

Aligning the name with the the PR implementing the javascript
shadow realm proposal into the web platform. This commit
simply performs the rename before implementing the behaviour
change.

The actual change to the behaviour of the AO is not implemented in this
commit to support 'synthetic' shadow realms as the surrounding
infrastructure is not in place yet.

Not all specs have a MR open to align with this proposed change to the
HTML standard. But in this case we can just apply the same mechanical
change everywhere.
This commit is contained in:
Shannon Booth 2024-10-21 13:35:24 +13:00 committed by Andrew Kaster
commit b2f3ed8b5a
Notes: github-actions[bot] 2024-11-01 19:17:08 +00:00
16 changed files with 50 additions and 39 deletions

View file

@ -33,7 +33,7 @@ ErrorOr<String> generate_new_blob_url()
TRY(result.try_append("blob:"sv));
// 3. Let settings be the current settings object
auto& settings = HTML::current_settings_object();
auto& settings = HTML::current_principal_settings_object();
// 4. Let origin be settingss origin.
auto origin = settings.origin();
@ -69,7 +69,7 @@ ErrorOr<String> add_entry_to_blob_url_store(JS::NonnullGCPtr<Blob> object)
auto url = TRY(generate_new_blob_url());
// 3. Let entry be a new blob URL entry consisting of object and the current settings object.
BlobURLEntry entry { object, HTML::current_settings_object() };
BlobURLEntry entry { object, HTML::current_principal_settings_object() };
// 4. Set store[url] to entry.
TRY(store.try_set(url, move(entry)));