Changeset 54584 in webkit


Ignore:
Timestamp:
Feb 9, 2010 8:01:48 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-02-09 Chris Guillory <ctguil@google.com>

Reviewed by Darin Fisher.

[Chromium] Notify ChromeClientChromium of state change notifications.

https://bugs.webkit.org/show_bug.cgi?id=34464

  • accessibility/chromium/AXObjectCacheChromium.cpp: (WebCore::toChromeClientChromium): (WebCore::AXObjectCache::postPlatformNotification):
  • page/chromium/ChromeClientChromium.h:

2010-02-09 Chris Guillory <ctguil@google.com>

Reviewed by Darin Fisher.

[Chromium] Add function for accessibility object state change notifications.

https://bugs.webkit.org/show_bug.cgi?id=34464

  • gyp_webkit:
  • public/WebViewClient.h: (WebKit::WebViewClient::didChangeAccessibilityObjectState):
  • src/ChromeClientImpl.cpp: (WebKit::ChromeClientImpl::didChangeAccessibilityObjectState):
  • src/ChromeClientImpl.h:
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r54583 r54584  
     12010-02-09  Chris Guillory  <ctguil@google.com>
     2
     3        Reviewed by Darin Fisher.
     4
     5        [Chromium] Notify ChromeClientChromium of state change notifications.
     6       
     7        https://bugs.webkit.org/show_bug.cgi?id=34464
     8
     9        * accessibility/chromium/AXObjectCacheChromium.cpp:
     10        (WebCore::toChromeClientChromium):
     11        (WebCore::AXObjectCache::postPlatformNotification):
     12        * page/chromium/ChromeClientChromium.h:
     13
    1142010-02-09  Kwang Yul Seo  <skyul@company100.net>
    215
  • trunk/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp

    r54466 r54584  
    2727#include "config.h"
    2828#include "AXObjectCache.h"
    29 
    3029#include "AccessibilityObject.h"
     30#include "Chrome.h"
     31#include "ChromeClientChromium.h"
     32#include "FrameView.h"
    3133
    3234namespace WebCore {
     35
     36static ChromeClientChromium* toChromeClientChromium(FrameView* view)
     37{
     38    Page* page = view->frame() ? view->frame()->page() : 0;
     39    if (!page)
     40        return 0;
     41
     42    return static_cast<ChromeClientChromium*>(page->chrome()->client());
     43}
    3344
    3445void AXObjectCache::detachWrapper(AccessibilityObject* obj)
     
    4455}
    4556
    46 void AXObjectCache::postPlatformNotification(AccessibilityObject*, AXNotification)
     57void AXObjectCache::postPlatformNotification(AccessibilityObject* obj, AXNotification notification)
    4758{
     59    if (notification != AXCheckedStateChanged)
     60        return;
     61
     62    if (!obj || !obj->document() || !obj->documentFrameView())
     63        return;
     64
     65    ChromeClientChromium* client = toChromeClientChromium(obj->documentFrameView());
     66    if (client)
     67        client->didChangeAccessibilityObjectState(obj);
    4868}
    4969
  • trunk/WebCore/page/chromium/ChromeClientChromium.h

    r54466 r54584  
    3636
    3737namespace WebCore {
    38     class IntRect;
    39     class PopupContainer;
     38class AccessibilityObject;
     39class IntRect;
     40class PopupContainer;
    4041
    41     // Contains Chromium-specific extensions to the ChromeClient.  Only put
    42     // things here that don't make sense for other ports.
    43     class ChromeClientChromium : public ChromeClient {
    44     public:
    45         // Notifies the client of a new popup widget.  The client should place
    46         // and size the widget with the given bounds, relative to the screen.
    47         // If handleExternal is true, then drawing and input handling for the
    48         // popup will be handled by the external embedder.
    49         virtual void popupOpened(PopupContainer* popupContainer, const IntRect& bounds,
    50                                  bool focusOnShow, bool handleExternal) = 0;
    51     };
     42// Contains Chromium-specific extensions to the ChromeClient.  Only put
     43// things here that don't make sense for other ports.
     44class ChromeClientChromium : public ChromeClient {
     45public:
     46    // Notifies the client of a new popup widget.  The client should place
     47    // and size the widget with the given bounds, relative to the screen.
     48    // If handleExternal is true, then drawing and input handling for the
     49    // popup will be handled by the external embedder.
     50    virtual void popupOpened(PopupContainer* popupContainer, const IntRect& bounds,
     51                             bool focusOnShow, bool handleExternal) = 0;
     52
     53    // Notifies embedder that the state of an accessibility object has changed.
     54    virtual void didChangeAccessibilityObjectState(AccessibilityObject*) = 0;
     55};
    5256
    5357} // namespace WebCore
  • trunk/WebKit/chromium/ChangeLog

    r54576 r54584  
     12010-02-09  Chris Guillory  <ctguil@google.com>
     2
     3        Reviewed by Darin Fisher.
     4
     5        [Chromium] Add function for accessibility object state change notifications.
     6       
     7        https://bugs.webkit.org/show_bug.cgi?id=34464
     8
     9        * gyp_webkit:
     10        * public/WebViewClient.h:
     11        (WebKit::WebViewClient::didChangeAccessibilityObjectState):
     12        * src/ChromeClientImpl.cpp:
     13        (WebKit::ChromeClientImpl::didChangeAccessibilityObjectState):
     14        * src/ChromeClientImpl.h:
     15
    1162010-02-09  Mikhail Naganov  <mnaganov@chromium.org>
    217
  • trunk/WebKit/chromium/public/WebViewClient.h

    r54466 r54584  
    253253    virtual void focusAccessibilityObject(const WebAccessibilityObject&) { }
    254254
     255    // Notifies embedder that the state of an accessibility object has changed.
     256    virtual void didChangeAccessibilityObjectState(const WebAccessibilityObject&) { }
     257
    255258
    256259    // Developer tools -----------------------------------------------------
  • trunk/WebKit/chromium/src/ChromeClientImpl.cpp

    r54466 r54584  
    660660}
    661661
     662void ChromeClientImpl::didChangeAccessibilityObjectState(AccessibilityObject* obj)
     663{
     664    // Alert assistive technology about the accessibility object state change
     665    if (obj)
     666        m_webView->client()->didChangeAccessibilityObjectState(WebAccessibilityObject(obj));
     667}
     668
     669
    662670#if ENABLE(NOTIFICATIONS)
    663671NotificationPresenter* ChromeClientImpl::notificationPresenter() const
  • trunk/WebKit/chromium/src/ChromeClientImpl.h

    r54466 r54584  
    3535
    3636namespace WebCore {
     37class AccessibilityObject;
    3738class HTMLParserQuirks;
    3839class PopupContainer;
     
    133134                             bool activatable,
    134135                             bool handleExternally);
     136    virtual void didChangeAccessibilityObjectState(WebCore::AccessibilityObject*);
    135137
    136138    // ChromeClientImpl:
Note: See TracChangeset for help on using the changeset viewer.