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

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

Issue 25675008: Updating CustomElement lifecycle scope logic (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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
« no previous file with comments | « no previous file | 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 1235e801a4c4c2b19fad63d5e09065a870e35e37..436021a3644075b271fa33930555137589b91013 100644
--- a/tools/dom/scripts/systemnative.py
+++ b/tools/dom/scripts/systemnative.py
@@ -552,7 +552,7 @@ class DartiumBackend(HtmlDartGenerator):
'void',
False,
'SetterRaisesException' in attr.ext_attrs,
- requires_custom_element_callback=True)
+ generate_custom_element_scope_if_needed=True)
def AddIndexer(self, element_type):
"""Adds all the methods required to complete implementation of List."""
@@ -721,7 +721,8 @@ class DartiumBackend(HtmlDartGenerator):
arguments,
operation.type.id,
operation.type.nullable,
- 'RaisesException' in operation.ext_attrs)
+ 'RaisesException' in operation.ext_attrs,
+ generate_custom_element_scope_if_needed=True)
def _GenerateNativeCallback(self,
callback_name,
@@ -732,7 +733,7 @@ class DartiumBackend(HtmlDartGenerator):
return_type,
return_type_is_nullable,
raises_dom_exception,
- requires_custom_element_callback=False):
+ generate_custom_element_scope_if_needed=False):
ext_attrs = node.ext_attrs
@@ -791,7 +792,7 @@ class DartiumBackend(HtmlDartGenerator):
if 'Reflect' in ext_attrs:
cpp_arguments = [self._GenerateWebCoreReflectionAttributeName(node)]
- if ext_attrs.get('CustomElementCallbacks') == 'Enable' or requires_custom_element_callback:
+ if generate_custom_element_scope_if_needed and (ext_attrs.get('CustomElementCallbacks', 'None') != 'None' or 'Reflect' in ext_attrs):
vsm 2013/10/03 16:20:41 nit: line length
self._cpp_impl_includes.add('"core/dom/CustomElementCallbackDispatcher.h"')
needs_custom_element_callbacks = True
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698