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

Issue 9695015: Provide DartDomNameOfAttribute (Closed)

Created:
8 years, 9 months ago by sra1
Modified:
8 years, 9 months ago
Reviewers:
vsm, Anton Muhin
CC:
reviews_dartlang.org, Anton Muhin, dart-dom-team_google.com
Visibility:
Public.

Description

Provide DartDomNameOfAttribute DartDomNameOfAttribute returns the name of an IDLAttribute in the dart dom bindings. attr.id is the native/JS name dart:html might possibly rename the DartDomName, leaving the original attribute id available. The change in the generated files reflects reverting https://src.chromium.org/viewvc/multivm?view=rev&revision=251 I will revert r251 after this change lands. This is all so we can handle one attribute that has a name that is a keyword in Dart and C++ : module html { interface [ Conditional=VIDEO_TRACK, V8EnabledAtRuntime=webkitVideoTrack ] HTMLTrackElement : HTMLElement { ... attribute [Reflect] boolean default; BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=5381

Patch Set 1 #

Patch Set 2 : rename to DartDomNameOfAttribute #

Patch Set 3 : effects #

Patch Set 4 : fix native #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -46 lines) Patch
M client/dom/dom.dart View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M client/dom/frog/dom_frog.dart View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M client/dom/scripts/generator.py View 1 2 chunks +20 lines, -0 lines 1 comment Download
M client/dom/scripts/idlnode.py View 1 chunk +3 lines, -1 line 0 comments Download
M client/dom/scripts/systemfrog.py View 1 2 chunks +19 lines, -7 lines 0 comments Download
M client/dom/scripts/systemhtml.py View 1 7 chunks +16 lines, -16 lines 0 comments Download
M client/dom/scripts/systeminterface.py View 1 1 chunk +4 lines, -2 lines 0 comments Download
M client/dom/scripts/systemnative.py View 1 2 3 9 chunks +37 lines, -18 lines 1 comment Download
M client/dom/scripts/systemwrapping.py View 1 2 chunks +6 lines, -2 lines 0 comments Download
M client/html/dartium/html_dartium.dart View 2 chunks +6 lines, -0 lines 0 comments Download
M client/html/frog/html_frog.dart View 1 2 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
sra1
https://chromiumcodereview.appspot.com/9695015/diff/9/client/dom/scripts/systemnative.py File client/dom/scripts/systemnative.py (right): https://chromiumcodereview.appspot.com/9695015/diff/9/client/dom/scripts/systemnative.py#newcode446 client/dom/scripts/systemnative.py:446: cpp_arg_name = CppSafeName(attr.id) This is how the attribute called ...
8 years, 9 months ago (2012-03-13 02:41:27 UTC) #1
vsm
LGTM
8 years, 9 months ago (2012-03-13 03:44:43 UTC) #2
podivilov
We use DartName=XXX in dart.idl for renaming operations, but we rename attributes in generator. Is ...
8 years, 9 months ago (2012-03-13 12:34:50 UTC) #3
Anton Muhin
8 years, 9 months ago (2012-03-13 12:53:47 UTC) #4
Thanks a lot, Stephen!

https://chromiumcodereview.appspot.com/9695015/diff/9/client/dom/scripts/gene...
File client/dom/scripts/generator.py (right):

https://chromiumcodereview.appspot.com/9695015/diff/9/client/dom/scripts/gene...
client/dom/scripts/generator.py:361: name = attr.ext_attrs.get('DartName', None)
or name
nit: attr.ext_attrs.get('DartName', name)

Powered by Google App Engine
This is Rietveld 408576698