mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-27 12:46:06 +00:00
LibURL+LibWeb: Make URL::Origin default constructor private
Instead, porting over all users to use the newly created Origin::create_opaque factory function. This also requires porting over some users of Origin to avoid default construction.
This commit is contained in:
parent
5deb8ba2f8
commit
e0d7278820
Notes:
github-actions[bot]
2025-06-17 18:55:18 +00:00
Author: https://github.com/shannonbooth
Commit: e0d7278820
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5094
Reviewed-by: https://github.com/gmta ✅
16 changed files with 70 additions and 66 deletions
|
@ -45,7 +45,7 @@ public:
|
|||
[[nodiscard]] Vector<GC::Ref<Directives::Directive>> const& directives() const { return m_directives; }
|
||||
[[nodiscard]] Disposition disposition() const { return m_disposition; }
|
||||
[[nodiscard]] Source source() const { return m_source; }
|
||||
[[nodiscard]] URL::Origin const& self_origin() const { return m_self_origin; }
|
||||
[[nodiscard]] URL::Origin const& self_origin() const { return m_self_origin.value(); }
|
||||
[[nodiscard]] String const& pre_parsed_policy_string(Badge<Violation>) const { return m_pre_parsed_policy_string; }
|
||||
|
||||
[[nodiscard]] bool contains_directive_with_name(StringView name) const;
|
||||
|
@ -81,7 +81,7 @@ private:
|
|||
// Spec Note: This is needed to facilitate the 'self' checks of local scheme documents/workers that have inherited
|
||||
// their policy but have an opaque origin. Most of the time this will simply be the environment settings
|
||||
// object’s origin.
|
||||
URL::Origin m_self_origin;
|
||||
Optional<URL::Origin> m_self_origin;
|
||||
|
||||
// This is used for reporting which policy was violated. It's not exactly specified, only linking to an ABNF grammar
|
||||
// definition. WebKit and Blink return the original string that was parsed, whereas Firefox seems to try and return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue