Commit 9ee2bd90 authored by eric@webkit.org's avatar eric@webkit.org

2009-10-28 Joanmarie Diggs <joanmarie.diggs@gmail.com>

        Reviewed by Jan Alonzo.

        https://bugs.webkit.org/show_bug.cgi?id=25897
        [Gtk] Extraneous object of ROLE_PANEL in hierarchy for entries

        Expands upon the new funtionality which allows platforms to indicate
        that a particular object should not be ignored, so that they can
        specify that an object should be ignored or that it should be left up
        to the default handling to decide.

        * accessibility/AccessibilityObject.h:
        * accessibility/chromium/AccessibilityObjectChromium.cpp:
        * accessibility/gtk/AccessibilityObjectAtk.cpp:
        * accessibility/mac/AccessibilityObjectMac.mm:
        * accessibility/qt/AccessibilityObjectQt.cpp:
        * accessibility/win/AccessibilityObjectWin.cpp:
        * accessibility/wx/AccessibilityObjectWx.cpp:
        (AccessibilityObject::accessibilityPlatformIncludesObject):
        * accessibility/AccessibilityRenderObject.cpp:
        (AccessibilityRenderObject::accessibilityIsIgnored):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d7b62942
2009-10-28 Joanmarie Diggs <joanmarie.diggs@gmail.com>
Reviewed by Jan Alonzo.
https://bugs.webkit.org/show_bug.cgi?id=25897
[Gtk] Extraneous object of ROLE_PANEL in hierarchy for entries
Expands upon the new funtionality which allows platforms to indicate
that a particular object should not be ignored, so that they can
specify that an object should be ignored or that it should be left up
to the default handling to decide.
* accessibility/AccessibilityObject.h:
* accessibility/chromium/AccessibilityObjectChromium.cpp:
* accessibility/gtk/AccessibilityObjectAtk.cpp:
* accessibility/mac/AccessibilityObjectMac.mm:
* accessibility/qt/AccessibilityObjectQt.cpp:
* accessibility/win/AccessibilityObjectWin.cpp:
* accessibility/wx/AccessibilityObjectWx.cpp:
(AccessibilityObject::accessibilityPlatformIncludesObject):
* accessibility/AccessibilityRenderObject.cpp:
(AccessibilityRenderObject::accessibilityIsIgnored):
2009-10-28 Joanmarie Diggs <joanmarie.diggs@gmail.com>
Reviewed by Jan Alonzo.
......@@ -189,6 +189,12 @@ enum AccessibilityOrientation {
AccessibilityOrientationHorizontal,
};
enum AccessibilityObjectPlatformInclusion {
IncludeObject,
IgnoreObject,
DefaultBehavior,
};
struct VisiblePositionRange {
VisiblePosition start;
......@@ -460,11 +466,11 @@ public:
bool accessibilityIgnoreAttachment() const { return true; }
#endif
// gives platforms the opportunity to indicate that an object shouldn't be ignored
// gives platforms the opportunity to indicate if and how an object should be included
#if HAVE(ACCESSIBILITY)
bool accessibilityPlatformIncludesObject() const;
AccessibilityObjectPlatformInclusion accessibilityPlatformIncludesObject() const;
#else
bool accessibilityPlatformIncludesObject() const { return false; }
AccessibilityObjectPlatformInclusion accessibilityPlatformIncludesObject() const { return DefaultBehavior; }
#endif
// allows for an AccessibilityObject to update its render tree or perform
......
......@@ -1259,8 +1259,12 @@ bool AccessibilityRenderObject::ariaIsHidden() const
bool AccessibilityRenderObject::accessibilityIsIgnored() const
{
// is the platform is interested in this object?
if (accessibilityPlatformIncludesObject())
AccessibilityObjectPlatformInclusion decision = accessibilityPlatformIncludesObject();
if (decision == IncludeObject)
return false;
if (decision == IgnoreObject)
return true;
// the decision must, therefore, be DefaultBehavior.
// ignore invisible element
if (!m_renderer || m_renderer->style()->visibility() != VISIBLE)
......
......@@ -34,9 +34,9 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const
return false;
}
bool AccessibilityObject::accessibilityPlatformIncludesObject() const
AccessibilityObjectPlatformInclusion AccessibilityObject::accessibilityPlatformIncludesObject() const
{
return false;
return DefaultBehavior;
}
} // namespace WebCore
......@@ -32,17 +32,17 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const
return false;
}
bool AccessibilityObject::accessibilityPlatformIncludesObject() const
AccessibilityObjectPlatformInclusion AccessibilityObject::accessibilityPlatformIncludesObject() const
{
// When a list item is made up entirely of children (e.g. paragraphs)
// the list item gets ignored. We need it.
if (isGroup()) {
AccessibilityObject* parent = parentObject();
if (parent && parent->isList())
return true;
return IncludeObject;
}
return false;
return DefaultBehavior;
}
AccessibilityObjectWrapper* AccessibilityObject::wrapper() const
......
......@@ -41,9 +41,9 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const
return [attachment accessibilityIsIgnored];
}
bool AccessibilityObject::accessibilityPlatformIncludesObject() const
AccessibilityObjectPlatformInclusion AccessibilityObject::accessibilityPlatformIncludesObject() const
{
return false;
return DefaultBehavior;
}
} // WebCore
......
......@@ -29,9 +29,9 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const
return false;
}
bool AccessibilityObject::accessibilityPlatformIncludesObject() const
AccessibilityObjectPlatformInclusion AccessibilityObject::accessibilityPlatformIncludesObject() const
{
return false;
return DefaultBehavior;
}
} // namespace WebCore
......
......@@ -35,9 +35,9 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const
return false;
}
bool AccessibilityObject::accessibilityPlatformIncludesObject() const
AccessibilityObjectPlatformInclusion AccessibilityObject::accessibilityPlatformIncludesObject() const
{
return false;
return DefaultBehavior;
}
} // namespace WebCore
......
......@@ -29,9 +29,9 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const
return false;
}
bool AccessibilityObject::accessibilityPlatformIncludesObject() const
AccessibilityObjectPlatformInclusion AccessibilityObject::accessibilityPlatformIncludesObject() const
{
return false;
return DefaultBehavior;
}
} // namespace WebCore
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment