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

Issue 10378040: Generate and use cross frame wrappers for types in other frames/windows. (Closed)

Created:
8 years, 7 months ago by vsm
Modified:
8 years ago
Reviewers:
sra, sra1
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Generate and use cross frame wrappers for types in other frames/windows. This gets the two blocking tests working plus a bonus one. Note, this does not yet include: - Wrapping html_dartium - Wrapping parameters (Window is passed into some init*Event methods and Location is passed into the setter on Window) - Generating error stubs that throw on illegal methods. I also haven't generated wrappers for dart:dom. Not sure this is worth it. BUG=http://code.google.com/p/dart/issues/detail?id=2774 TEST=html/cross_frame_test,html/inner_frame_test,html/window_open_test

Patch Set 1 #

Patch Set 2 : Add comments #

Patch Set 3 : Factored out template #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+785 lines, -91 lines) Patch
M lib/dom/scripts/dartgenerator.py View 1 2 3 chunks +7 lines, -0 lines 0 comments Download
M lib/dom/scripts/systemhtml.py View 1 2 15 chunks +397 lines, -20 lines 10 comments Download
A lib/dom/templates/crossframe_impl.darttemplate View 1 2 1 chunk +22 lines, -0 lines 0 comments Download
M lib/html/dartium/html_dartium.dart View 11 chunks +138 lines, -25 lines 0 comments Download
M lib/html/frog/html_frog.dart View 19 chunks +191 lines, -38 lines 1 comment Download
M tests/html/cross_frame_test.dart View 1 chunk +8 lines, -0 lines 0 comments Download
M tests/html/html.status View 1 2 2 chunks +0 lines, -6 lines 0 comments Download
M tests/html/inner_frame_test.dart View 1 3 chunks +22 lines, -2 lines 1 comment Download

Messages

Total messages: 3 (0 generated)
vsm
8 years, 7 months ago (2012-05-07 22:02:53 UTC) #1
sra1
I will review the minimal fix this evening. https://chromiumcodereview.appspot.com/10378040/diff/3001/lib/dom/scripts/systemhtml.py File lib/dom/scripts/systemhtml.py (right): https://chromiumcodereview.appspot.com/10378040/diff/3001/lib/dom/scripts/systemhtml.py#newcode443 lib/dom/scripts/systemhtml.py:443: # ...
8 years, 7 months ago (2012-05-10 00:12:05 UTC) #2
podivilov
8 years, 6 months ago (2012-05-30 13:18:44 UTC) #3
Vijay,

What if we introduce three custom handwritten interfaces CrossFrameWindow (11
methods), CrossFrameLocation (1 method), CrossFrameHistory (3 methods) and will
use them everywhere as parameters and return values except for a few cases:
1) Window get window()
2) History Window.history
3) Location Window.location 
Unsafe interfaces should still be auto-generated, but should extend
corresponding cross-frame interfaces.

That would give us more relevant suggestions for iframe.contentWindow.* and 
iframe.contentWindow.location.*.
And it's probably easier to add ~100 lines of custom dart code than ~300 lines
of python in systemhtml.

What do you think?

Powered by Google App Engine
This is Rietveld 408576698