mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-01 16:02:53 +00:00
LibWeb: Make base URL of HTML::Script Optional
This is a null or a URL in the spec, which we were previously representing through the invalid state of URL.
This commit is contained in:
parent
d62cf0a807
commit
705001483a
Notes:
github-actions[bot]
2025-02-19 13:02:39 +00:00
Author: https://github.com/shannonbooth
Commit: 705001483a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3609
Reviewed-by: https://github.com/trflynn89
5 changed files with 9 additions and 9 deletions
|
@ -24,7 +24,7 @@ class Script
|
|||
public:
|
||||
virtual ~Script() override;
|
||||
|
||||
URL::URL const& base_url() const { return m_base_url; }
|
||||
Optional<URL::URL> const& base_url() const { return m_base_url; }
|
||||
ByteString const& filename() const { return m_filename; }
|
||||
|
||||
JS::Realm& realm() { return m_realm; }
|
||||
|
@ -37,14 +37,14 @@ public:
|
|||
void set_parse_error(JS::Value value) { m_parse_error = value; }
|
||||
|
||||
protected:
|
||||
Script(URL::URL base_url, ByteString filename, JS::Realm&);
|
||||
Script(Optional<URL::URL> base_url, ByteString filename, JS::Realm&);
|
||||
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
private:
|
||||
virtual void visit_host_defined_self(JS::Cell::Visitor&) override;
|
||||
|
||||
URL::URL m_base_url;
|
||||
Optional<URL::URL> m_base_url;
|
||||
ByteString m_filename;
|
||||
GC::Ref<JS::Realm> m_realm;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue