mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
Userland+Ladybird: Always specify url to be about:srcdoc in load_html()
After moving to navigables, we started reusing the code that populates session history entries with the srcdoc attribute value from iframes in `Page::load_html()` for loading HTML. This change addresses a crash in `determine_the_origin` which occurred because this method expected the URL to be `about:srcdoc` if we also provided HTML content (previously, it was the URL passed along with the HTML content into `load_html()`).
This commit is contained in:
parent
8e832a174e
commit
3c675e3f25
18 changed files with 31 additions and 32 deletions
|
@ -229,7 +229,7 @@ void Editor::show_documentation_tooltip_if_available(DeprecatedString const& hov
|
|||
return;
|
||||
}
|
||||
|
||||
s_tooltip_page_view->load_html(man_document->render_to_html("<style>body { background-color: #dac7b5; }</style>"sv), {});
|
||||
s_tooltip_page_view->load_html(man_document->render_to_html("<style>body { background-color: #dac7b5; }</style>"sv));
|
||||
|
||||
s_tooltip_window->set_rect(0, 0, 500, 400);
|
||||
s_tooltip_window->move_to(screen_location.translated(4, 4));
|
||||
|
@ -722,7 +722,7 @@ void Editor::handle_function_parameters_hint_request()
|
|||
}
|
||||
html.append("<style>body { background-color: #dac7b5; }</style>"sv);
|
||||
|
||||
s_tooltip_page_view->load_html(html.to_deprecated_string(), {});
|
||||
s_tooltip_page_view->load_html(html.to_deprecated_string());
|
||||
|
||||
auto cursor_rect = current_editor().cursor_content_rect().location().translated(screen_relative_rect().location());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue