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

Unified Diff: tools/dom/scripts/htmldartgenerator.py

Issue 14367012: Move to new dart:typeddata types for dart2js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revert generated files for html lib Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/dom/scripts/htmldartgenerator.py
diff --git a/tools/dom/scripts/htmldartgenerator.py b/tools/dom/scripts/htmldartgenerator.py
index 393d7b4164f991354dbae39ad204b2860636e728..e0953c6c9906e974e1d495624ef3283976480ffa 100644
--- a/tools/dom/scripts/htmldartgenerator.py
+++ b/tools/dom/scripts/htmldartgenerator.py
@@ -387,10 +387,10 @@ class HtmlDartGenerator(object):
' $FACTORY.create$(CTOR)(length);\n'
'\n $(LIST_ANNOTATIONS)factory $CTOR.fromList(List<$TYPE> list) =>\n'
' $FACTORY.create$(CTOR)_fromList(list);\n'
- '\n $(BUFFER_ANNOTATIONS)factory $CTOR.fromBuffer(ArrayBuffer buffer, '
+ '\n $(BUFFER_ANNOTATIONS)factory $CTOR.view(ByteBuffer buffer, '
'[int byteOffset, int length]) => \n'
' $FACTORY.create$(CTOR)_fromBuffer(buffer, byteOffset, length);\n',
- CTOR=self._interface.id,
+ CTOR=self._renamer.RenameInterface(interface),
ANNOTATIONS=annotations,
LIST_ANNOTATIONS=fromListAnnotations,
BUFFER_ANNOTATIONS=fromBufferAnnotations,
@@ -586,6 +586,8 @@ class HtmlDartGenerator(object):
has_clear = any(op.id == 'clear' for op in self._interface.operations)
has_length = False
has_length_setter = False
+ typed_array = self._interface_type_info.is_typed_array()
+
for attr in self._interface.attributes:
if attr.id == 'length':
has_length = True
@@ -599,6 +601,7 @@ class HtmlDartGenerator(object):
{
'DEFINE_CONTAINS': not has_contains,
'DEFINE_CLEAR': not has_clear,
+ 'DEFINE_IMMUTABLE': not typed_array,
'DEFINE_LENGTH_AS_NUM_ITEMS': not has_length and has_num_items,
'DEFINE_LENGTH_SETTER': not has_length_setter,
})

Powered by Google App Engine
This is Rietveld 408576698