Bug 225763 - [GTK] MiniBrowser: add support for saving multiple tabs in session state
Summary: [GTK] MiniBrowser: add support for saving multiple tabs in session state
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2021-05-13 04:59 PDT by Carlos Garcia Campos
Modified: 2021-06-04 03:43 PDT (History)
2 users (show)

See Also:


Attachments
Patch (7.56 KB, patch)
2021-05-13 05:02 PDT, Carlos Garcia Campos
mcatanzaro: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2021-05-13 04:59:12 PDT
We currently save the active tab when the window is closed.
Comment 1 Carlos Garcia Campos 2021-05-13 05:02:07 PDT
Created attachment 428489 [details]
Patch
Comment 2 Michael Catanzaro 2021-05-13 07:14:58 PDT
Comment on attachment 428489 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=428489&action=review

> Tools/MiniBrowser/gtk/BrowserWindow.c:1463
> +    if (!g_key_file_load_from_file(session, sessionFile, G_KEY_FILE_NONE, NULL)) {

I would check and print a warning if !g_error_matches(error, G_FILE_ERROR, G_FILE_ERROR_NOENT). I think that's the only case where failure to restore the session is expected. If the session state file contains data and we fail to restore it, then that's probably a bug and warning developers is good to do.

> Tools/MiniBrowser/gtk/BrowserWindow.c:1476
> +
> +        return;

This extra blank line doesn't seem like your usual code style?
Comment 3 Carlos Garcia Campos 2021-06-04 03:43:50 PDT
Committed r278451 (238471@main): <https://commits.webkit.org/238471@main>