[Webkit-unassigned] [Bug 97202] [GTK] Implement ViewState methods in PageClientImpl in WebKit2

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 21 08:56:12 PDT 2012


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





--- Comment #8 from Carlos Garcia Campos <cgarcia at igalia.com>  2012-09-21 08:56:41 PST ---
(In reply to comment #7)
> (In reply to comment #5)
> > > > Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:100
> > > > +    gulong toplevelResizeGripVisibilityID;
> > > > +    gulong toplevelFocusInEventID;
> > > > +    gulong toplevelFocusOutEventID;
> > > 
> > > Maybe just unsigned long here?
> >
> > g_signal_connect returns a gulong.
> 
> gulong is always typedeffed to unsigned long, so we could avoid the use of simple GLib typedefs here.
> 
> > > Are there situations where a window can be realized already inside a toplevel window, without set_parent being called?
> > 
> > A widget must be inside a toplevel to be realized, so parent_set has always been called when the widget is realized.
> 
> I suppose you must call webkitWebViewBaseSetToplevelOnScreenWindow here because parent_set may be called before the widget has a toplevel window. Would it be possible to remove the call in parent_set and simply use the one here, in realize? It seems the only problem would be if a widget can change toplevel windows without being realized and unrealized. Surely that's not possible?

Yes, it's not possible.

> 
> The reason I'm not sure about using parent_set is that it may not necessarily indicate that the toplevel window of the widget has changed, so perhaps it's not a good time to detect that change. Coupled with the check here, it seems redundant, but perhaps I'm missing a particular situation.

No no, you are right, we can use parent-set only to detect when a widget is reparented to disconnect all the signals and clear the window, and set the new window only when the widget is realized to make sure we use the real toplevel window.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list