summaryrefslogtreecommitdiffstats
path: root/WebKit/gtk/WebCoreSupport
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/gtk/WebCoreSupport')
-rw-r--r--WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp9
-rw-r--r--WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp2
-rw-r--r--WebKit/gtk/WebCoreSupport/EditorClientGtk.h2
-rw-r--r--WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp32
4 files changed, 37 insertions, 8 deletions
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
index 190ae9b..4450e87 100644
--- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
@@ -523,12 +523,9 @@ void ChromeClient::mouseDidMoveOverElement(const HitTestResult& hit, unsigned mo
m_hoveredLinkURL = KURL();
}
- if (Node* node = hit.innerNonSharedNode()) {
- Frame* frame = node->document()->frame();
- FrameView* view = frame ? frame->view() : 0;
- m_webView->priv->tooltipArea = view ? view->contentsToWindow(node->getRect()) : IntRect();
- } else
- m_webView->priv->tooltipArea = IntRect();
+ Node* node = hit.innerNonSharedNode();
+
+ m_webView->priv->tooltipArea = node ? node->document()->frame()->view()->contentsToWindow(node->getRect()) : IntRect();
}
void ChromeClient::setToolTip(const String& toolTip, TextDirection)
diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
index da07e56..bd88480 100644
--- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
@@ -1008,7 +1008,7 @@ bool EditorClient::spellingUIIsShowing()
return false;
}
-void EditorClient::getGuessesForWord(const String& word, const String& context, WTF::Vector<String>& guesses)
+void EditorClient::getGuessesForWord(const String& word, WTF::Vector<String>& guesses)
{
GSList* dicts = webkit_web_settings_get_enchant_dicts(m_webView);
guesses.clear();
diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.h b/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
index 22543c6..f9ff82e 100644
--- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
@@ -129,7 +129,7 @@ namespace WebKit {
virtual void updateSpellingUIWithMisspelledWord(const WTF::String&);
virtual void showSpellingUI(bool show);
virtual bool spellingUIIsShowing();
- virtual void getGuessesForWord(const WTF::String& word, const WTF::String& context, WTF::Vector<WTF::String>& guesses);
+ virtual void getGuessesForWord(const WTF::String&, WTF::Vector<WTF::String>& guesses);
virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
index fdef9dc..e7a2457 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
@@ -25,6 +25,7 @@
#include "config.h"
#include "FrameLoaderClientGtk.h"
+#include "AXObjectCache.h"
#include "ArchiveResource.h"
#include "CachedFrame.h"
#include "Color.h"
@@ -208,6 +209,34 @@ String FrameLoaderClient::userAgent(const KURL& url)
return String::fromUTF8(webkit_web_settings_get_user_agent(settings));
}
+static void notifyAccessibilityStatus(WebKitWebFrame* frame, WebKitLoadStatus loadStatus)
+{
+ WebKitWebView* webView = getViewFromFrame(frame);
+ if (!webView || frame != webkit_web_view_get_main_frame(webView))
+ return;
+
+ AtkObject* axObject = gtk_widget_get_accessible(GTK_WIDGET(webView));
+ if (!axObject || !ATK_IS_DOCUMENT(axObject))
+ return;
+
+ switch (loadStatus) {
+ case WEBKIT_LOAD_PROVISIONAL:
+ g_signal_emit_by_name(axObject, "state-change", "busy", true);
+ if (core(frame)->loader()->loadType() == FrameLoadTypeReload)
+ g_signal_emit_by_name(axObject, "reload");
+ break;
+ case WEBKIT_LOAD_FAILED:
+ g_signal_emit_by_name(axObject, "load-stopped");
+ g_signal_emit_by_name(axObject, "state-change", "busy", false);
+ break;
+ case WEBKIT_LOAD_FINISHED:
+ g_signal_emit_by_name(axObject, "load-complete");
+ g_signal_emit_by_name(axObject, "state-change", "busy", false);
+ default:
+ break;
+ }
+}
+
static void notifyStatus(WebKitWebFrame* frame, WebKitLoadStatus loadStatus)
{
frame->priv->loadStatus = loadStatus;
@@ -218,6 +247,9 @@ static void notifyStatus(WebKitWebFrame* frame, WebKitLoadStatus loadStatus)
webView->priv->loadStatus = loadStatus;
g_object_notify(G_OBJECT(webView), "load-status");
}
+
+ if (AXObjectCache::accessibilityEnabled())
+ notifyAccessibilityStatus(frame, loadStatus);
}
static void loadDone(WebKitWebFrame* frame, bool didSucceed)