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

Issue 12419011: Modern-ify KeyEvent handling. (Closed)

Created:
7 years, 9 months ago by Emily Fortuna
Modified:
7 years, 9 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Modern-ify KeyEvent handling. BUG= Committed: https://code.google.com/p/dart/source/detail?r=20481

Patch Set 1 : #

Patch Set 2 : #

Total comments: 5

Patch Set 3 : \ #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+281 lines, -626 lines) Patch
M sdk/lib/html/dart2js/html_dart2js.dart View 8 chunks +74 lines, -70 lines 0 comments Download
M sdk/lib/html/dartium/html_dartium.dart View 8 chunks +72 lines, -70 lines 5 comments Download
M tests/html/interactive_test.dart View 1 chunk +42 lines, -0 lines 0 comments Download
M tests/html/keyboard_event_test.dart View 1 1 chunk +3 lines, -3 lines 0 comments Download
M tools/dom/src/KeyboardEventController.dart View 1 chunk +0 lines, -410 lines 0 comments Download
A + tools/dom/src/KeyboardEventStream.dart View 1 2 5 chunks +58 lines, -69 lines 0 comments Download
M tools/dom/src/dart2js_KeyEvent.dart View 1 3 chunks +16 lines, -1 line 0 comments Download
M tools/dom/src/dartium_KeyEvent.dart View 1 3 chunks +14 lines, -1 line 0 comments Download
M tools/dom/templates/html/dart2js/html_dart2js.darttemplate View 1 chunk +1 line, -1 line 0 comments Download
M tools/dom/templates/html/dartium/html_dartium.darttemplate View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
Emily Fortuna
This is not the design you suggested in the email, because I was trying to ...
7 years, 9 months ago (2013-03-21 20:53:43 UTC) #1
Emily Fortuna
I'm not convinced this is really better except I added more classes, but here it ...
7 years, 9 months ago (2013-03-22 00:38:58 UTC) #2
Emily Fortuna
Andrei, Can you take a look at this? Pete is out today and next week. ...
7 years, 9 months ago (2013-03-22 17:05:56 UTC) #3
Andrei Mouravski
Here's what I think this should look like, and I think it should be a ...
7 years, 9 months ago (2013-03-22 19:12:33 UTC) #4
Emily Fortuna
On 2013/03/22 19:12:33, Andrei Mouravski wrote: > class _KeyEventStreamProvider<T extends Event> extends > _CustomEventStreamProvider<T> { ...
7 years, 9 months ago (2013-03-22 22:53:58 UTC) #5
blois
https://codereview.chromium.org/12419011/diff/23001/sdk/lib/html/dartium/html_dartium.dart File sdk/lib/html/dartium/html_dartium.dart (left): https://codereview.chromium.org/12419011/diff/23001/sdk/lib/html/dartium/html_dartium.dart#oldcode33535 sdk/lib/html/dartium/html_dartium.dart:33535: -class KeyboardEventController { I think that KeyboardEventController and the ...
7 years, 9 months ago (2013-03-25 07:01:20 UTC) #6
Emily Fortuna
https://codereview.chromium.org/12419011/diff/23001/sdk/lib/html/dartium/html_dartium.dart File sdk/lib/html/dartium/html_dartium.dart (right): https://codereview.chromium.org/12419011/diff/23001/sdk/lib/html/dartium/html_dartium.dart#newcode33591 sdk/lib/html/dartium/html_dartium.dart:33591: + Stream<KeyEvent> forTarget(EventTarget e, {bool useCapture: false}) { On ...
7 years, 9 months ago (2013-03-25 17:29:15 UTC) #7
Emily Fortuna
https://codereview.chromium.org/12419011/diff/23001/sdk/lib/html/dartium/html_dartium.dart File sdk/lib/html/dartium/html_dartium.dart (right): https://codereview.chromium.org/12419011/diff/23001/sdk/lib/html/dartium/html_dartium.dart#newcode33591 sdk/lib/html/dartium/html_dartium.dart:33591: + Stream<KeyEvent> forTarget(EventTarget e, {bool useCapture: false}) { On ...
7 years, 9 months ago (2013-03-25 17:35:52 UTC) #8
Emily Fortuna
Andrei is out, too, today, I think? Adding a reviewer who is here.
7 years, 9 months ago (2013-03-25 17:37:52 UTC) #9
Andrei Mouravski
lgtm
7 years, 9 months ago (2013-03-25 19:05:46 UTC) #10
Emily Fortuna
Committed patchset #3 manually as r20481 (presubmit successful).
7 years, 9 months ago (2013-03-25 20:17:02 UTC) #11
blois
7 years, 9 months ago (2013-03-26 17:46:20 UTC) #12
Message was sent while issue was closed.
https://codereview.chromium.org/12419011/diff/23001/sdk/lib/html/dartium/html...
File sdk/lib/html/dartium/html_dartium.dart (right):

https://codereview.chromium.org/12419011/diff/23001/sdk/lib/html/dartium/html...
sdk/lib/html/dartium/html_dartium.dart:33591: +  Stream<KeyEvent>
forTarget(EventTarget e, {bool useCapture: false}) {
On 2013/03/25 17:35:52, Emily Fortuna wrote:
> On 2013/03/25 17:29:15, Emily Fortuna wrote:
> > On 2013/03/25 07:01:20, blois wrote:
> > > What I imagined was that forTarget would do something like-
> > > 
> > > return new _KeyboardEventController.keydown(target).stream;
> > 
> > How is this better from my existing KeyboardEventStream class which does the
> > same thing?
> 
> Especially since this class is now private. I purposely created the
> KeyboardEvenStream below to much more closely mimic the current way of
> establishing event listeners to the streams like the rest of the html library.
> Also note the KeyboardEventController class no longer exists.

The primary thing is that there's the static _KeyboardEventHandler on KeyEvent,
and having these two merged causes conflicts in that shared instance.

Separating these would remove the per-element state from that static and ideally
we can add that to Element and make it even closer to the rest of the events.

Powered by Google App Engine
This is Rietveld 408576698