Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(949)

Issue 1892593003: Prevent child frames from sending bad accessibility events. (Closed)

Created:
4 years, 8 months ago by dmazzoni
Modified:
4 years, 8 months ago
CC:
aboxhall+watch_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, je_julie, nasko+codewatch_chromium.org, nektar+watch_chromium.org, yuzo+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Prevent child frames from sending bad accessibility events. A recent change in M51 to have a separate accessibility tree for each frame resulted in a subtle regression, where the BrowserAccessibilityManager for a child frame would send accessibility events before it was fully connected to its parent frame. Because of how accessibility events work on Windows, when an external accessibility client tried to respond to those events the target node wouldn't be found when calling get_accChild to retrieve it. The user-visible manifestation was that NVDA spoke "unknown" a lot, in response to those bogus events. The fundamental idea behind the fixes is that a native accessibility event shouldn't be fired unless the target node is a direct descendant of the HWND for that tab. This logic needs to handle all of the cases that arise when we have a separate BrowserAccessibilityManager for each frame. The specific issues were: * BrowserAccessibilityManager::GetRootManager was walking up to a parent frame without checking that the parent frame linked back to itself. * MaybeCallNotifyWinEvent was checking its own delegate's HWND rather than the target node's delegate's HWND. * RenderFrameHostImpl::AccessibilityGetAcceleratedWidget should only return a valid HWND for the main frame's current frame host. BUG=600145 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/fadccf76e38b76a0eb66f750ee668e89754596b7 Cr-Commit-Position: refs/heads/master@{#387681}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -9 lines) Patch
M content/browser/accessibility/browser_accessibility_manager.cc View 1 chunk +5 lines, -8 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_manager_win.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (8 generated)
dmazzoni
4 years, 8 months ago (2016-04-14 23:01:24 UTC) #3
dmazzoni
+jam for content/browser/frame_host
4 years, 8 months ago (2016-04-14 23:02:45 UTC) #5
nektarios
BrowserAccessibilityDelegate* delegate = node->manager()->GetDelegateFromRootManager(); Do we need to check if (node && node->instance_active()) first?
4 years, 8 months ago (2016-04-15 14:44:49 UTC) #6
nektarios
lgtm
4 years, 8 months ago (2016-04-15 14:44:58 UTC) #7
jam
On 2016/04/14 23:02:45, dmazzoni wrote: > +jam for content/browser/frame_host can you send this to someone ...
4 years, 8 months ago (2016-04-15 15:25:20 UTC) #8
dmazzoni
+dcheng (more familiar with accessibility code in content/browser/frame_host but not an owner) +creis (owner of ...
4 years, 8 months ago (2016-04-15 15:48:49 UTC) #10
dcheng
I forget: is the main frame inside an embedded WebContents also connected to the native ...
4 years, 8 months ago (2016-04-15 17:02:09 UTC) #11
dmazzoni
On 2016/04/15 17:02:09, dcheng wrote: > I forget: is the main frame inside an embedded ...
4 years, 8 months ago (2016-04-15 17:37:47 UTC) #12
dcheng
lgtm
4 years, 8 months ago (2016-04-15 17:42:07 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1892593003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1892593003/1
4 years, 8 months ago (2016-04-15 17:46:23 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/169233)
4 years, 8 months ago (2016-04-15 17:55:26 UTC) #17
Charlie Reis
content/ LGTM. Is it possible to follow up with a test (e.g., in case someone ...
4 years, 8 months ago (2016-04-15 19:50:20 UTC) #18
dmazzoni
Yes, good idea. While end-to-end testing is quite tricky there are definitely some unit tests ...
4 years, 8 months ago (2016-04-15 19:52:25 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1892593003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1892593003/1
4 years, 8 months ago (2016-04-15 19:52:47 UTC) #21
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 8 months ago (2016-04-15 19:57:07 UTC) #22
commit-bot: I haz the power
4 years, 8 months ago (2016-04-15 19:59:38 UTC) #24
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/fadccf76e38b76a0eb66f750ee668e89754596b7
Cr-Commit-Position: refs/heads/master@{#387681}

Powered by Google App Engine
This is Rietveld 408576698