Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibWeb: Initial steps towards implementing NavigationActivation #1808

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

shannonbooth
Copy link
Contributor

@shannonbooth shannonbooth commented Oct 15, 2024

This gets the bulk of the implementation prepared for NavigationActivation. Unfortunately, it isn't working fully at this stage due to what appear to be spec bugs - and also some of our own!

The first issue is a simple editorial one whatwg/html#10703 - which I saw now after seeing that wehave not been passing through "displayedEntry" to "update_for_history_step_application":

target_entry->document()->update_for_history_step_application(*target_entry, update_only, script_history_length, script_history_index, navigation_type, entries_for_navigation_api);
(which is one reason why this does not work currently).

Unfortunately, even after doing a local patch for that, we then run into a crash due to document() being null on the "previousEntry" inside of "update_for_history_step_application", which I am still trying to figure out. It is maybe possible the issue is related to whatwg/html#9869 - it could also simply be a bug in our code somewhere - but my understanding is still very much lacking in this area to have narrowed this down at all. Ideas appreciated for what might be going wrong!

&& previous_entry_for_activation.value()->document_state()->origin() == origin()
&& !previous_entry_for_activation.value()->document()->is_initial_about_blank()) {
&& previous_entry_for_activation->document_state()->origin() == origin()
&& !previous_entry_for_activation->document()->is_initial_about_blank()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The crash I mention is on this line due to a null document - still trying to figure out how this is meant to be set, or why it is getting set to null

@@ -4,6 +4,7 @@
* Copyright (c) 2021-2023, Luke Wilde <[email protected]>
* Copyright (c) 2021-2024, Sam Atkins <[email protected]>
* Copyright (c) 2024, Matthew Olsson <[email protected]>
* Copyright (c) 2023-2024, Shannon Booth <[email protected]>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the email is incorrect :^)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants