[Webkit-unassigned] [Bug 53146] [GTK] Combo boxes should emit object:selection-changed even when collapsed

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 18 04:53:28 PST 2011


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


Mario Sanchez Prada <msanchez at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #82005|0                           |1
        is obsolete|                            |
  Attachment #82943|                            |review?
               Flag|                            |




--- Comment #8 from Mario Sanchez Prada <msanchez at igalia.com>  2011-02-18 04:53:27 PST ---
Created an attachment (id=82943)
 --> (https://bugs.webkit.org/attachment.cgi?id=82943&action=review)
Patch proposal + Layout test

(In reply to comment #7)
> Reverted r78979 for reason:
> 
> causes multiple crashes on GTK
> 
> Committed r78987: <http://trac.webkit.org/changeset/78987>

Attaching a new version of the patch fixing that issue. The diff between the new patch and the previous one is as follows:

--- a/Source/WebCore/accessibility/gtk/AXObjectCacheAtk.cpp
+++ b/Source/WebCore/accessibility/gtk/AXObjectCacheAtk.cpp
@@ -95,10 +95,10 @@ static void notifyChildrenSelectionChange(AccessibilityObject* object)
         return;
     AccessibilityObject* item = items.at(changedItemIndex).get();

-    // Ensure the oldFocusedObject belongs to the same document that
+    // Ensure oldFocusedObject belongs to the same list object that
     // the current item so further comparisons make sense. Otherwise,
     // just reset oldFocusedObject so it won't be taken into account.
-    if (item && oldFocusedObject && item->document() != oldFocusedObject->document())
+    if (item && oldFocusedObject && item->parentObject() != oldFocusedObject->parentObject())
         oldFocusedObject = 0;


The problem was that at some point AccessibleObject:documentFrameView() (called internally from AccessibilityObject::document()) was crashing because of reaching and invalid object when called oldFocusedObject->document(). And this was easily avoidable by just checking that the parent object (instead of the document) for the currently selected item ('item') and the old focused object are the same, which is more than enough.

Tested locally and this doesn't make other tests crash anymore.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list