[Webkit-unassigned] [Bug 172770] New: [GTK] MiniBrowser's browser_window_get_or_create_web_view_for_automation never creates new windows

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 31 12:26:59 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=172770

            Bug ID: 172770
           Summary: [GTK] MiniBrowser's
                    browser_window_get_or_create_web_view_for_automation
                    never creates new windows
           Product: WebKit
           Version: Other
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Gtk
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: aperez at igalia.com
                CC: bugs-noreply at webkitgtk.org

Building with Clang 4.0.0 the compiler found this issue:

  ../../Tools/MiniBrowser/gtk/BrowserWindow.c:1175:108: warning: if statement has empty body [-Wempty-body]
      if (gtk_notebook_get_n_pages(GTK_NOTEBOOK(window->notebook)) == 1 && !webkit_web_view_get_uri(webView));
                                                                                                             ^
  ../../Tools/MiniBrowser/gtk/BrowserWindow.c:1175:108: note: put the semicolon on a separate line to silence this warning

The code around this line is, roughly:

    BrowserWindow *window = (BrowserWindow *)windowList->data;
    WebKitWebView *webView = browser_tab_get_web_view(window->activeTab);
    if (gtk_notebook_get_n_pages(GTK_NOTEBOOK(window->notebook)) == 1 && !webkit_web_view_get_uri(webView));
        return webView;

    // Create and return a new web view
    ...

Due to the semicolon in the line containing the conditional, “return webView” in the
following line is always executed, and therefore a new web view is never created.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170531/6b839466/attachment.html>


More information about the webkit-unassigned mailing list