COMMIT_MESSAGE

 12010-11-11 Mario Sanchez Prada <msanchez@igalia.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 [GTK] events missing when a document is (re)loaded
 6 https://bugs.webkit.org/show_bug.cgi?id=25831
 7
 8 Make sure webArea returns a proper name and that a signal
 9 'state-change::defunct' is emitted when detaching the wrapper.
 10
 11 * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
 12 (webkit_accessible_get_name): Returns the current document's title
 13 if the associated core object is the topmost one (webArea role).
 14 (webkit_accessible_detach): Emit 'state-change::defunct' function
 15 as soon as the wrapper is detached from the related core object.
 16
 172010-11-11 Mario Sanchez Prada <msanchez@igalia.com>
 18
 19 Reviewed by NOBODY (OOPS!).
 20
 21 [GTK] events missing when a document is (re)loaded
 22 https://bugs.webkit.org/show_bug.cgi?id=25831
 23
 24 Emit the right signals when loading a document.
 25
 26 * WebCoreSupport/FrameLoaderClientGtk.cpp:
 27 (WebKit::notifyAccessibilityStatus): New function, to make sure
 28 the signals 'state-change', 'reload', 'load-stopped' and
 29 'load-complete' are properly emitted when needed.
 30 (WebKit::notifyStatus): Also notify accessibility if enabled.

WebCore/ChangeLog

 12010-11-11 Mario Sanchez Prada <msanchez@igalia.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 [GTK] events missing when a document is (re)loaded
 6 https://bugs.webkit.org/show_bug.cgi?id=25831
 7
 8 Make sure webArea returns a proper name and that a signal
 9 'state-change::defunct' is emitted when detaching the wrapper.
 10
 11 * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
 12 (webkit_accessible_get_name): Returns the current document's title
 13 if the associated core object is the topmost one (webArea role).
 14 (webkit_accessible_detach): Emit 'state-change::defunct' function
 15 as soon as the wrapper is detached from the related core object.
 16
1172010-11-09 Andreas Kling <kling@webkit.org>
218
319 Reviewed by Kenneth Rohde Christiansen.

WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp

@@static gchar* webkit_accessible_text_get_text(AtkText* text, gint startOffset, g
159159static const gchar* webkit_accessible_get_name(AtkObject* object)
160160{
161161 AccessibilityObject* coreObject = core(object);
 162
 163 // For the root object we just return the document's title.
 164 if (coreObject->roleValue() == WebAreaRole)
 165 return returnString(coreObject->document()->title());
 166
162167 if (!coreObject->isAccessibilityRenderObject())
163168 return returnString(coreObject->stringValue());
164169

@@void webkit_accessible_detach(WebKitAccessible* accessible)
22922297{
22932298 ASSERT(accessible->m_object);
22942299
 2300 if (core(accessible)->roleValue() == WebAreaRole)
 2301 g_signal_emit_by_name(accessible, "state-change", "defunct", true);
 2302
22952303 // We replace the WebCore AccessibilityObject with a fallback object that
22962304 // provides default implementations to avoid repetitive null-checking after
22972305 // detachment.

WebKit/gtk/ChangeLog

 12010-11-11 Mario Sanchez Prada <msanchez@igalia.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 [GTK] events missing when a document is (re)loaded
 6 https://bugs.webkit.org/show_bug.cgi?id=25831
 7
 8 Emit the right signals when loading a document.
 9
 10 * WebCoreSupport/FrameLoaderClientGtk.cpp:
 11 (WebKit::notifyAccessibilityStatus): New function, to make sure
 12 the signals 'state-change', 'reload', 'load-stopped' and
 13 'load-complete' are properly emitted when needed.
 14 (WebKit::notifyStatus): Also notify accessibility if enabled.
 15
1162010-11-08 Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
217
318 Reviewed by Martin Robinson.

WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp

2525#include "config.h"
2626#include "FrameLoaderClientGtk.h"
2727
 28#include "AXObjectCache.h"
2829#include "ArchiveResource.h"
2930#include "CachedFrame.h"
3031#include "Color.h"

@@String FrameLoaderClient::userAgent(const KURL& url)
207208 return String::fromUTF8(webkit_web_settings_get_user_agent(settings));
208209}
209210
 211static void notifyAccessibilityStatus(WebKitWebFrame* frame, WebKitLoadStatus loadStatus)
 212{
 213 if (!AXObjectCache::accessibilityEnabled())
 214 AXObjectCache::enableAccessibility();
 215
 216 WebKitWebView* webView = getViewFromFrame(frame);
 217 if (!webView || frame != webkit_web_view_get_main_frame(webView))
 218 return;
 219
 220 AtkObject* axObject = gtk_widget_get_accessible(GTK_WIDGET(webView));
 221 if (!axObject || !ATK_IS_DOCUMENT(axObject))
 222 return;
 223
 224 switch (loadStatus) {
 225 case WEBKIT_LOAD_PROVISIONAL:
 226 g_signal_emit_by_name(axObject, "state-change", "busy", true);
 227 if (core(frame)->loader()->loadType() == FrameLoadTypeReload)
 228 g_signal_emit_by_name(axObject, "reload");
 229 break;
 230 case WEBKIT_LOAD_FAILED:
 231 g_signal_emit_by_name(axObject, "load-stopped");
 232 g_signal_emit_by_name(axObject, "state-change", "busy", false);
 233 break;
 234 case WEBKIT_LOAD_FINISHED:
 235 g_signal_emit_by_name(axObject, "load-complete");
 236 g_signal_emit_by_name(axObject, "state-change", "busy", false);
 237 default:
 238 break;
 239 }
 240}
 241
210242static void notifyStatus(WebKitWebFrame* frame, WebKitLoadStatus loadStatus)
211243{
212244 frame->priv->loadStatus = loadStatus;

@@static void notifyStatus(WebKitWebFrame* frame, WebKitLoadStatus loadStatus)
217249 webView->priv->loadStatus = loadStatus;
218250 g_object_notify(G_OBJECT(webView), "load-status");
219251 }
 252
 253 if (AXObjectCache::accessibilityEnabled())
 254 notifyAccessibilityStatus(frame, loadStatus);
220255}
221256
222257static void loadDone(WebKitWebFrame* frame, bool didSucceed)