[Webkit-unassigned] [Bug 137116] [GTK] Add selection-changed signal to the WebKit2 API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 23 04:47:05 PST 2015


--- Comment #13 from Tomas Popela <tpopela at redhat.com> ---
(In reply to comment #12)
> > Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.cpp:40
> > +    GRefPtr<WebKitWebPage> webkitWebPage;
> > +    WebPage* webPage;
> Why do you need to keep a reference of WebKitWebPage and why do we need to
> keep a pointer to WebPage?. The WebKitWebPage is the one creating and
> destroying the editor, so the web page will be alive while the editor is
> alive.

The WebPage will be removed as I will do the private method that you suggested. I mean to keep it for the future as I think that the stuff that we will be done in WebEditor will need to access the WebPage. For the WebKitWebPage I left it there to simplify the access to the DOM (as shown in the tests).

> > Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.cpp:54
> > +     * This signal is emitted when the selection inside a #WebKitWebPage has been
> > +     * changed.
> Is this emitted for every selection change in a WebView? or only selections
> in editable areas?

For every selection change in a WebView.

> > Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h:47
> > +/* Forward declarations */
> > +typedef struct _WebKitWebEditor      WebKitWebEditor;
> You shouldn't need this, since you are including WebKitWebEditor.h.

I already tried it and:

In file included from ../../Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.h:29:0,
                 from ../../Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.cpp:21:
DerivedSources/ForwardingHeaders/webkit2gtk-webextension/webkit2/WebKitWebPage.h:74:40: error: ‘WebKitWebEditor’ does not name a type
 WEBKIT_API WebKitWebEditor *

> > Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitUserContentManager.cpp:404
> > +    UserScriptMessageTest::add("WebKitWebEditor", "selection-changed", testSelectionChangedSignal);
> Why is this a user content manger test? This should be in TestEditor I
> guess, if we need to make UserScriptMessageTest available to other tests we
> can move it to the test lib

I moved it here because the infrastructure for handlers is there. But doing it in separate module makes really sense (in TestEditor).

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/20150123/7e624822/attachment-0002.html>

More information about the webkit-unassigned mailing list