[GTK] Crash in AccessibilityObject::accessibilityPlatformIncludesObject()

https://bugs.webkit.org/show_bug.cgi?id=95740

Patch by Joanmarie Diggs <jdiggs@igalia.com> on 2012-09-04
Reviewed by Martin Robinson.

Source/WebCore:

Added sanity check to be sure we have a render object prior to seeing if
said object is an anonymous block.

Testing via unit test because a non-flaky layout test crasher could not
be found.

* accessibility/gtk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
Sanity check for render object added.

Source/WebKit/gtk:

Updated unit test.

* tests/testatk.c:
(testWebkitAtkComboBox): Added checks that the menu popup in a combo box
has 0 links and, more importantly, that checking doesn't result in a crash.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4384ece1
2012-09-04 Joanmarie Diggs <jdiggs@igalia.com>
[GTK] Crash in AccessibilityObject::accessibilityPlatformIncludesObject()
https://bugs.webkit.org/show_bug.cgi?id=95740
Reviewed by Martin Robinson.
Added sanity check to be sure we have a render object prior to seeing if
said object is an anonymous block.
Testing via unit test because a non-flaky layout test crasher could not
be found.
* accessibility/gtk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
Sanity check for render object added.
2012-09-04 Christophe Dumez <christophe.dumez@intel.com> 2012-09-04 Christophe Dumez <christophe.dumez@intel.com>
Automatic features should work in sandboxed iframes if "allow-scripts" flag is set Automatic features should work in sandboxed iframes if "allow-scripts" flag is set
...@@ -104,7 +104,7 @@ AccessibilityObjectInclusion AccessibilityObject::accessibilityPlatformIncludesO ...@@ -104,7 +104,7 @@ AccessibilityObjectInclusion AccessibilityObject::accessibilityPlatformIncludesO
// anonymous blocks which are aria-related to themselves have an aria role, nor // anonymous blocks which are aria-related to themselves have an aria role, nor
// have we encountered instances where the parent of an anonymous block also lacked // have we encountered instances where the parent of an anonymous block also lacked
// an aria role but the grandparent had one. // an aria role but the grandparent had one.
if (renderer()->isAnonymousBlock() && !parent->renderer()->isBody() if (renderer() && renderer()->isAnonymousBlock() && !parent->renderer()->isBody()
&& parent->ariaRoleAttribute() == UnknownRole) && parent->ariaRoleAttribute() == UnknownRole)
return IgnoreObject; return IgnoreObject;
......
2012-09-04 Joanmarie Diggs <jdiggs@igalia.com>
[GTK] Crash in AccessibilityObject::accessibilityPlatformIncludesObject()
https://bugs.webkit.org/show_bug.cgi?id=95740
Reviewed by Martin Robinson.
Updated unit test.
* tests/testatk.c:
(testWebkitAtkComboBox): Added checks that the menu popup in a combo box
has 0 links and, more importantly, that checking doesn't result in a crash.
2012-09-01 Joanmarie Diggs <jdiggs@igalia.com> 2012-09-01 Joanmarie Diggs <jdiggs@igalia.com>
[Gtk] Incorrect/unexpected characters in the text of certain accessibles [Gtk] Incorrect/unexpected characters in the text of certain accessibles
......
...@@ -562,6 +562,10 @@ static void testWebkitAtkComboBox() ...@@ -562,6 +562,10 @@ static void testWebkitAtkComboBox()
g_assert(selectedItem == item1); g_assert(selectedItem == item1);
g_object_unref(selectedItem); g_object_unref(selectedItem);
/* Check that the menu popup has 0 links and doesn't crash from checking. */
gint nLinks = atk_hypertext_get_n_links(ATK_HYPERTEXT(menuPopup));
g_assert_cmpint(nLinks, ==, 0);
/* Check the implementations of the AtkAction interface. */ /* Check the implementations of the AtkAction interface. */
g_assert(ATK_IS_ACTION(comboBox)); g_assert(ATK_IS_ACTION(comboBox));
AtkAction* atkAction = ATK_ACTION(comboBox); AtkAction* atkAction = ATK_ACTION(comboBox);
......
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