mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 19:59:17 +00:00
LibURL+LibWeb: Make URL::serialize return a String
Simplifying a bunch of uneeded error handling around the place.
This commit is contained in:
committed by
Sam Atkins
parent
d7ac0601ab
commit
0fa54c2327
@@ -36,7 +36,7 @@ WebIDL::ExceptionOr<GC::Ref<CSSStyleSheet>> CSSStyleSheet::construct_impl(JS::Re
|
||||
|
||||
// 2. Set sheet’s location to the base URL of the associated Document for the current principal global object.
|
||||
auto associated_document = verify_cast<HTML::Window>(HTML::current_principal_global_object()).document();
|
||||
sheet->set_location(MUST(associated_document->base_url().to_string()));
|
||||
sheet->set_location(associated_document->base_url().to_string());
|
||||
|
||||
// 3. Set sheet’s stylesheet base URL to the baseURL attribute value from options.
|
||||
if (options.has_value() && options->base_url.has_value()) {
|
||||
@@ -99,7 +99,7 @@ CSSStyleSheet::CSSStyleSheet(JS::Realm& realm, CSSRuleList& rules, MediaList& me
|
||||
, m_rules(&rules)
|
||||
{
|
||||
if (location.has_value())
|
||||
set_location(MUST(location->to_string()));
|
||||
set_location(location->to_string());
|
||||
|
||||
for (auto& rule : *m_rules)
|
||||
rule->set_parent_style_sheet(this);
|
||||
|
||||
Reference in New Issue
Block a user