RESOLVED FIXED 125783
AX: WebKit not sending AXMenuClosed notification
https://bugs.webkit.org/show_bug.cgi?id=125783
Summary AX: WebKit not sending AXMenuClosed notification
chris fleizach
Reported 2013-12-16 09:17:29 PST
Attachments
patch (12.60 KB, patch)
2013-12-18 00:05 PST, chris fleizach
mario: review+
chris fleizach
Comment 1 2013-12-16 09:17:42 PST
chris fleizach
Comment 2 2013-12-18 00:05:23 PST
Mario Sanchez Prada
Comment 3 2013-12-18 04:03:46 PST
Comment on attachment 219510 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=219510&action=review > Source/WebCore/accessibility/AccessibilityObject.cpp:95 > + // Menu close events need to notify the platform. No element is used in the notification because it's a destruction event. > + if (detachmentType == ElementDestroyed && roleValue() == MenuRole && cache) > + cache->postNotification(nullptr, &cache->document(), AXObjectCache::AXMenuClosed); Would it be possible to use AccessibilityObject::document() here, so you would not need to add AXObjectCache::document()? Also, would it be possible to use AccessibilityObject::axObjectCache(), instead of having to add that new first parameter to AccessibilityObject::detach()? I guess the answer is that it's probably too late here to get the document (and hence the AXObjectCache out of it) from the AccessibilityObject that is being detached, but I have to ask anyway :) If that's the case, maybe it would be cleaner to swap the arguments in detach() and add a default value for the cache, so we have something like void detach(AccessibilityDetachmentType, AXObjectCache* axObjectCache = nullptr) that allows you to omit that "mysterious" nullptr parameter when not using ElementDestroyed as the "detachment type"
chris fleizach
Comment 4 2013-12-18 05:48:33 PST
(In reply to comment #3) > (From update of attachment 219510 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=219510&action=review > > > Source/WebCore/accessibility/AccessibilityObject.cpp:95 > > + // Menu close events need to notify the platform. No element is used in the notification because it's a destruction event. > > + if (detachmentType == ElementDestroyed && roleValue() == MenuRole && cache) > > + cache->postNotification(nullptr, &cache->document(), AXObjectCache::AXMenuClosed); > > Would it be possible to use AccessibilityObject::document() here, so you would not need to add AXObjectCache::document()? > > Also, would it be possible to use AccessibilityObject::axObjectCache(), instead of having to add that new first parameter to AccessibilityObject::detach()? > > I guess the answer is that it's probably too late here to get the document (and hence the AXObjectCache out of it) from the AccessibilityObject that is being detached, but I have to ask anyway :) Correct > > If that's the case, maybe it would be cleaner to swap the arguments in detach() and add a default value for the cache, so we have something like void detach(AccessibilityDetachmentType, AXObjectCache* axObjectCache = nullptr) that allows you to omit that "mysterious" nullptr parameter when not using ElementDestroyed as the "detachment type" Yep. No problem
Mario Sanchez Prada
Comment 5 2013-12-18 07:45:53 PST
Comment on attachment 219510 [details] patch (In reply to comment #4) > [...] > > If that's the case, maybe it would be cleaner to swap the arguments in detach() and add a default value for the cache, so we have something like void detach(AccessibilityDetachmentType, AXObjectCache* axObjectCache = nullptr) that allows you to omit that "mysterious" nullptr parameter when not using ElementDestroyed as the "detachment type" > > Yep. No problem Thanks for the confirmation. Setting r+ now
chris fleizach
Comment 6 2013-12-18 10:49:27 PST
Note You need to log in before you can comment on or make changes to this bug.