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

Issue 1621823003: Avoid getting stuck when calling focus() on iframe nodes. (Closed)

Created:
4 years, 11 months ago by David Tseng
Modified:
4 years, 11 months ago
Reviewers:
dmazzoni
CC:
chromium-reviews, oshima+watch_chromium.org, plundblad+watch_chromium.org, aboxhall+watch_chromium.org, nektar+watch_chromium.org, yuzo+watch_chromium.org, je_julie, arv+watch_chromium.org, dtseng+watch_chromium.org, dmazzoni+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid getting stuck when calling focus() on iframe nodes. Given a focusable node |iframe| with role iframe and a focusable child |webarea| with role webArea, iframe.focus() results in a focus event being fired on |webarea|. When navigating backwards, since ChromeVox visits every node in depth-first ordering (reversed in this case), the following occurs - ChromeVox range is on |webarea| - ChromeVox walks and matches on |iframe| - Chromevox calls iframe.focus(). - focus event fires on |webarea| result: ChromeVox range goes to |webarea| again and gets read aloud/brailled. expected: ChromeVox range should be on the |iframe|. We can achieve this by not calling focus on the iframe node itself. Additionally, consider nodes that already have the focused state set as being really focused (i.e. do not call focus() again). Committed: https://crrev.com/ac9cb99e59ade93c139464a338900ab0b204fdf0 Cr-Commit-Position: refs/heads/master@{#371309}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -1 line) Patch
M chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js View 1 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs View 1 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (6 generated)
David Tseng
4 years, 11 months ago (2016-01-22 23:10:07 UTC) #3
dmazzoni
lgtm https://codereview.chromium.org/1621823003/diff/1/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js File chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js (right): https://codereview.chromium.org/1621823003/diff/1/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js#newcode506 chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js:506: if (!actionNode.role == RoleType.iframe && actionNode.state.focused) The order ...
4 years, 11 months ago (2016-01-23 00:01:38 UTC) #4
David Tseng
Added test as well. https://codereview.chromium.org/1621823003/diff/1/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js File chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js (right): https://codereview.chromium.org/1621823003/diff/1/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js#newcode506 chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js:506: if (!actionNode.role == RoleType.iframe && ...
4 years, 11 months ago (2016-01-25 20:13:16 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1621823003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1621823003/20001
4 years, 11 months ago (2016-01-25 20:16:18 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 11 months ago (2016-01-25 20:54:19 UTC) #10
commit-bot: I haz the power
4 years, 11 months ago (2016-01-25 20:55:39 UTC) #12
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/ac9cb99e59ade93c139464a338900ab0b204fdf0
Cr-Commit-Position: refs/heads/master@{#371309}

Powered by Google App Engine
This is Rietveld 408576698