| Summary: | AX: WebKit not sending AXMenuClosed notification | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | chris fleizach <cfleizach> | ||||
| Component: | Accessibility | Assignee: | chris fleizach <cfleizach> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | aboxhall, apinheiro, commit-queue, dmazzoni, jcraig, jdiggs, mario, samuel_white, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Attachments: |
|
||||||
|
Description
chris fleizach
2013-12-16 09:17:29 PST
Created attachment 219510 [details]
patch
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" (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 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 |