diff options
author | Gustavo Noronha Silva <gns@gnome.org> | 2009-10-27 18:09:57 +0800 |
---|---|---|
committer | Gustavo Noronha Silva <gns@gnome.org> | 2009-10-30 02:23:11 +0800 |
commit | c87401f28cb8ef3a645dfd5a687be6ddbbfe6790 (patch) | |
tree | f45c27535dc61afa233467a16af5018d20fb5c84 /src/popup-commands.c | |
parent | 68729d9fcdade0698b6e1ce979da271d49d7e3d0 (diff) | |
download | gsoc2013-epiphany-c87401f28cb8ef3a645dfd5a687be6ddbbfe6790.tar gsoc2013-epiphany-c87401f28cb8ef3a645dfd5a687be6ddbbfe6790.tar.gz gsoc2013-epiphany-c87401f28cb8ef3a645dfd5a687be6ddbbfe6790.tar.bz2 gsoc2013-epiphany-c87401f28cb8ef3a645dfd5a687be6ddbbfe6790.tar.lz gsoc2013-epiphany-c87401f28cb8ef3a645dfd5a687be6ddbbfe6790.tar.xz gsoc2013-epiphany-c87401f28cb8ef3a645dfd5a687be6ddbbfe6790.tar.zst gsoc2013-epiphany-c87401f28cb8ef3a645dfd5a687be6ddbbfe6790.zip |
Provide the Inspect Element menu item again
WebKit now provides API to start the web inspector, so we can restore
the menu item.
Bug #599473
Diffstat (limited to 'src/popup-commands.c')
-rw-r--r-- | src/popup-commands.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/popup-commands.c b/src/popup-commands.c index cbaf1e46b..755817e82 100644 --- a/src/popup-commands.c +++ b/src/popup-commands.c @@ -521,3 +521,24 @@ popup_cmd_open_image (GtkAction *action, g_value_unset (&value); g_free (scheme); } + +void +popup_cmd_inspect_element (GtkAction *action, EphyWindow *window) +{ + EphyEmbedEvent *event; + EphyEmbed *embed; + WebKitWebInspector *inspector; + guint x, y; + + embed = ephy_embed_container_get_active_child + (EPHY_EMBED_CONTAINER (window)); + + event = ephy_window_get_context_event (window); + g_return_if_fail (event != NULL); + + inspector = webkit_web_view_get_inspector + (EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed)); + + ephy_embed_event_get_coords (event, &x, &y); + webkit_web_inspector_inspect_coordinates (inspector, (gdouble)x, (gdouble)y); +} |