WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
43284
[GTK] Create a frame-created signal
https://bugs.webkit.org/show_bug.cgi?id=43284
Summary
[GTK] Create a frame-created signal
Martin Robinson
Reported
2010-07-30 16:27:10 PDT
There is no way to track the creation of new frames and attach signals to them. A frame-created signal allows a developer to attach signals to all new frames.
Attachments
Add frame-created signal and test
(9.09 KB, patch)
2010-07-30 16:41 PDT
,
Martin Robinson
xan.lopez
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Martin Robinson
Comment 1
2010-07-30 16:41:02 PDT
Created
attachment 63123
[details]
Add frame-created signal and test
Xan Lopez
Comment 2
2010-08-02 04:24:22 PDT
Comment on
attachment 63123
[details]
Add frame-created signal and test
>+ g_signal_connect(webView, "frame-created", G_CALLBACK(createFrameSignalTestFrameCreatedCallback), loop); >+ >+ // We want to ensure that exactly two create-frame signals are >+ // fired and no more, so we set a timeout here. There does not appear >+ // to be a simple way via the API to figure out when all frames have >+ // loaded. >+ g_timeout_add(500, createFrameSignalTestTimeout, loop);
webview::document-load-finished does not work?
>+ >+ gtk_container_add(GTK_CONTAINER(window), webView); >+ gtk_widget_show(window); >+ gtk_widget_show(webView); >+ >+ webkit_web_view_load_string(WEBKIT_WEB_VIEW(webView), >+ "<html><body>Frames!" >+ "<iframe></iframe>" >+ "<iframe></iframe>" >+ "</body></html>", >+ "text/html", "utf-8", "file://"); >+ g_main_loop_run(loop); >+} >+
>+ /* >+ * WebKitWebView::frame-created >+ * @web_view: the object which received the signal >+ * @web_frame: the #WebKitWebFrame which was just created. >+ * >+ * Emitted when a WebKitWebView has created a new frame. This signal will >+ * be fired for all sub-frames created during page load. It will not be >+ * emitted for the main frame, which originates in the WebKitWebView constructor >+ * and may be accessed any time using webkit_web_view_get_main_frame.
Missing a Since: Looks good otherwise.
Martin Robinson
Comment 3
2010-08-02 14:51:32 PDT
(In reply to
comment #2
)
> >+ g_timeout_add(500, createFrameSignalTestTimeout, loop); > webview::document-load-finished does not work?
I tried a patch which counted document-load-finished signals, but that seemed to have bad interactions with the GLib main loop and libsoup. I wonder if it's exposing another bug. :/
> Missing a Since:
Fixed!
Martin Robinson
Comment 4
2010-08-02 14:58:53 PDT
Committed
r64496
: <
http://trac.webkit.org/changeset/64496
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug