Bug 172770

Summary: [GTK] MiniBrowser's browser_window_get_or_create_web_view_for_automation never creates new windows
Product: WebKit Reporter: Adrian Perez <aperez>
Component: WebKitGTKAssignee: Adrian Perez <aperez>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, cgarcia, clopez, commit-queue, mcatanzaro
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Adrian Perez
Reported 2017-05-31 12:26:59 PDT
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.
Attachments
Patch (1.67 KB, patch)
2017-05-31 12:29 PDT, Adrian Perez
no flags
Adrian Perez
Comment 1 2017-05-31 12:29:51 PDT
WebKit Commit Bot
Comment 2 2017-05-31 13:10:55 PDT
Comment on attachment 311618 [details] Patch Clearing flags on attachment: 311618 Committed r217620: <http://trac.webkit.org/changeset/217620>
WebKit Commit Bot
Comment 3 2017-05-31 13:10:56 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.