Bug 72239 - Accessibility: Chromium requires an AX notification when an iframe loads.
Summary: Accessibility: Chromium requires an AX notification when an iframe loads.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dominic Mazzoni
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-13 22:18 PST by Dominic Mazzoni
Modified: 2011-11-17 17:29 PST (History)
4 users (show)

See Also:


Attachments
Patch (4.38 KB, patch)
2011-11-13 23:07 PST, Dominic Mazzoni
no flags Details | Formatted Diff | Diff
Patch (7.19 KB, patch)
2011-11-16 22:58 PST, Dominic Mazzoni
no flags Details | Formatted Diff | Diff
Patch for landing (7.26 KB, patch)
2011-11-16 23:32 PST, Dominic Mazzoni
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dominic Mazzoni 2011-11-13 22:18:35 PST
Chromium needs an AX notification when an iframe's document loads, because upon loading new renderers are created for the scroll area and document, invalidating the old ax objects associated with them, and Chromium needs to know to update its cache.

Sending an AXLayoutComplete will suffice for Chromium and will be harmless on Mac OS X.
Comment 1 Dominic Mazzoni 2011-11-13 23:07:07 PST
Created attachment 114882 [details]
Patch
Comment 2 chris fleizach 2011-11-16 07:58:49 PST
Comment on attachment 114882 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=114882&action=review

> Source/WebCore/dom/Document.cpp:2238
> +                    if (axIFrame)

my guess would be that since this is a new iframe, most of the time get() will return null because it won't be in the cache. you probably need to use getOrCreate

> LayoutTests/ChangeLog:9
> +

did this test already exist?
Comment 3 Dominic Mazzoni 2011-11-16 08:22:31 PST
Comment on attachment 114882 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=114882&action=review

>> Source/WebCore/dom/Document.cpp:2238
>> +                    if (axIFrame)
> 
> my guess would be that since this is a new iframe, most of the time get() will return null because it won't be in the cache. you probably need to use getOrCreate

Actually I used get() on purpose because it's not necessary to send the notification if it's not in the cache yet.

Is that okay or do you think it'd be preferable to always create the AccessibleObject?
Comment 4 chris fleizach 2011-11-16 08:30:51 PST
(In reply to comment #3)
> (From update of attachment 114882 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=114882&action=review
> 
> >> Source/WebCore/dom/Document.cpp:2238
> >> +                    if (axIFrame)
> > 
> > my guess would be that since this is a new iframe, most of the time get() will return null because it won't be in the cache. you probably need to use getOrCreate
> 
> Actually I used get() on purpose because it's not necessary to send the notification if it's not in the cache yet.
> 
> Is that okay or do you think it'd be preferable to always create the AccessibleObject?

I think we should do getOrCreate, otherwise we'll have to change it later when we realize we need to monitor these changes (and that might be the screen reader itself that wants to monitor it)... the topDocument() case comment says that it needs to make the object first, so it should probably happen for sub frames as well
Comment 5 Dominic Mazzoni 2011-11-16 22:57:58 PST
Sounds good, I'm updating it to use getOrCreate.

Also I apparently neglected to include the new test before. Adding it this time, it should make more sense now.
Comment 6 Dominic Mazzoni 2011-11-16 22:58:17 PST
Created attachment 115528 [details]
Patch
Comment 7 chris fleizach 2011-11-16 23:07:56 PST
Comment on attachment 115528 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=115528&action=review

r=me

> Source/WebCore/dom/Document.cpp:2232
> +            // LayoutComplete notification on it.

comment should explain why we need to post this notification (not what it is doing [which is evident from the code])
Comment 8 Dominic Mazzoni 2011-11-16 23:32:34 PST
Created attachment 115530 [details]
Patch for landing
Comment 9 WebKit Review Bot 2011-11-17 01:44:18 PST
Comment on attachment 115530 [details]
Patch for landing

Clearing flags on attachment: 115530

Committed r100584: <http://trac.webkit.org/changeset/100584>
Comment 10 WebKit Review Bot 2011-11-17 01:44:22 PST
All reviewed patches have been landed.  Closing bug.
Comment 11 Peter Kasting 2011-11-17 17:29:20 PST
Reverted r100698 for reason:

This change wasn't the problem either.

Committed r100705: <http://trac.webkit.org/changeset/100705>
Comment 12 Peter Kasting 2011-11-17 17:29:53 PST
webkit-patch should not have reopened.