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

Unified Diff: tools/dom/templates/html/dartium/html_dartium.darttemplate

Issue 1879093002: Revert "Fix handling of cross-origin windows in dartium and better align general handling of differ… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 | « tools/dom/src/native_DOMImplementation.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/dartium/html_dartium.darttemplate
diff --git a/tools/dom/templates/html/dartium/html_dartium.darttemplate b/tools/dom/templates/html/dartium/html_dartium.darttemplate
index e8a6a3183392aedb5df00113d505baf31cea0b25..c92c27e268ce93dc26a95e66d73c3324cd7cf9bf 100644
--- a/tools/dom/templates/html/dartium/html_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/html_dartium.darttemplate
@@ -256,40 +256,7 @@ Type _getSvgType(String key) {
return null;
}
-// TODO(jacobr): it would be nice to place these conversion methods in a consistent place for dart2js and dartium.
-
-WindowBase _convertNativeToDart_Window(win) {
- if (win == null) return null;
- return _DOMWindowCrossFrame._createSafe(win);
-}
-
-EventTarget _convertNativeToDart_EventTarget(e) {
- if (e == null) {
- return null;
- }
- // Assume it's a Window if it contains the postMessage property. It may be
- // from a different frame - without a patched prototype - so we cannot
- // rely on Dart type checking.
- try {
- if (js.JsNative.hasProperty(e, "postMessage")) {
- var window = _DOMWindowCrossFrame._createSafe(e);
- // If it's a native window.
- if (window is EventTarget) {
- return window;
- }
- return null;
- }
- } catch (err) {
- print("Error calling _convertNativeToDart_EventTarget... $err");
- }
- return e;
-}
-
-EventTarget _convertDartToNative_EventTarget(e) {
- // _DOMWindowCrossFrame uses an interceptor so we don't need to do anything unlike Dart2Js.
- return e;
-}
-
+// TODO(jacobr): it would be nice to place this in a consistent place for dart2js and dartium.
_convertNativeToDart_XHR_Response(o) {
if (o is Document) {
return o;
@@ -354,6 +321,10 @@ debug_or_assert(message, expression) {
}
}
+// TODO(jacobr): we shouldn't be generating this call in the dart:html
+// bindings but we are.
+_convertDartToNative_EventTarget(target) => target;
+
@Deprecated("Internal Use Only")
Map<String, dynamic> convertNativeObjectToDartMap(js.JsObject jsObject) {
var result = new Map();
« no previous file with comments | « tools/dom/src/native_DOMImplementation.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698