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

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 2e74ab7a28cda458071ed1e68da55fa27dd97354..8e820da4f1a0b76213040cf5f0a2c600eb9cc400 100644
--- a/tools/dom/scripts/systemnative.py
+++ b/tools/dom/scripts/systemnative.py
@@ -554,7 +554,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."""
@@ -723,7 +723,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,
@@ -734,7 +735,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
@@ -793,7 +794,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):
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