summaryrefslogtreecommitdiffstats
path: root/WebCore/accessibility
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/accessibility')
-rw-r--r--WebCore/accessibility/chromium/AXObjectCacheChromium.cpp24
-rw-r--r--WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp12
2 files changed, 28 insertions, 8 deletions
diff --git a/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp b/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp
index a97dfe2..4118c63 100644
--- a/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp
+++ b/WebCore/accessibility/chromium/AXObjectCacheChromium.cpp
@@ -26,11 +26,22 @@
#include "config.h"
#include "AXObjectCache.h"
-
#include "AccessibilityObject.h"
+#include "Chrome.h"
+#include "ChromeClientChromium.h"
+#include "FrameView.h"
namespace WebCore {
+static ChromeClientChromium* toChromeClientChromium(FrameView* view)
+{
+ Page* page = view->frame() ? view->frame()->page() : 0;
+ if (!page)
+ return 0;
+
+ return static_cast<ChromeClientChromium*>(page->chrome()->client());
+}
+
void AXObjectCache::detachWrapper(AccessibilityObject* obj)
{
// In Chromium, AccessibilityObjects are wrapped lazily.
@@ -43,8 +54,17 @@ void AXObjectCache::attachWrapper(AccessibilityObject*)
// In Chromium, AccessibilityObjects are wrapped lazily.
}
-void AXObjectCache::postPlatformNotification(AccessibilityObject*, AXNotification)
+void AXObjectCache::postPlatformNotification(AccessibilityObject* obj, AXNotification notification)
{
+ if (notification != AXCheckedStateChanged)
+ return;
+
+ if (!obj || !obj->document() || !obj->documentFrameView())
+ return;
+
+ ChromeClientChromium* client = toChromeClientChromium(obj->documentFrameView());
+ if (client)
+ client->didChangeAccessibilityObjectState(obj);
}
void AXObjectCache::handleFocusedUIElementChanged(RenderObject*, RenderObject*)
diff --git a/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp b/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
index a4d1638..487fa5b 100644
--- a/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
+++ b/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
@@ -884,14 +884,14 @@ gchar* textForObject(AccessibilityRenderObject* accObject)
continue;
}
- RenderText* renderText = toRenderText(obj);
- // Be sure we have a RenderText object we can work with.
- if (!renderText || !obj->isText()) {
+ RenderText* renderText;
+ if (obj->isText())
+ renderText = toRenderText(obj);
+ else if (obj->firstChild() && obj->firstChild()->isText()) {
// Handle RenderInlines (and any other similiar RenderObjects).
renderText = toRenderText(obj->firstChild());
- if (!renderText)
- continue;
- }
+ } else
+ continue;
InlineTextBox* box = renderText->firstTextBox();
while (box) {