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

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

Issue 13973017: Revert "Revert "Allow multiple tags in native clause."" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase 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/generator.py
diff --git a/tools/dom/scripts/generator.py b/tools/dom/scripts/generator.py
index 9499a087bdade2b3b3253d06dbc6d3c1b4972a6c..4ae39dfe7d2b9e820bd5bb8391c8636d1d2de27d 100644
--- a/tools/dom/scripts/generator.py
+++ b/tools/dom/scripts/generator.py
@@ -77,12 +77,20 @@ interface_factories = monitored.Dict('generator.interface_factories', {
#
_dart2js_dom_custom_native_specs = monitored.Dict(
'generator._dart2js_dom_custom_native_specs', {
- # Decorate the singleton Console object, if present (workers do not have a
- # console).
- 'Console': "=(typeof console == 'undefined' ? {} : console)",
- # DOMWindow aliased with global scope.
- 'Window': '@*DOMWindow',
+ # Nodes with different tags in different browsers can be listed as multiple
+ # tags here provided there is not conflict in usage (e.g. browser X has tag
+ # T and no other browser has tag T).
+
+ 'DOMApplicationCache':
+ 'ApplicationCache,DOMApplicationCache,OfflineResourceList',
+
+ 'MutationObserver': 'MutationObserver,WebKitMutationObserver',
+
+ 'TransitionEvent': 'TransitionEvent,WebKitTransitionEvent',
+
+ 'WheelEvent': 'WheelEvent,MouseWheelEvent,MouseScrollEvent',
+
}, dart2jsOnly=True)
def IsRegisteredType(type_name):
@@ -94,7 +102,7 @@ def MakeNativeSpec(javascript_binding_name):
else:
# Make the class 'hidden' so it is dynamically patched at runtime. This
# is useful for browser compat.
- return '*' + javascript_binding_name
+ return javascript_binding_name
def MatchSourceFilter(thing):

Powered by Google App Engine
This is Rietveld 408576698