LibWebView: Generate hyperlinks for attributes that represent links

On the view-source page, generate anchor tags for any 'href' or 'src'
attribute value we come across. This handles both when the attribute
contains an absolute URL and a URL relative to the page.

This requires sending the document's base URL over IPC to resolve
relative URLs.
This commit is contained in:
Timothy Flynn 2024-10-18 17:20:15 -04:00 committed by Andreas Kling
commit 1aab7b51ea
Notes: github-actions[bot] 2024-10-20 06:50:51 +00:00
10 changed files with 60 additions and 26 deletions

View file

@ -48,7 +48,7 @@ endpoint WebContentClient
did_request_set_prompt_text(u64 page_id, String message) =|
did_request_accept_dialog(u64 page_id) =|
did_request_dismiss_dialog(u64 page_id) =|
did_get_source(u64 page_id, URL::URL url, ByteString source) =|
did_get_source(u64 page_id, URL::URL url, URL::URL base_url, String source) =|
did_inspect_dom_tree(u64 page_id, ByteString dom_tree) =|
did_inspect_dom_node(u64 page_id, bool has_style, ByteString computed_style, ByteString resolved_style, ByteString custom_properties, ByteString node_box_sizing, ByteString aria_properties_state, ByteString fonts) =|
@ -59,7 +59,7 @@ endpoint WebContentClient
inspector_did_list_style_sheets(u64 page_id, Vector<Web::CSS::StyleSheetIdentifier> style_sheets) =|
inspector_did_request_style_sheet_source(u64 page_id, Web::CSS::StyleSheetIdentifier identifier) =|
did_request_style_sheet_source(u64 page_id, Web::CSS::StyleSheetIdentifier identifier, String source) =|
did_get_style_sheet_source(u64 page_id, Web::CSS::StyleSheetIdentifier identifier, URL::URL base_url, String source) =|
did_take_screenshot(u64 page_id, Gfx::ShareableBitmap screenshot) =|