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

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

Issue 10541029: Do not merge IDL interfaces in dartdomgenerator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed shadowing. Created 8 years, 6 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: lib/dom/scripts/systemfrog.py
diff --git a/lib/dom/scripts/systemfrog.py b/lib/dom/scripts/systemfrog.py
index 04ff7779c67c03342b12b7171ac49cb31989713f..8359344a3491745ef9464bea80c5aacf838d0f10 100644
--- a/lib/dom/scripts/systemfrog.py
+++ b/lib/dom/scripts/systemfrog.py
@@ -277,7 +277,7 @@ class FrogInterfaceGenerator(BaseGenerator):
NATIVE_NAME=attr.id,
OPT_TYPE=TypeOrNothing(self._NarrowInputType(attr.type.id)))
- def _FindShadowedAttribute(self, attr):
+ def _FindShadowedAttribute(self, attr, merged_interfaces={}):
"""Returns (attribute, superinterface) or (None, None)."""
def FindInParent(interface):
"""Returns matching attribute in parent, or None."""
@@ -292,6 +292,12 @@ class FrogInterfaceGenerator(BaseGenerator):
attr2 = FindMatchingAttribute(parent_interface, attr)
if attr2:
return (attr2, parent_interface)
+ if parent.type.id in merged_interfaces:
+ merged_interface = self._system._database.GetInterface(
+ merged_interfaces[parent.type.id])
+ attr2 = FindMatchingAttribute(merged_interface, attr)
+ if attr2:
+ return (attr2, parent_interface)
return FindInParent(parent_interface)
sra1 2012/06/07 19:31:07 If parent_interface was merged into some other int
podivilov 2012/06/08 17:02:21 Fixed.
return (None, None)

Powered by Google App Engine
This is Rietveld 408576698