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

Issue 2814213002: Refactor Select-to-speak so that mouse events are forwarded to the extension. (Closed)

Created:
3 years, 8 months ago by dmazzoni
Modified:
3 years, 7 months ago
Reviewers:
David Tseng
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, alemate+watch_chromium.org, oshima+watch_chromium.org, aboxhall+watch_chromium.org, jam, nektar+watch_chromium.org, yuzo+watch_chromium.org, dougt+watch_chromium.org, darin-cc_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, je_julie, dtapuska+chromiumwatch_chromium.org, davemoore+watch_chromium.org, arv+watch_chromium.org, dtapuska
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor Select-to-speak so that mouse events are forwarded to the extension. Previously the Select-to-speak event handler captured mouse events and turned them into accessibility events that could be caught by select-to-speak. Instead, the event handler can mouse and keyboard events to the extension background page, and the extension can use the automation API to do a hit test. This is mostly a refactoring change, but it gives us some more flexibility and makes the event handler simpler, possibly something that could be general-purpose, while putting more of the logic into the extension code. BUG=699617 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2814213002 Cr-Commit-Position: refs/heads/master@{#472339} Committed: https://chromium.googlesource.com/chromium/src/+/ccb40f537fbbc17772e7255a7b575661ce4353cd

Patch Set 1 #

Patch Set 2 : Rebase, now no changes to content/renderer are needed #

Patch Set 3 : Tests updated, ready for review #

Total comments: 26

Patch Set 4 : Forward key events to extension #

Patch Set 5 : Fix closure compiler warnings #

Total comments: 13

Patch Set 6 : Address feedback #

Patch Set 7 : closure #

Unified diffs Side-by-side diffs Delta from patch set Stats (+252 lines, -171 lines) Patch
M chrome/browser/chromeos/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/accessibility/select_to_speak_event_handler.h View 1 2 3 3 chunks +12 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc View 1 2 3 6 chunks +59 lines, -63 lines 0 comments Download
M chrome/browser/chromeos/accessibility/select_to_speak_event_handler_unittest.cc View 1 2 3 11 chunks +33 lines, -65 lines 0 comments Download
M chrome/browser/resources/chromeos/select_to_speak/select_to_speak.js View 1 2 3 4 5 6 5 chunks +147 lines, -36 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 53 (30 generated)
dmazzoni
3 years, 8 months ago (2017-04-12 19:47:23 UTC) #3
dtapuska
On 2017/04/12 19:47:23, dmazzoni wrote: Are you able to wait on this change for a ...
3 years, 8 months ago (2017-04-12 20:38:28 UTC) #4
dmazzoni
Sure, sounds good.
3 years, 8 months ago (2017-04-12 20:48:33 UTC) #5
dtapuska
On 2017/04/12 20:48:33, dmazzoni wrote: > Sure, sounds good. That change landed today.. and I've ...
3 years, 8 months ago (2017-04-21 17:25:44 UTC) #6
dmazzoni
Thanks! I'll give it a try On Fri, Apr 21, 2017 at 10:25 AM <dtapuska@chromium.org> ...
3 years, 8 months ago (2017-04-21 17:33:12 UTC) #7
dtapuska
On 2017/04/21 17:33:12, dmazzoni wrote: > Thanks! I'll give it a try > > On ...
3 years, 8 months ago (2017-04-24 16:18:43 UTC) #8
dmazzoni
RAF-aligned mouse events are no longer causing a problem, thanks! Not quite ready to land, ...
3 years, 8 months ago (2017-04-26 03:13:26 UTC) #13
dmazzoni
Finished, tests updated, ready for review. dtapuska to cc since this no longer requires any ...
3 years, 7 months ago (2017-05-05 20:34:16 UTC) #17
David Tseng
https://codereview.chromium.org/2814213002/diff/40001/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc File chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc (right): https://codereview.chromium.org/2814213002/diff/40001/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc#newcode31 chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc:31: static_cast<aura::Window*>(event.target())->GetRootWindow(); Are all of these (|root|, |event.target()| always non-null? ...
3 years, 7 months ago (2017-05-07 06:10:28 UTC) #21
David Tseng
One more note. https://codereview.chromium.org/2814213002/diff/40001/chrome/browser/resources/chromeos/select_to_speak/select_to_speak.js File chrome/browser/resources/chromeos/select_to_speak/select_to_speak.js (left): https://codereview.chromium.org/2814213002/diff/40001/chrome/browser/resources/chromeos/select_to_speak/select_to_speak.js#oldcode99 chrome/browser/resources/chromeos/select_to_speak/select_to_speak.js:99: this.down_ = true; Now that you ...
3 years, 7 months ago (2017-05-07 06:59:40 UTC) #22
dmazzoni
Now forwards key events to the extension, PTAL. https://codereview.chromium.org/2814213002/diff/40001/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc File chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc (right): https://codereview.chromium.org/2814213002/diff/40001/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc#newcode31 chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc:31: static_cast<aura::Window*>(event.target())->GetRootWindow(); ...
3 years, 7 months ago (2017-05-10 19:43:19 UTC) #23
dmazzoni
Friendly ping - I know you're not feeling well so no rush, but whenever you ...
3 years, 7 months ago (2017-05-15 15:58:16 UTC) #33
David Tseng
lgtm https://codereview.chromium.org/2814213002/diff/80001/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc File chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc (left): https://codereview.chromium.org/2814213002/diff/80001/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc#oldcode75 chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc:75: state_ = INACTIVE; Almost there. Can we move ...
3 years, 7 months ago (2017-05-16 15:54:45 UTC) #34
dmazzoni
https://codereview.chromium.org/2814213002/diff/80001/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc File chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc (left): https://codereview.chromium.org/2814213002/diff/80001/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc#oldcode75 chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc:75: state_ = INACTIVE; On 2017/05/16 15:54:39, David Tseng wrote: ...
3 years, 7 months ago (2017-05-16 18:23:48 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2814213002/100001
3 years, 7 months ago (2017-05-16 18:25:14 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: closure_compilation on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/closure_compilation/builds/8654)
3 years, 7 months ago (2017-05-16 19:22:05 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2814213002/120001
3 years, 7 months ago (2017-05-16 19:26:05 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/295348)
3 years, 7 months ago (2017-05-17 00:17:01 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2814213002/120001
3 years, 7 months ago (2017-05-17 04:33:57 UTC) #47
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://chromium.googlesource.com/chromium/src/+/ccb40f537fbbc17772e7255a7b575661ce4353cd
3 years, 7 months ago (2017-05-17 05:25:51 UTC) #50
findit-for-me
Findit (https://goo.gl/kROfz5) identified this CL at revision 472339 as the culprit for failures in the ...
3 years, 7 months ago (2017-05-17 08:43:47 UTC) #51
kolos1
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/2883283003/ by kolos@chromium.org. ...
3 years, 7 months ago (2017-05-17 09:32:42 UTC) #52
kolos1
3 years, 7 months ago (2017-05-17 10:02:12 UTC) #53
Message was sent while issue was closed.
A revert of this CL (patchset #7 id:120001) has been created in
https://codereview.chromium.org/2892463003/ by kolos@chromium.org.

The reason for reverting is: FindIT detected it as culprit of test failures.
https://findit-for-me.appspot.com/waterfall/build-failure?url=https://build.c....

Powered by Google App Engine
This is Rietveld 408576698