Changeset 33591 in webkit


Ignore:
Timestamp:
May 19, 2008 6:12:20 PM (16 years ago)
Author:
alp@webkit.org
Message:

2008-05-19 Alp Toker <alp@nuanti.com>

Reviewed by Anders and Beth.

http://bugs.webkit.org/show_bug.cgi?id=16495
[GTK] Accessibility support with ATK/AT-SPI

Initial ATK/AT-SPI accessibility support for the GTK+ port.

Location:
trunk
Files:
3 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r33581 r33591  
     12008-05-19  Alp Toker  <alp@nuanti.com>
     2
     3        Reviewed by Anders and Beth.
     4
     5        http://bugs.webkit.org/show_bug.cgi?id=16495
     6        [GTK] Accessibility support with ATK/AT-SPI
     7
     8        Initial ATK/AT-SPI accessibility support for the GTK+ port.
     9
     10        * wtf/Platform.h:
     11
    1122008-05-19  Kevin McCullough  <kmccullough@apple.com>
    213
  • trunk/JavaScriptCore/wtf/Platform.h

    r32988 r33591  
    237237#if PLATFORM(MAC) || PLATFORM(WIN)
    238238#define ENABLE_DASHBOARD_SUPPORT 1
     239#endif
     240
     241#if PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(GTK)
    239242#define HAVE_ACCESSIBILITY 1
    240243#endif
  • trunk/WebCore/ChangeLog

    r33590 r33591  
     12008-05-19  Alp Toker  <alp@nuanti.com>
     2
     3        Reviewed by Anders and Beth.
     4
     5        http://bugs.webkit.org/show_bug.cgi?id=16495
     6        [GTK] Accessibility support with ATK/AT-SPI
     7
     8        Initial ATK/AT-SPI accessibility support for the GTK+ port.
     9
     10        * GNUmakefile.am:
     11        * page/AccessibilityObject.cpp:
     12        (WebCore::AccessibilityObject::AccessibilityObject):
     13        (WebCore::AccessibilityObject::detach):
     14        * page/AccessibilityObject.h:
     15        * page/gtk/AXObjectCacheAtk.cpp: Added.
     16        (WebCore::AXObjectCache::detachWrapper):
     17        (WebCore::AXObjectCache::attachWrapper):
     18        (WebCore::AXObjectCache::postNotification):
     19        (WebCore::AXObjectCache::postNotificationToElement):
     20        (WebCore::AXObjectCache::handleFocusedUIElementChanged):
     21        * page/gtk/AccessibilityObjectWrapperAtk.cpp: Added.
     22        (WebCore::):
     23        (WebCore::AccessibilityObject::wrapper):
     24        (WebCore::AccessibilityObject::setWrapper):
     25        * page/gtk/AccessibilityObjectWrapperAtk.h: Added.
     26
    1272008-05-19  Anders Carlsson  <andersca@apple.com>
    228
  • trunk/WebCore/GNUmakefile.am

    r33524 r33591  
    10311031        WebCore/platform/text/TextBoundariesICU.cpp \
    10321032        WebCore/platform/text/TextBreakIteratorICU.cpp \
     1033        WebCore/page/gtk/AXObjectCacheAtk.cpp \
     1034        WebCore/page/gtk/AccessibilityObjectWrapperAtk.cpp \
    10331035        WebCore/page/gtk/EventHandlerGtk.cpp \
    10341036        WebCore/page/gtk/FrameGtk.cpp \
  • trunk/WebCore/page/AccessibilityObject.cpp

    r33510 r33591  
    6464    : m_id(0)
    6565    , m_haveChildren(false)
     66#if PLATFORM(GTK)
     67    , m_wrapper(0)
     68#endif
    6669{
    6770}
     
    7679    removeAXObjectID();
    7780#if HAVE(ACCESSIBILITY)
    78     m_wrapper = 0;
     81    setWrapper(0);
    7982#endif   
    8083}
  • trunk/WebCore/page/AccessibilityObject.h

    r33568 r33591  
    11/*
    22 * Copyright (C) 2008 Apple Inc. All rights reserved.
     3 * Copyright (C) 2008 Nuanti Ltd.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    5657@class WebCoreTextMarkerRange;
    5758#else
    58 class AccessibilityObjectWrapper;
    5959class NSArray;
    6060class NSAttributedString;
     
    6666class WebCoreTextMarker;
    6767class WebCoreTextMarkerRange;
     68#if PLATFORM(GTK)
     69typedef struct _AtkObject AtkObject;
     70typedef struct _AtkObject AccessibilityObjectWrapper;
     71#else
     72class AccessibilityObjectWrapper;
     73#endif
    6874#endif
    6975
     
    349355
    350356#if HAVE(ACCESSIBILITY)
     357#if PLATFORM(GTK)
     358    AccessibilityObjectWrapper* wrapper() const;
     359    void setWrapper(AccessibilityObjectWrapper*);
     360#else
    351361    AccessibilityObjectWrapper* wrapper() const { return m_wrapper.get(); }
    352362    void setWrapper(AccessibilityObjectWrapper* wrapper)
     
    355365    }
    356366#endif
     367#endif
    357368
    358369protected:
     
    369380#elif PLATFORM(WIN)
    370381    COMPtr<AccessibilityObjectWrapper> m_wrapper;
     382#elif PLATFORM(GTK)
     383    AtkObject* m_wrapper;
    371384#endif
    372385};
  • trunk/WebKit/gtk/ChangeLog

    r32914 r33591  
     12008-05-19  Alp Toker  <alp@nuanti.com>
     2
     3        Reviewed by Anders and Beth.
     4
     5        http://bugs.webkit.org/show_bug.cgi?id=16495
     6        [GTK] Accessibility support with ATK/AT-SPI
     7
     8        Initial ATK/AT-SPI accessibility support for the GTK+ port.
     9
     10        * webkit/webkitwebview.cpp:
     11
    1122008-05-06  Christian Dywan  <christian@twotoasts.de>
    213
  • trunk/WebKit/gtk/webkit/webkitwebview.cpp

    r32914 r33591  
    55 *  Copyright (C) 2007 Alp Toker <alp@atoker.com>
    66 *  Copyright (C) 2008 Jan Alonzo <jmalonzo@unpluggable.com>
     7 *  Copyright (C) 2008 Nuanti Ltd.
    78 *
    89 *  This library is free software; you can redistribute it and/or
     
    2930#include "webkitwebhistoryitem.h"
    3031
     32#include "AXObjectCache.h"
    3133#include "NotImplemented.h"
    3234#include "BackForwardList.h"
     
    3739#include "ContextMenuController.h"
    3840#include "Cursor.h"
     41#include "Document.h"
    3942#include "DragClientGtk.h"
    4043#include "Editor.h"
     
    715718}
    716719
     720static AtkObject* webkit_web_view_get_accessible(GtkWidget* widget)
     721{
     722    WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
     723    AXObjectCache::enableAccessibility();
     724
     725    Frame* coreFrame = core(webView)->mainFrame();
     726    if (!coreFrame)
     727        return NULL;
     728
     729    Document* doc = coreFrame->document();
     730    if (!doc)
     731        return NULL;
     732
     733    AccessibilityObject* coreAccessible = doc->axObjectCache()->get(doc->renderer());
     734    if (!coreAccessible || !coreAccessible->wrapper())
     735        return NULL;
     736
     737    return coreAccessible->wrapper();
     738}
     739
    717740static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
    718741{
     
    10811104    widgetClass->popup_menu = webkit_web_view_popup_menu_handler;
    10821105    widgetClass->focus_in_event = webkit_web_view_focus_in_event;
     1106    widgetClass->get_accessible = webkit_web_view_get_accessible;
    10831107
    10841108    GtkContainerClass* containerClass = GTK_CONTAINER_CLASS(webViewClass);
Note: See TracChangeset for help on using the changeset viewer.