Changeset 46574 in webkit


Ignore:
Timestamp:
Jul 30, 2009 12:52:23 AM (15 years ago)
Author:
xan@webkit.org
Message:

2009-07-30 Xan Lopez <xlopez@igalia.com>

Reviewed by Maciej Stachowiak.

https://bugs.webkit.org/show_bug.cgi?id=25535
[GTK] object:state-changed:checked events missing for radio buttons and checkboxes

Implement state-changed:checked for radio buttons and checkboxes.

  • accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::postPlatformNotification):
  • html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setChecked):
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r46573 r46574  
     12009-07-30  Xan Lopez  <xlopez@igalia.com>
     2
     3        Reviewed by Maciej Stachowiak.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=25535
     6        [GTK] object:state-changed:checked events missing for radio buttons and checkboxes
     7
     8        Implement state-changed:checked for radio buttons and checkboxes.
     9
     10        * accessibility/gtk/AXObjectCacheAtk.cpp:
     11        (WebCore::AXObjectCache::postPlatformNotification):
     12        * html/HTMLInputElement.cpp:
     13        (WebCore::HTMLInputElement::setChecked):
     14
    1152009-07-30  Xan Lopez  <xlopez@igalia.com>
    216
  • trunk/WebCore/accessibility/gtk/AXObjectCacheAtk.cpp

    r44266 r46574  
    3838}
    3939
    40 void AXObjectCache::postPlatformNotification(AccessibilityObject*, const String&)
     40void AXObjectCache::postPlatformNotification(AccessibilityObject* coreObject, const String& message)
    4141{
     42    if (message == "AXCheckedStateChanged") {
     43        if (!coreObject->isCheckboxOrRadio())
     44            return;
     45        g_signal_emit_by_name(coreObject->wrapper(), "state-change", "checked", coreObject->isChecked());
     46    }
    4247}
    4348   
  • trunk/WebCore/html/HTMLInputElement.cpp

    r46437 r46574  
    2727#include "HTMLInputElement.h"
    2828
     29#include "AXObjectCache.h"
    2930#include "CSSPropertyNames.h"
    3031#include "ChromeClient.h"
     
    973974        renderer()->theme()->stateChanged(renderer(), CheckedState);
    974975
     976    // Ideally we'd do this from the render tree (matching
     977    // RenderTextView), but it's not possible to do it at the moment
     978    // because of the way the code is structured.
     979    if (renderer() && AXObjectCache::accessibilityEnabled())
     980        renderer()->document()->axObjectCache()->postNotification(renderer(), "AXCheckedStateChanged", true);
     981
    975982    // Only send a change event for items in the document (avoid firing during
    976983    // parsing) and don't send a change event for a radio button that's getting
Note: See TracChangeset for help on using the changeset viewer.