summaryrefslogtreecommitdiffstats
path: root/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp')
-rw-r--r--WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp33
1 files changed, 25 insertions, 8 deletions
diff --git a/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp b/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp
index f48770f..e32340a 100644
--- a/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp
+++ b/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp
@@ -32,26 +32,43 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const
return false;
}
-AccessibilityObjectPlatformInclusion AccessibilityObject::accessibilityPlatformIncludesObject() const
+AccessibilityObjectInclusion AccessibilityObject::accessibilityPlatformIncludesObject() const
{
AccessibilityObject* parent = parentObject();
if (!parent)
return DefaultBehavior;
- if (isMenuListPopup() || isMenuListOption())
- return IgnoreObject;
-
- // When a list item is made up entirely of children (e.g. paragraphs)
- // the list item gets ignored. We need it.
- if (isGroup() && parent->isList())
+ if (roleValue() == SplitterRole)
return IncludeObject;
+ if (isGroup()) {
+ // When a list item is made up entirely of children (e.g. paragraphs)
+ // the list item gets ignored. We need it.
+ if (parent->isList())
+ return IncludeObject;
+
+ // We expect the parent of a table cell to be a table.
+ AccessibilityObject* child = firstChild();
+ if (child && child->roleValue() == CellRole)
+ return IgnoreObject;
+ }
+
// Entries and password fields have extraneous children which we want to ignore.
if (parent->isPasswordField() || parent->isTextControl())
return IgnoreObject;
+ AccessibilityRole role = roleValue();
+
+ // Include all tables, even layout tables. The AT can decide what to do with each.
+ if (role == CellRole || role == TableRole)
+ return IncludeObject;
+
+ // We at some point might have a need to expose a table row; but it's not standard Gtk+.
+ if (role == RowRole)
+ return IgnoreObject;
+
// The object containing the text should implement AtkText itself.
- if (roleValue() == StaticTextRole)
+ if (role == StaticTextRole)
return IgnoreObject;
return DefaultBehavior;