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

Issue 11315020: Add attribute information table so we generate correct setters. (Closed)

Created:
8 years, 1 month ago by Jennifer Messerly
Modified:
8 years, 1 month ago
CC:
reviews_dartlang.org
Base URL:
https://github.com/dart-lang/dart-web-components.git@master
Visibility:
Public.

Description

Add attribute information table so we generate correct setters. It is from the spec, with things removed that are not supported yet. We might want to replace most of this with mirrors. But even then, we still need the renames. Fixes issue #112 Committed: https://github.com/dart-lang/dart-web-components/commit/c259ef6

Patch Set 1 #

Total comments: 7

Patch Set 2 : new approach #

Patch Set 3 : #

Total comments: 6

Patch Set 4 : better todo comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+703 lines, -31 lines) Patch
M .gitignore View 1 1 chunk +1 line, -1 line 0 comments Download
A build/gen_html_setters.dart View 1 2 3 1 chunk +119 lines, -0 lines 0 comments Download
A build/gen_html_setters.sh View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download
M lib/src/emitters.dart View 1 3 chunks +16 lines, -16 lines 0 comments Download
A lib/src/html5_setters.g.dart View 1 1 chunk +514 lines, -0 lines 0 comments Download
M lib/src/html5_utils.dart View 1 1 chunk +12 lines, -0 lines 0 comments Download
M test/html5_utils_test.dart View 1 1 chunk +26 lines, -14 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Jennifer Messerly
8 years, 1 month ago (2012-10-27 00:16:13 UTC) #1
sqs
Any reason for not including TextAreaElement.value? http://dev.w3.org/html5/spec-LC/the-button-element.html#the-textarea-element
8 years, 1 month ago (2012-10-27 00:38:11 UTC) #2
Siggi Cherem (dart-lang)
lgtm % some style/naming questions. I'm not sure about the right answer either, so I'd ...
8 years, 1 month ago (2012-10-27 00:46:45 UTC) #3
Jennifer Messerly
On 2012/10/27 00:38:11, sqs wrote: > Any reason for not including TextAreaElement.value? > http://dev.w3.org/html5/spec-LC/the-button-element.html#the-textarea-element Ugh. ...
8 years, 1 month ago (2012-10-29 18:08:29 UTC) #4
Jennifer Messerly
https://chromiumcodereview.appspot.com/11315020/diff/1/lib/src/html5_utils.dart File lib/src/html5_utils.dart (right): https://chromiumcodereview.appspot.com/11315020/diff/1/lib/src/html5_utils.dart#newcode134 lib/src/html5_utils.dart:134: const allHtmlElements = const ['*']; On 2012/10/27 00:46:45, Siggi ...
8 years, 1 month ago (2012-10-30 06:08:45 UTC) #5
Jennifer Messerly
PTAL. New approach uses compile time mirrors to get information from dart:html. The resulting metadata ...
8 years, 1 month ago (2012-11-06 02:56:43 UTC) #6
Siggi Cherem (dart-lang)
lgtm! https://chromiumcodereview.appspot.com/11315020/diff/10001/build/gen_html_setters.dart File build/gen_html_setters.dart (right): https://chromiumcodereview.appspot.com/11315020/diff/10001/build/gen_html_setters.dart#newcode7 build/gen_html_setters.dart:7: // TODO(jmesserly): should be importing packages. packages => ...
8 years, 1 month ago (2012-11-06 03:20:36 UTC) #7
Jennifer Messerly
8 years, 1 month ago (2012-11-06 03:51:57 UTC) #8
https://chromiumcodereview.appspot.com/11315020/diff/10001/build/gen_html_set...
File build/gen_html_setters.dart (right):

https://chromiumcodereview.appspot.com/11315020/diff/10001/build/gen_html_set...
build/gen_html_setters.dart:7: // TODO(jmesserly): should be importing packages.
On 2012/11/06 03:20:36, Siggi Cherem (dart-lang) wrote:
> packages => a dartdoc package?

Done.

https://chromiumcodereview.appspot.com/11315020/diff/10001/lib/src/emitters.dart
File lib/src/emitters.dart (right):

https://chromiumcodereview.appspot.com/11315020/diff/10001/lib/src/emitters.d...
lib/src/emitters.dart:240: typeName = htmlElementExtends[typeName];
On 2012/11/06 03:20:36, Siggi Cherem (dart-lang) wrote:
> emulating dart semantics, yay!  -- sarcasm ;-)

Hah, yeah :\. OTOH, it's kind of Web IDL semantics, so it's not as bad as it
looks :)

https://chromiumcodereview.appspot.com/11315020/diff/10001/lib/src/emitters.d...
lib/src/emitters.dart:747: var elementName = htmlElementNames[node.tagName];
On 2012/11/06 03:20:36, Siggi Cherem (dart-lang) wrote:
> you probably want to fix it here too

I don't think "new autogenerated.UnknownElement" would do the right thing,
though. I'll leave this alone since your change affects it too :)

Powered by Google App Engine
This is Rietveld 408576698