diff options
author | Linus Groh <mail@linusgroh.de> | 2022-02-14 21:52:12 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-15 01:31:03 +0100 |
commit | f2ee62e2684dfd1e66a0e26656d8bc32e7673de9 (patch) | |
tree | f4e5ca6726619fe3ab2c28ef2aaff49c7a2edb62 /Userland/Libraries | |
parent | 7590c0fff87260eca7d083353a87d4b03caf2114 (diff) | |
download | serenity-f2ee62e2684dfd1e66a0e26656d8bc32e7673de9.zip |
LibWeb: Rename Origin::is_null() to Origin::is_opaque()
This is what the HTML Origin spec calls it.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibWeb/Origin.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Origin.h b/Userland/Libraries/LibWeb/Origin.h index d224b0d734..6ce0097e09 100644 --- a/Userland/Libraries/LibWeb/Origin.h +++ b/Userland/Libraries/LibWeb/Origin.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2020, Andreas Kling <kling@serenityos.org> + * Copyright (c) 2022, Linus Groh <linusg@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ @@ -20,7 +21,8 @@ public: { } - bool is_null() const { return m_protocol.is_null() && m_host.is_null() && !m_port; } + // https://html.spec.whatwg.org/multipage/origin.html#concept-origin-opaque + bool is_opaque() const { return m_protocol.is_null() && m_host.is_null() && m_port == 0; } const String& protocol() const { return m_protocol; } const String& host() const { return m_host; } |