Skip to content
Permalink
Browse files
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):

Canonical link: https://commits.webkit.org/41662@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@50220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eseidel committed Oct 28, 2009
1 parent c6bd5ae commit ae9a0fc0555a4744b6eef30a568376156a92fc08
@@ -1,3 +1,27 @@
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 @@ class AccessibilityObject : public RefCounted<AccessibilityObject> {
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 @@
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

0 comments on commit ae9a0fc

Please sign in to comment.