Bug 26995

Summary: AX: Some webpages do not send AXLoadComplete
Product: WebKit Reporter: chris fleizach <cfleizach>
Component: AccessibilityAssignee: chris fleizach <cfleizach>
Status: RESOLVED FIXED    
Severity: Normal CC: cfleizach, darin, gfhughesVO+webkit
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Proposed patch
darin: review-
Updated patch
none
Updated patch 3 darin: review+

chris fleizach
Reported 2009-07-06 11:50:21 PDT
some webpages are not sending AXLoadComplete notifications
Attachments
Proposed patch (623 bytes, patch)
2009-07-06 16:08 PDT, Greg Hughes
darin: review-
Updated patch (1.56 KB, application/octet-stream)
2009-07-06 18:50 PDT, Greg Hughes
no flags
Updated patch 3 (2.58 KB, patch)
2009-07-06 19:17 PDT, Greg Hughes
darin: review+
Greg Hughes
Comment 1 2009-07-06 16:08:28 PDT
Created attachment 32332 [details] Proposed patch Patch ensures that the AXCache is updated with the current document before posting the AXLoadComplete notification.
chris fleizach
Comment 2 2009-07-06 16:10:46 PDT
you could probably cache renderer() you might want to add a comment saying why we need to do this
Darin Adler
Comment 3 2009-07-06 18:00:42 PDT
Comment on attachment 32332 [details] Proposed patch Code change looks fine. Needs comment explaining why it's calling getOrCreate and discarding the result. Needs a ChangeLog. review- because of those issues
chris fleizach
Comment 4 2009-07-06 18:01:50 PDT
greg, also run the prepare-ChangeLog script and re-submit the patch (along with comments), which will obviate this patch
Greg Hughes
Comment 5 2009-07-06 18:50:42 PDT
Created attachment 32350 [details] Updated patch patch updated to cache renderer() and include a comment
Greg Hughes
Comment 6 2009-07-06 19:17:04 PDT
Created attachment 32351 [details] Updated patch 3 Updated patch based on review
Darin Adler
Comment 7 2009-07-07 00:54:15 PDT
Comment on attachment 32351 [details] Updated patch 3 > + RenderObject* render = renderer(); An idiom we use for this is RenderObject* renderer = this->renderer(); The downside of naming the variable "render" is that's a verb with a different meaning. Is there any way to make a regression test for this? r=me
chris fleizach
Comment 8 2009-07-07 08:35:22 PDT
for a regression test... what if we stored the last notification to be sent in AXObjectCache. then in the layout test we could have a mechanism to ask for the last notification, which would allow us to ensure it was sent. it seems like we might want to also add an ASSERT checking that there is an ax object available before posting the notification, so that we might catch other cases where this is happening
Darin Adler
Comment 9 2009-07-07 10:10:35 PDT
(In reply to comment #8) > it seems like we might want to also add an ASSERT checking that there is an ax > object available before posting the notification, so that we might catch other > cases where this is happening We can't do that until we fix the real problem, because we know that assert will fire.
chris fleizach
Comment 10 2009-07-07 11:54:01 PDT
i was not able to write a layout test for this because i need the layout test to stall until it the notification gets posted. unfortunately, the layout tests get run and exited before the notification is actually sent.
chris fleizach
Comment 11 2009-07-07 12:06:04 PDT
Darin Adler
Comment 12 2009-07-07 14:06:57 PDT
(In reply to comment #10) > i was not able to write a layout test for this because i need the layout test > to stall until it the notification gets posted. unfortunately, the layout tests > get run and exited before the notification is actually sent. That's something we can tackle later; it can be overcome so we can make a test for this. You can call layoutTestController.waitUntilDone() to prevent the layout test machinery from moving on to the next test until layoutTestController.notifyDone() is called. Then you just have to figure out how to get some JavaScript code called once the test truly is done.
Note You need to log in before you can comment on or make changes to this bug.