Changeset 240840 in webkit


Ignore:
Timestamp:
Feb 1, 2019 2:03:31 AM (5 years ago)
Author:
Carlos Garcia Campos
Message:

[WPE] MiniBrowser: use g_file_new_for_commandline_arg
https://bugs.webkit.org/show_bug.cgi?id=194146

Reviewed by Xabier Rodriguez-Calvar.

It allows to open relative paths.

  • MiniBrowser/wpe/main.cpp:

(main):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r240831 r240840  
     12019-02-01  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [WPE] MiniBrowser: use g_file_new_for_commandline_arg
     4        https://bugs.webkit.org/show_bug.cgi?id=194146
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        It allows to open relative paths.
     9
     10        * MiniBrowser/wpe/main.cpp:
     11        (main):
     12
    1132019-01-31  Ryan Haddad  <ryanhaddad@apple.com>
    214
  • trunk/Tools/MiniBrowser/wpe/main.cpp

    r240148 r240840  
    196196        webkit_web_context_set_tls_errors_policy(webContext, WEBKIT_TLS_ERRORS_POLICY_IGNORE);
    197197
    198     if (uriArguments)
    199         webkit_web_view_load_uri(webView, uriArguments[0]);
    200     else if (!automationMode)
     198    if (uriArguments) {
     199        GFile* file = g_file_new_for_commandline_arg(uriArguments[0]);
     200        char* url = g_file_get_uri(file);
     201        g_object_unref(file);
     202        webkit_web_view_load_uri(webView, url);
     203        g_free(url);
     204    } else if (!automationMode)
    201205        webkit_web_view_load_uri(webView, "https://wpewebkit.org");
    202206
Note: See TracChangeset for help on using the changeset viewer.