mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:48:12 +00:00
LibWeb: Make Document::page() return a Page&
Now that Document always has a Page, and always keeps it alive, we can make this return a Page&, exposing various unnecessary null checks.
This commit is contained in:
parent
70193c0009
commit
7c95ebc302
17 changed files with 43 additions and 78 deletions
|
@ -69,9 +69,8 @@ WebIDL::ExceptionOr<void> NavigableContainer::create_new_child_navigable()
|
|||
VERIFY(group);
|
||||
|
||||
// 3. Let browsingContext and document be the result of creating a new browsing context and document given element's node document, element, and group.
|
||||
auto* page = document().page();
|
||||
VERIFY(page);
|
||||
auto [browsing_context, document] = TRY(BrowsingContext::create_a_new_browsing_context_and_document(*page, this->document(), *this, *group));
|
||||
auto& page = document().page();
|
||||
auto [browsing_context, document] = TRY(BrowsingContext::create_a_new_browsing_context_and_document(page, this->document(), *this, *group));
|
||||
|
||||
// 4. Let targetName be null.
|
||||
Optional<String> target_name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue