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

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

Issue 9453004: Cross frame access tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Final pass of comments, update of status Created 8 years, 10 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: client/dom/scripts/systemfrog.py
diff --git a/client/dom/scripts/systemfrog.py b/client/dom/scripts/systemfrog.py
index f148bbfb0c2c6ef72802f3daff42071f6f1d735b..255e169c46f9bb7dabe00cd086a7690f6c9cd1fa 100644
--- a/client/dom/scripts/systemfrog.py
+++ b/client/dom/scripts/systemfrog.py
@@ -10,6 +10,17 @@ import os
from generator import *
from systembase import *
+# Members (getters, setters, and methods) to suppress. These are
+# either removed or custom implemented.
+_dom_frog_omitted_members = set([
+ # Replace with custom.
+ 'HTMLIFrameElement.get:contentWindow',
+
+ # Remove.
+ 'HTMLIFrameElement.get:contentDocument',
+ 'DOMWindow.get:frameElement',
+])
+
class FrogSystem(System):
def __init__(self, templates, database, emitters, output_dir):
@@ -180,7 +191,17 @@ class FrogInterfaceGenerator(object):
pass
+ def OverrideMember(self, member):
+ return self._interface.id + '.' + member in _dom_frog_omitted_members
+
def AddAttribute(self, getter, setter):
+ if getter and self.OverrideMember('get:' + getter.id):
+ getter = None
+ if setter and self.OverrideMember('set:' + setter.id):
+ setter = None
+ if not getter and not setter:
+ return
+
output_type = getter and self._NarrowOutputType(getter.type.id)
input_type = setter and self._NarrowInputType(setter.type.id)

Powered by Google App Engine
This is Rietveld 408576698