Commit 9e4b9729 authored by eric@webkit.org's avatar eric@webkit.org
Browse files

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

        Reviewed by Xan Lopez.

        https://bugs.webkit.org/show_bug.cgi?id=27085
        [Gtk] Incorrect rendering of list

        Adds a way for platforms to indicate that a particular object
        should not be ignored.

        * 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@50053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b461c379
2009-10-26 Joanmarie Diggs <joanmarie.diggs@gmail.com>
Reviewed by Xan Lopez.
https://bugs.webkit.org/show_bug.cgi?id=27085
[Gtk] Incorrect rendering of list
Adds a way for platforms to indicate that a particular object
should not be ignored.
* 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-26 Kinuko Yasuda <kinuko@google.com> 2009-10-26 Kinuko Yasuda <kinuko@google.com>
   
Reviewed by Jan Alonzo. Reviewed by Jan Alonzo.
...@@ -459,6 +459,13 @@ public: ...@@ -459,6 +459,13 @@ public:
bool accessibilityIgnoreAttachment() const { return true; } bool accessibilityIgnoreAttachment() const { return true; }
#endif #endif
// gives platforms the opportunity to indicate that an object shouldn't be ignored
#if HAVE(ACCESSIBILITY)
bool accessibilityPlatformIncludesObject() const;
#else
bool accessibilityPlatformIncludesObject() const { return false; }
#endif
// allows for an AccessibilityObject to update its render tree or perform // allows for an AccessibilityObject to update its render tree or perform
// other operations update type operations // other operations update type operations
virtual void updateBackingStore() { } virtual void updateBackingStore() { }
......
...@@ -1258,6 +1258,10 @@ bool AccessibilityRenderObject::ariaIsHidden() const ...@@ -1258,6 +1258,10 @@ bool AccessibilityRenderObject::ariaIsHidden() const
bool AccessibilityRenderObject::accessibilityIsIgnored() const bool AccessibilityRenderObject::accessibilityIsIgnored() const
{ {
// is the platform is interested in this object?
if (accessibilityPlatformIncludesObject())
return false;
// ignore invisible element // ignore invisible element
if (!m_renderer || m_renderer->style()->visibility() != VISIBLE) if (!m_renderer || m_renderer->style()->visibility() != VISIBLE)
return true; return true;
......
...@@ -34,4 +34,9 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const ...@@ -34,4 +34,9 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const
return false; return false;
} }
bool AccessibilityObject::accessibilityPlatformIncludesObject() const
{
return false;
}
} // namespace WebCore } // namespace WebCore
...@@ -32,6 +32,19 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const ...@@ -32,6 +32,19 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const
return false; return false;
} }
bool 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 false;
}
AccessibilityObjectWrapper* AccessibilityObject::wrapper() const AccessibilityObjectWrapper* AccessibilityObject::wrapper() const
{ {
return m_wrapper; return m_wrapper;
......
...@@ -40,6 +40,11 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const ...@@ -40,6 +40,11 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const
return [attachment accessibilityIsIgnored]; return [attachment accessibilityIsIgnored];
} }
bool AccessibilityObject::accessibilityPlatformIncludesObject() const
{
return false;
}
} // WebCore } // WebCore
......
...@@ -29,6 +29,11 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const ...@@ -29,6 +29,11 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const
return false; return false;
} }
bool AccessibilityObject::accessibilityPlatformIncludesObject() const
{
return false;
}
} // namespace WebCore } // namespace WebCore
#endif // HAVE(ACCESSIBILITY) #endif // HAVE(ACCESSIBILITY)
...@@ -35,6 +35,11 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const ...@@ -35,6 +35,11 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const
return false; return false;
} }
bool AccessibilityObject::accessibilityPlatformIncludesObject() const
{
return false;
}
} // namespace WebCore } // namespace WebCore
#endif // HAVE(ACCESSIBILITY) #endif // HAVE(ACCESSIBILITY)
...@@ -29,6 +29,11 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const ...@@ -29,6 +29,11 @@ bool AccessibilityObject::accessibilityIgnoreAttachment() const
return false; return false;
} }
bool AccessibilityObject::accessibilityPlatformIncludesObject() const
{
return false;
}
} // namespace WebCore } // namespace WebCore
#endif // HAVE(ACCESSIBILITY) #endif // HAVE(ACCESSIBILITY)
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