diff options
author | Ben Murdoch <benm@google.com> | 2010-08-11 14:44:44 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-08-12 19:15:41 +0100 |
commit | dd8bb3de4f353a81954234999f1fea748aee2ea9 (patch) | |
tree | 729b52bf09294f0d6c67cd5ea80aee1b727b7bd8 /WebKit/gtk/webkit | |
parent | f3d41ba51d86bf719c7a65ab5297aea3c17e2d98 (diff) | |
download | external_webkit-dd8bb3de4f353a81954234999f1fea748aee2ea9.zip external_webkit-dd8bb3de4f353a81954234999f1fea748aee2ea9.tar.gz external_webkit-dd8bb3de4f353a81954234999f1fea748aee2ea9.tar.bz2 |
Merge WebKit at r65072 : Initial merge by git.
Change-Id: Ibcf418498376b2660aacb7f8d46ea7085ef91585
Diffstat (limited to 'WebKit/gtk/webkit')
-rw-r--r-- | WebKit/gtk/webkit/webkitprivate.h | 6 | ||||
-rw-r--r-- | WebKit/gtk/webkit/webkitsecurityorigin.cpp | 6 | ||||
-rw-r--r-- | WebKit/gtk/webkit/webkitversion.h.in | 1 | ||||
-rw-r--r-- | WebKit/gtk/webkit/webkitwebdatabase.cpp | 10 | ||||
-rw-r--r-- | WebKit/gtk/webkit/webkitwebhistoryitem.cpp | 4 | ||||
-rw-r--r-- | WebKit/gtk/webkit/webkitwebsettings.cpp | 2 | ||||
-rw-r--r-- | WebKit/gtk/webkit/webkitwebview.cpp | 25 |
7 files changed, 42 insertions, 12 deletions
diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h index 3ce77e6..aa19bec 100644 --- a/WebKit/gtk/webkit/webkitprivate.h +++ b/WebKit/gtk/webkit/webkitprivate.h @@ -273,6 +273,12 @@ extern "C" { void webkit_web_view_set_tooltip_text(WebKitWebView*, const char*); + WEBKIT_API void + webkit_web_view_execute_core_command_by_name(WebKitWebView* webView, const gchar* name, const gchar* value); + + WEBKIT_API gboolean + webkit_web_view_is_command_enabled(WebKitWebView* webView, const gchar* name); + WebKitDownload* webkit_download_new_with_handle(WebKitNetworkRequest* request, WebCore::ResourceHandle* handle, const WebCore::ResourceResponse& response); diff --git a/WebKit/gtk/webkit/webkitsecurityorigin.cpp b/WebKit/gtk/webkit/webkitsecurityorigin.cpp index 0ab0a9c..de074ae 100644 --- a/WebKit/gtk/webkit/webkitsecurityorigin.cpp +++ b/WebKit/gtk/webkit/webkitsecurityorigin.cpp @@ -233,7 +233,7 @@ G_CONST_RETURN gchar* webkit_security_origin_get_protocol(WebKitSecurityOrigin* g_return_val_if_fail(WEBKIT_IS_SECURITY_ORIGIN(securityOrigin), NULL); WebKitSecurityOriginPrivate* priv = securityOrigin->priv; - WebCore::String protocol = priv->coreOrigin->protocol(); + WTF::String protocol = priv->coreOrigin->protocol(); if (!priv->protocol) priv->protocol = g_strdup(protocol.utf8().data()); @@ -256,7 +256,7 @@ G_CONST_RETURN gchar* webkit_security_origin_get_host(WebKitSecurityOrigin* secu g_return_val_if_fail(WEBKIT_IS_SECURITY_ORIGIN(securityOrigin), NULL); WebKitSecurityOriginPrivate* priv = securityOrigin->priv; - WebCore::String host = priv->coreOrigin->host(); + WTF::String host = priv->coreOrigin->host(); if (!priv->host) priv->host = g_strdup(host.utf8().data()); @@ -364,7 +364,7 @@ GList* webkit_security_origin_get_all_web_databases(WebKitSecurityOrigin* securi #if ENABLE(DATABASE) WebCore::SecurityOrigin* coreOrigin = core(securityOrigin); - Vector<WebCore::String> databaseNames; + Vector<WTF::String> databaseNames; if (!WebCore::DatabaseTracker::tracker().databaseNamesForOrigin(coreOrigin, databaseNames)) return NULL; diff --git a/WebKit/gtk/webkit/webkitversion.h.in b/WebKit/gtk/webkit/webkitversion.h.in index 5eb9426..ce6b569 100644 --- a/WebKit/gtk/webkit/webkitversion.h.in +++ b/WebKit/gtk/webkit/webkitversion.h.in @@ -30,6 +30,7 @@ G_BEGIN_DECLS #define WEBKIT_MICRO_VERSION (@WEBKIT_MICRO_VERSION@) #define WEBKIT_USER_AGENT_MAJOR_VERSION (@WEBKIT_USER_AGENT_MAJOR_VERSION@) #define WEBKIT_USER_AGENT_MINOR_VERSION (@WEBKIT_USER_AGENT_MINOR_VERSION@) +#define WEBKITGTK_API_VERSION (@WEBKITGTK_API_VERSION@) #define WEBKIT_CHECK_VERSION(major, minor, micro) \ (WEBKIT_MAJOR_VERSION > (major) || \ diff --git a/WebKit/gtk/webkit/webkitwebdatabase.cpp b/WebKit/gtk/webkit/webkitwebdatabase.cpp index e92c400..d4f6198 100644 --- a/WebKit/gtk/webkit/webkitwebdatabase.cpp +++ b/WebKit/gtk/webkit/webkitwebdatabase.cpp @@ -331,7 +331,7 @@ G_CONST_RETURN gchar* webkit_web_database_get_display_name(WebKitWebDatabase* we #if ENABLE(DATABASE) WebKitWebDatabasePrivate* priv = webDatabase->priv; WebCore::DatabaseDetails details = WebCore::DatabaseTracker::tracker().detailsForNameAndOrigin(priv->name, core(priv->origin)); - WebCore::String displayName = details.displayName(); + WTF::String displayName = details.displayName(); if (displayName.isEmpty()) return ""; @@ -408,8 +408,8 @@ G_CONST_RETURN gchar* webkit_web_database_get_filename(WebKitWebDatabase* webDat #if ENABLE(DATABASE) WebKitWebDatabasePrivate* priv = webDatabase->priv; - WebCore::String coreName = WebCore::String::fromUTF8(priv->name); - WebCore::String corePath = WebCore::DatabaseTracker::tracker().fullPathForDatabase(core(priv->origin), coreName); + WTF::String coreName = WTF::String::fromUTF8(priv->name); + WTF::String corePath = WebCore::DatabaseTracker::tracker().fullPathForDatabase(core(priv->origin), coreName); if (corePath.isEmpty()) return""; @@ -470,7 +470,7 @@ void webkit_remove_all_web_databases() G_CONST_RETURN gchar* webkit_get_web_database_directory_path() { #if ENABLE(DATABASE) - WebCore::String path = WebCore::DatabaseTracker::tracker().databaseDirectoryPath(); + WTF::String path = WebCore::DatabaseTracker::tracker().databaseDirectoryPath(); if (path.isEmpty()) return ""; @@ -495,7 +495,7 @@ G_CONST_RETURN gchar* webkit_get_web_database_directory_path() void webkit_set_web_database_directory_path(const gchar* path) { #if ENABLE(DATABASE) - WebCore::String corePath = WebCore::String::fromUTF8(path); + WTF::String corePath = WTF::String::fromUTF8(path); WebCore::DatabaseTracker::tracker().setDatabaseDirectoryPath(corePath); g_free(webkit_database_directory_path); diff --git a/WebKit/gtk/webkit/webkitwebhistoryitem.cpp b/WebKit/gtk/webkit/webkitwebhistoryitem.cpp index 5177c4c..8a9153c 100644 --- a/WebKit/gtk/webkit/webkitwebhistoryitem.cpp +++ b/WebKit/gtk/webkit/webkitwebhistoryitem.cpp @@ -301,7 +301,7 @@ WebKitWebHistoryItem* webkit_web_history_item_new_with_data(const gchar* uri, co WebKitWebHistoryItemPrivate* priv = webHistoryItem->priv; WebCore::KURL historyUri(WebCore::KURL(), uri); - WebCore::String historyTitle = WebCore::String::fromUTF8(title); + WTF::String historyTitle = WTF::String::fromUTF8(title); RefPtr<WebCore::HistoryItem> item = WebCore::HistoryItem::create(historyUri, historyTitle, 0); priv->historyItem = item.release().releaseRef(); webkit_history_item_add(webHistoryItem, priv->historyItem); @@ -365,7 +365,7 @@ void webkit_web_history_item_set_alternate_title(WebKitWebHistoryItem* webHistor WebCore::HistoryItem* item = core(webHistoryItem); - item->setAlternateTitle(WebCore::String::fromUTF8(title)); + item->setAlternateTitle(WTF::String::fromUTF8(title)); g_object_notify(G_OBJECT(webHistoryItem), "alternate-title"); } diff --git a/WebKit/gtk/webkit/webkitwebsettings.cpp b/WebKit/gtk/webkit/webkitwebsettings.cpp index d61f3ff..71a338c 100644 --- a/WebKit/gtk/webkit/webkitwebsettings.cpp +++ b/WebKit/gtk/webkit/webkitwebsettings.cpp @@ -569,7 +569,7 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass) PROP_ENABLE_XSS_AUDITOR, g_param_spec_boolean("enable-xss-auditor", _("Enable XSS Auditor"), - _("Whether to enable teh XSS auditor"), + _("Whether to enable the XSS auditor"), TRUE, flags)); /** diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp index 8747d42..58d91ea 100644 --- a/WebKit/gtk/webkit/webkitwebview.cpp +++ b/WebKit/gtk/webkit/webkitwebview.cpp @@ -549,6 +549,11 @@ static gboolean webkit_web_view_expose_event(GtkWidget* widget, GdkEventExpose* ctx.restore(); } } + + ctx.save(); + ctx.clip(static_cast<IntRect>(event->area)); + frame->page()->inspectorController()->drawNodeHighlight(ctx); + ctx.restore(); } return FALSE; @@ -792,7 +797,8 @@ static gboolean webkit_web_view_focus_in_event(GtkWidget* widget, GdkEventFocus* else focusController->setFocusedFrame(core(webView)->mainFrame()); - gtk_im_context_focus_in(webView->priv->imContext); + if (focusController->focusedFrame()->editor()->canEdit()) + gtk_im_context_focus_in(webView->priv->imContext); } return GTK_WIDGET_CLASS(webkit_web_view_parent_class)->focus_in_event(widget, event); } @@ -4658,3 +4664,20 @@ WebKitCacheModel webkit_get_cache_model() webkit_init(); return cacheModel; } + +void webkit_web_view_execute_core_command_by_name(WebKitWebView* webView, const gchar* name, const gchar* value) +{ + g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView)); + g_return_if_fail(name); + g_return_if_fail(value); + + core(webView)->focusController()->focusedOrMainFrame()->editor()->command(name).execute(value); +} + +gboolean webkit_web_view_is_command_enabled(WebKitWebView* webView, const gchar* name) +{ + g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), FALSE); + g_return_val_if_fail(name, FALSE); + + return core(webView)->focusController()->focusedOrMainFrame()->editor()->command(name).isEnabled(); +} |