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

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

Issue 10704102: Cleanup attributes generation in dart:html. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: . Created 8 years, 5 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 | « lib/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/systemnative.py
diff --git a/lib/dom/scripts/systemnative.py b/lib/dom/scripts/systemnative.py
index af2a6b3eb965237115e22faf8db88f311048d640..255ec92ba5ff93c3f70623329c40454bc47aa805 100644
--- a/lib/dom/scripts/systemnative.py
+++ b/lib/dom/scripts/systemnative.py
@@ -469,26 +469,14 @@ class NativeImplementationGenerator(systembase.BaseGenerator):
return False
- def AddAttribute(self, attribute):
- getter = attribute
- setter = attribute if not systembase.IsReadOnly(attribute) else None
- if 'CheckSecurityForNode' in (getter or setter).ext_attrs:
+ def AddAttribute(self, attribute, html_name, read_only):
+ if 'CheckSecurityForNode' in attribute.ext_attrs:
# FIXME: exclude from interface as well.
return
- dom_name = DartDomNameOfAttribute(getter or setter)
- html_getter_name = self._html_system.RenameInHtmlLibrary(
- self._interface.id, dom_name, 'get:', implementation_class=True)
- html_setter_name = self._html_system.RenameInHtmlLibrary(
- self._interface.id, dom_name, 'set:', implementation_class=True)
-
- if getter and html_getter_name:
- self._AddGetter(getter, html_getter_name)
- if setter and html_setter_name:
- self._AddSetter(setter, html_setter_name)
-
- def AddSecondaryAttribute(self, interface, attribute):
- self.AddAttribute(attribute)
+ self._AddGetter(attribute, html_name)
+ if not read_only:
+ self._AddSetter(attribute, html_name)
def _AddGetter(self, attr, html_name):
type_info = GetIDLTypeInfo(attr.type.id)
@@ -765,8 +753,8 @@ class NativeImplementationGenerator(systembase.BaseGenerator):
def AddStaticOperation(self, info):
self._AddOperation(info)
- def AddSecondaryOperation(self, interface, info):
- self.AddOperation(info)
+ def SecondaryContext(self, interface):
+ pass
def _GenerateOperationNativeCallback(self, operation, arguments, cpp_callback_name):
webcore_function_name = operation.ext_attrs.get('ImplementedAs', operation.id)
« no previous file with comments | « lib/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698