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

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

Issue 551713003: Fix handling default parameters (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Cleanup Created 6 years, 3 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
« tools/dom/idl/dart/dart.idl ('K') | « tools/dom/scripts/idlnode.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/systemnative.py
diff --git a/tools/dom/scripts/systemnative.py b/tools/dom/scripts/systemnative.py
index 9320840225a405a40a5c344fd254e87519b3c7e3..043f164c945fd16a719b27508720c749c3f68d4d 100644
--- a/tools/dom/scripts/systemnative.py
+++ b/tools/dom/scripts/systemnative.py
@@ -1550,7 +1550,8 @@ class DartiumBackend(HtmlDartGenerator):
if isinstance(argument, IDLArgument):
if IsOptional(argument) and not self._IsArgumentOptionalInWebCore(node, argument):
return True
- if argument.ext_attrs.get('Default') == 'NullString':
+ # argument default to null (e.g., DOMString arg = null).
+ if argument.default_value_is_null:
return True
if _IsOptionalStringArgumentInInitEventMethod(self._interface, node, argument):
return True
@@ -1789,7 +1790,7 @@ class DartiumBackend(HtmlDartGenerator):
return False
if operation.id in ['addEventListener', 'removeEventListener'] and argument.id == 'useCapture':
return False
- if 'ForceOptional' in argument.ext_attrs:
+ if 'DartForceOptional' in argument.ext_attrs:
return False
if argument.type.id == 'Dictionary':
return False
@@ -1997,5 +1998,5 @@ def _IsOptionalStringArgumentInInitEventMethod(interface, operation, argument):
return (
interface.id.endswith('Event') and
operation.id.startswith('init') and
- argument.ext_attrs.get('Default') == 'Undefined' and
+ argument.default_value == 'Undefined' and
argument.type.id == 'DOMString')
« tools/dom/idl/dart/dart.idl ('K') | « tools/dom/scripts/idlnode.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698