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

Unified Diff: client/dom/scripts/systemhtml.py

Issue 9662010: Don't put private members in dart:html interfaces. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 8 years, 9 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 | client/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/dom/scripts/systemhtml.py
diff --git a/client/dom/scripts/systemhtml.py b/client/dom/scripts/systemhtml.py
index 1df77152234292986eb7ca63a5ef748f4fa1e58f..bd32feb411e8eeda2be102e03ca9d0fda8bb10fe 100644
--- a/client/dom/scripts/systemhtml.py
+++ b/client/dom/scripts/systemhtml.py
@@ -520,6 +520,9 @@ class HtmlSystemShared(object):
else:
return False, None
+ def IsPrivate(self, name):
+ return name.startswith('_')
+
class HtmlSystem(System):
def __init__(self, templates, database, emitters, output_dir, generator):
@@ -666,9 +669,9 @@ class HtmlDartInterfaceGenerator(DartInterfaceGenerator):
html_setter_name = self._shared.RenameInHtmlLibrary(
self._interface, getter.id, 'set:')
- if not html_getter_name:
+ if not html_getter_name or self._shared.IsPrivate(html_getter_name):
getter = None
- if not html_setter_name:
+ if not html_setter_name or self._shared.IsPrivate(html_setter_name):
setter = None
if not getter and not setter:
return
@@ -697,7 +700,7 @@ class HtmlDartInterfaceGenerator(DartInterfaceGenerator):
name.
"""
html_name = self._shared.RenameInHtmlLibrary(self._interface, info.name)
- if html_name:
+ if html_name and not self._shared.IsPrivate(html_name):
self._members_emitter.Emit('\n'
' $TYPE $NAME($PARAMS);\n',
TYPE=info.type_name,
« no previous file with comments | « no previous file | client/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698