mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +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:
parent
d7ac0601ab
commit
0fa54c2327
Notes:
github-actions[bot]
2024-12-04 16:48:13 +00:00
Author: https://github.com/shannonbooth
Commit: 0fa54c2327
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2727
Reviewed-by: https://github.com/AtkinsSJ ✅
52 changed files with 88 additions and 103 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue