Bug 123325 - [GTK][WK2] Build break after r157967 and r157972
Summary: [GTK][WK2] Build break after r157967 and r157972
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sergio Villar Senin
URL:
Keywords:
Depends on:
Blocks: 123296
  Show dependency treegraph
 
Reported: 2013-10-25 00:54 PDT by Sergio Villar Senin
Modified: 2013-10-25 10:05 PDT (History)
10 users (show)

See Also:


Attachments
Patch (6.30 KB, patch)
2013-10-25 01:53 PDT, Sergio Villar Senin
no flags Details | Formatted Diff | Diff
Patch (6.30 KB, patch)
2013-10-25 02:21 PDT, Sergio Villar Senin
no flags Details | Formatted Diff | Diff
Patch (10.64 KB, patch)
2013-10-25 06:21 PDT, Sergio Villar Senin
cgarcia: review+
cgarcia: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio Villar Senin 2013-10-25 00:54:47 PDT
Several changes related to visibility and DrawingAreas
Comment 1 Csaba Osztrogonác 2013-10-25 01:19:36 PDT
Maybe https://bugs.webkit.org/show_bug.cgi?id=123324 will fix GTK too.
Comment 2 Sergio Villar Senin 2013-10-25 01:35:00 PDT
(In reply to comment #1)
> Maybe https://bugs.webkit.org/show_bug.cgi?id=123324 will fix GTK too.

Partially, we need some specific bits from GTK.
Comment 3 Sergio Villar Senin 2013-10-25 01:53:52 PDT
Created attachment 215151 [details]
Patch
Comment 4 WebKit Commit Bot 2013-10-25 01:55:49 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 5 Sergio Villar Senin 2013-10-25 02:21:49 PDT
Created attachment 215153 [details]
Patch
Comment 6 Sergio Villar Senin 2013-10-25 02:22:24 PDT
Replaced gtk_widget_is_visible() by gtk_widget_get_visible()
Comment 7 Carlos Garcia Campos 2013-10-25 04:10:44 PDT
Comment on attachment 215153 [details]
Patch

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

> Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp:294
> +    return gtk_widget_get_visible(gtk_widget_get_toplevel(m_viewWidget));

Is this always called once the view is inside a toplevel? because otherwise get_toplevel can return NULL. Should we handle offscreen windows differently? Maybe we can add webkitWebViewBaseIsWindowVisible() and return early if priv->toplevelOnScreenWindow is NULL, and use it instead of calling get_toplevel again.
Comment 8 Sergio Villar Senin 2013-10-25 04:30:13 PDT
Comment on attachment 215153 [details]
Patch

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

>> Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp:294
>> +    return gtk_widget_get_visible(gtk_widget_get_toplevel(m_viewWidget));
> 
> Is this always called once the view is inside a toplevel? because otherwise get_toplevel can return NULL. Should we handle offscreen windows differently? Maybe we can add webkitWebViewBaseIsWindowVisible() and return early if priv->toplevelOnScreenWindow is NULL, and use it instead of calling get_toplevel again.

This is called in the WebPageProxy when viewStateDidChange() is called with the WindowIsVisible flag. It looks like we are never passing that to the proxy, so we need to send that information to the proxy from the webview in order to properly fix that. Once we track the visibility status of the window we can use it to return the right value in ::isWindowVisible()
Comment 9 Sergio Villar Senin 2013-10-25 06:21:23 PDT
Created attachment 215170 [details]
Patch
Comment 10 WebKit Commit Bot 2013-10-25 06:24:12 PDT
Attachment 215170 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp', u'Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h', u'Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp', u'Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBasePrivate.h', u'Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp', u'Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h', u'Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp', u'Source/WebKit2/WebProcess/WebPage/WebPage.cpp']" exit_code: 1
Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:243:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 Carlos Garcia Campos 2013-10-25 08:57:43 PDT
Comment on attachment 215170 [details]
Patch

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

Looks great, please fix the style issues before landing. Thanks!

> Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp:-140
> -}

We are the only ones currently using DrawingAreaProxyImpl, this simply removes code and it's a build fix in the end so I assume we don't need approval from a WebKit2 owner for this.
Comment 12 Sergio Villar Senin 2013-10-25 09:32:11 PDT
(In reply to comment #11)
> (From update of attachment 215170 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=215170&action=review
> 
> Looks great, please fix the style issues before landing. Thanks!

It's a false positive because we indent the parameters of g_signal_connect

> > Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp:-140
> > -}
> 
> We are the only ones currently using DrawingAreaProxyImpl, this simply removes code and it's a build fix in the end so I assume we don't need approval from a WebKit2 owner for this.
Comment 13 Sergio Villar Senin 2013-10-25 09:35:28 PDT
Committed r158013: <http://trac.webkit.org/changeset/158013>
Comment 14 Martin Robinson 2013-10-25 10:05:52 PDT
(In reply to comment #12)
> (In reply to comment #11)
> > (From update of attachment 215170 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=215170&action=review
> > 
> > Looks great, please fix the style issues before landing. Thanks!
> 
> It's a false positive because we indent the parameters of g_signal_connect

We used to align them, but WebKit style specifies the indentation now, so we started following it.