Changeset 78331 in webkit


Ignore:
Timestamp:
Feb 11, 2011 4:53:43 AM (13 years ago)
Author:
mario@webkit.org
Message:

2011-02-11 Mario Sanchez Prada <msanchez@igalia.com>

Reviewed by Xan Lopez.

[GTK] events missing when a document is (re)loaded
https://bugs.webkit.org/show_bug.cgi?id=25831

Added new layout test to check the right signals are emitted.

  • platform/gtk/accessibility/document-reload-events-expected.txt: Added.
  • platform/gtk/accessibility/document-reload-events.html: Added.

2011-02-11 Mario Sanchez Prada <msanchez@igalia.com>

Reviewed by Xan Lopez.

[GTK] events missing when a document is (re)loaded
https://bugs.webkit.org/show_bug.cgi?id=25831

Make sure webArea returns a proper name and that a signal
'state-change::defunct' is emitted when detaching the wrapper.

Test: platform/gtk/accessibility/document-reload-events.html

  • accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (webkit_accessible_get_name): Returns the current document's title as fallback mechanism for webArea objects. (webkit_accessible_detach): Emit 'state-change::defunct' function as soon as the wrapper is detached from the related core object.

2011-02-11 Mario Sanchez Prada <msanchez@igalia.com>

Reviewed by Xan Lopez.

[GTK] events missing when a document is (re)loaded
https://bugs.webkit.org/show_bug.cgi?id=25831

Emit the right signals when reloading a document.

  • WebCoreSupport/FrameLoaderClientGtk.cpp: (WebKit::notifyAccessibilityStatus): New function, to make sure the signals involved in reloading a document are properly emitted. (WebKit::notifyStatus): Also notify accessibility if enabled.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r78330 r78331  
     12011-02-11  Mario Sanchez Prada  <msanchez@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [GTK] events missing when a document is (re)loaded
     6        https://bugs.webkit.org/show_bug.cgi?id=25831
     7
     8        Added new layout test to check the right signals are emitted.
     9
     10        * platform/gtk/accessibility/document-reload-events-expected.txt: Added.
     11        * platform/gtk/accessibility/document-reload-events.html: Added.
     12
    1132011-02-11  Adam Barth  <abarth@webkit.org>
    214
  • trunk/Source/WebCore/ChangeLog

    r78328 r78331  
     12011-02-11  Mario Sanchez Prada  <msanchez@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     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        Test: platform/gtk/accessibility/document-reload-events.html
     12
     13        * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
     14        (webkit_accessible_get_name): Returns the current document's title
     15        as fallback mechanism for webArea objects.
     16        (webkit_accessible_detach): Emit 'state-change::defunct' function
     17        as soon as the wrapper is detached from the related core object.
     18
    1192011-02-11  Pavel Feldman  <pfeldman@chromium.org>
    220
  • trunk/Source/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp

    r78150 r78331  
    176176        }
    177177
    178         // Try text under the node
     178        // Try text under the node.
    179179        String textUnder = renderObject->textUnderElement();
    180180        if (textUnder.length())
     
    190190                return returnString(alt);
    191191        }
     192    }
     193
     194    // Fallback for the webArea object: just return the document's title.
     195    if (renderObject->isWebArea()) {
     196        Document* document = coreObject->document();
     197        if (document)
     198            return returnString(document->title());
    192199    }
    193200
     
    24652472    ASSERT(accessible->m_object);
    24662473
     2474    if (core(accessible)->roleValue() == WebAreaRole)
     2475        g_signal_emit_by_name(accessible, "state-change", "defunct", true);
     2476
    24672477    // We replace the WebCore AccessibilityObject with a fallback object that
    24682478    // provides default implementations to avoid repetitive null-checking after
  • trunk/Source/WebKit/gtk/ChangeLog

    r77971 r78331  
     12011-02-11  Mario Sanchez Prada  <msanchez@igalia.com>
     2
     3        Reviewed by Xan Lopez.
     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 reloading a document.
     9
     10        * WebCoreSupport/FrameLoaderClientGtk.cpp:
     11        (WebKit::notifyAccessibilityStatus): New function, to make sure
     12        the signals involved in reloading a document are properly emitted.
     13        (WebKit::notifyStatus): Also notify accessibility if enabled.
     14
    1152011-02-08  Martin Robinson  <mrobinson@igalia.com>
    216
  • trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp

    r77818 r78331  
    2626#include "FrameLoaderClientGtk.h"
    2727
     28#include "AXObjectCache.h"
    2829#include "ArchiveResource.h"
    2930#include "CachedFrame.h"
     
    223224}
    224225
     226static void notifyAccessibilityStatus(WebKitWebFrame* frame, WebKitLoadStatus loadStatus)
     227{
     228    WebKitWebView* webView = getViewFromFrame(frame);
     229    if (!webView || frame != webkit_web_view_get_main_frame(webView))
     230        return;
     231
     232    AtkObject* axObject = gtk_widget_get_accessible(GTK_WIDGET(webView));
     233    if (!axObject || !ATK_IS_DOCUMENT(axObject))
     234        return;
     235
     236    switch (loadStatus) {
     237    case WEBKIT_LOAD_PROVISIONAL:
     238        g_signal_emit_by_name(axObject, "state-change", "busy", true);
     239        if (core(frame)->loader()->loadType() == FrameLoadTypeReload)
     240            g_signal_emit_by_name(axObject, "reload");
     241        break;
     242    case WEBKIT_LOAD_FAILED:
     243        g_signal_emit_by_name(axObject, "load-stopped");
     244        g_signal_emit_by_name(axObject, "state-change", "busy", false);
     245        break;
     246    case WEBKIT_LOAD_FINISHED:
     247        g_signal_emit_by_name(axObject, "load-complete");
     248        g_signal_emit_by_name(axObject, "state-change", "busy", false);
     249    default:
     250        break;
     251    }
     252}
     253
    225254static void notifyStatus(WebKitWebFrame* frame, WebKitLoadStatus loadStatus)
    226255{
     
    233262        g_object_notify(G_OBJECT(webView), "load-status");
    234263    }
     264
     265    if (AXObjectCache::accessibilityEnabled())
     266        notifyAccessibilityStatus(frame, loadStatus);
    235267}
    236268
Note: See TracChangeset for help on using the changeset viewer.