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

Issue 10332144: Move html events generation to domimpl. (Closed)

Created:
8 years, 7 months ago by podivilov
Modified:
8 years, 7 months ago
Reviewers:
Anton Muhin, antonm, sra1
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Move html events generation to domimpl. R=antonm@chromium.org Committed: https://code.google.com/p/dart/source/detail?r=7692

Patch Set 1 #

Total comments: 6

Patch Set 2 : . #

Total comments: 31

Patch Set 3 : Address comments #

Total comments: 9

Patch Set 4 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+208 lines, -72 lines) Patch
M lib/dom/scripts/dartdomgenerator.py View 2 chunks +3 lines, -8 lines 0 comments Download
M lib/dom/scripts/dartgenerator.py View 1 2 7 chunks +12 lines, -7 lines 0 comments Download
M lib/dom/scripts/systemhtml.py View 1 2 6 chunks +13 lines, -49 lines 0 comments Download
M lib/dom/scripts/systemnative.py View 1 2 3 4 chunks +76 lines, -8 lines 0 comments Download
A lib/dom/src/native_EventsImplementation.dart View 1 2 3 1 chunk +98 lines, -0 lines 0 comments Download
M lib/dom/templates/dom/native/dom_impl.darttemplate View 1 chunk +2 lines, -0 lines 0 comments Download
M lib/dom/templates/html/dartium/html_dartium.darttemplate View 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
podivilov
8 years, 7 months ago (2012-05-14 17:15:50 UTC) #1
sra1
https://chromiumcodereview.appspot.com/10332144/diff/1/lib/dom/scripts/systemhtml.py File lib/dom/scripts/systemhtml.py (right): https://chromiumcodereview.appspot.com/10332144/diff/1/lib/dom/scripts/systemhtml.py#newcode460 lib/dom/scripts/systemhtml.py:460: assert event_name in _html_event_names, 'No known html even name ...
8 years, 7 months ago (2012-05-14 17:29:15 UTC) #2
podivilov
https://chromiumcodereview.appspot.com/10332144/diff/1/lib/dom/scripts/systemhtml.py File lib/dom/scripts/systemhtml.py (right): https://chromiumcodereview.appspot.com/10332144/diff/1/lib/dom/scripts/systemhtml.py#newcode460 lib/dom/scripts/systemhtml.py:460: assert event_name in _html_event_names, 'No known html even name ...
8 years, 7 months ago (2012-05-15 10:24:26 UTC) #3
Anton Muhin
1st round https://chromiumcodereview.appspot.com/10332144/diff/5002/lib/dom/scripts/dartgenerator.py File lib/dom/scripts/dartgenerator.py (right): https://chromiumcodereview.appspot.com/10332144/diff/5002/lib/dom/scripts/dartgenerator.py#newcode315 lib/dom/scripts/dartgenerator.py:315: super_map = dict((v,k) for k, v in ...
8 years, 7 months ago (2012-05-15 14:54:57 UTC) #4
podivilov
http://codereview.chromium.org/10332144/diff/5002/lib/dom/scripts/dartgenerator.py File lib/dom/scripts/dartgenerator.py (right): http://codereview.chromium.org/10332144/diff/5002/lib/dom/scripts/dartgenerator.py#newcode315 lib/dom/scripts/dartgenerator.py:315: super_map = dict((v,k) for k, v in webkit_renames.iteritems()) On ...
8 years, 7 months ago (2012-05-16 12:32:24 UTC) #5
Anton Muhin
LGTM w/ comments addressed http://codereview.chromium.org/10332144/diff/5002/lib/dom/scripts/systemnative.py File lib/dom/scripts/systemnative.py (right): http://codereview.chromium.org/10332144/diff/5002/lib/dom/scripts/systemnative.py#newcode343 lib/dom/scripts/systemnative.py:343: parent = _ParentWithEventAttributes(self._system._database, self._interface) or ...
8 years, 7 months ago (2012-05-16 13:17:56 UTC) #6
podivilov
8 years, 7 months ago (2012-05-16 15:19:44 UTC) #7
http://codereview.chromium.org/10332144/diff/5002/lib/dom/scripts/systemnativ...
File lib/dom/scripts/systemnative.py (right):

http://codereview.chromium.org/10332144/diff/5002/lib/dom/scripts/systemnativ...
lib/dom/scripts/systemnative.py:343: parent =
_ParentWithEventAttributes(self._system._database, self._interface) or ''
On 2012/05/16 13:17:56, antonmuhin wrote:
> In this case, where are the guards?
> 
> On 2012/05/16 12:32:24, podivilov wrote:
> > On 2012/05/15 14:54:57, antonmuhin wrote:
> > > can it be ever a null?
> > 
> > Yes, for example Node doesn't have event target parents.
> 

Note or ''. And see new version.

http://codereview.chromium.org/10332144/diff/5002/lib/dom/src/native_EventsIm...
File lib/dom/src/native_EventsImplementation.dart (right):

http://codereview.chromium.org/10332144/diff/5002/lib/dom/src/native_EventsIm...
lib/dom/src/native_EventsImplementation.dart:17: html.EventListenerList
_get(String type) {
On 2012/05/16 13:17:56, antonmuhin wrote:
> Cannot you use this[name] or super[name] to achieve the same semantics?
> 
> On 2012/05/16 12:32:24, podivilov wrote:
> > On 2012/05/15 14:54:57, antonmuhin wrote:
> > > why auxiliary _get?
> > 
> > It is used by subclasses.
> 

Done.

http://codereview.chromium.org/10332144/diff/5002/lib/dom/src/native_EventsIm...
lib/dom/src/native_EventsImplementation.dart:36: // TODO(jacobr): switch to
<EventListenerWrapper>[] when the VM allow it.
On 2012/05/16 13:17:56, antonmuhin wrote:
> On 2012/05/16 12:32:24, podivilov wrote:
> > On 2012/05/15 14:54:57, antonmuhin wrote:
> > > nit: at least in the rest of Dart code : is usually on the next line.
> > Done.
> > > And <T>[] should be supported now, I think
> > Could you please point a revision where it was added?
> > 
> 
> Sorry, no, but I believe we used it a lot previous year.

Done.

http://codereview.chromium.org/10332144/diff/5003/lib/dom/scripts/systemnativ...
File lib/dom/scripts/systemnative.py (right):

http://codereview.chromium.org/10332144/diff/5003/lib/dom/scripts/systemnativ...
lib/dom/scripts/systemnative.py:322: if self._interface.id ==
'DocumentFragment':
On 2012/05/16 13:17:57, antonmuhin wrote:
> may you add a comment why this is special-cased?

Done.

http://codereview.chromium.org/10332144/diff/5003/lib/dom/scripts/systemnativ...
lib/dom/scripts/systemnative.py:330: 
On 2012/05/16 13:17:57, antonmuhin wrote:
> nit: intentional two blanks?

Done.

http://codereview.chromium.org/10332144/diff/5003/lib/dom/scripts/systemnativ...
lib/dom/scripts/systemnative.py:332: def is_event_target(interface):
On 2012/05/16 13:17:57, antonmuhin wrote:
> q: is it a correct style for nest functions?  just asking

Done.

http://codereview.chromium.org/10332144/diff/5003/lib/dom/scripts/systemnativ...
lib/dom/scripts/systemnative.py:348: for attribute in interface.attributes:
On 2012/05/16 13:17:57, antonmuhin wrote:
> as a variant: return any((attr.type.id == 'EventListener' for attr in
> interface.attributes))

Done.

Powered by Google App Engine
This is Rietveld 408576698