Closed Bug 766871 Opened 12 years ago Closed 12 years ago

Handle window.open in <iframe> within <iframe mozbrowser>

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16
blocking-kilimanjaro +
blocking-basecamp +

People

(Reporter: timdream, Assigned: justin.lebar+bug)

References

Details

(Whiteboard: [qa+])

Attachments

(2 files)

This is the window.open version of bug 766481.

STR:

Gaia with this pull
https://github.com/mozilla-b2g/gaia/pull/1853
and the last two buttons of window.open test. (naked window.open is not implemented in System app yet)

Expected:

- alert() show up with "Window: [object Window]"
- attention screen pops up, or the background window show itself by issuing alert() (after ~1 sec)

Actual:

- alert() "Window: null" and nothing else.
I see what's going on here; another stupid bug.
Assignee: nobody → justin.lebar+bug
Status: NEW → ASSIGNED
Component: General → DOM: Mozilla Extensions
Product: Boot2Gecko → Core
QA Contact: general → general
Attached patch Patch, v1Splinter Review
Attachment #635367 - Flags: review?(bzbarsky)
Attached patch Tests, v1Splinter Review
Attachment #635369 - Flags: review?(bzbarsky)
This depends on bug 766481 because the tests use alert() from <iframe> inside <iframe mozbrowser>, which won't work without bug 766481 fixed.
Depends on: 766481
Comment on attachment 635367 [details] [diff] [review]
Patch, v1

r=me, I guess
Attachment #635367 - Flags: review?(bzbarsky) → review+
Comment on attachment 635369 [details] [diff] [review]
Tests, v1

r=me
Attachment #635369 - Flags: review?(bzbarsky) → review+
By way of explanation, for posterity:

<jlebar> bz, what's "I guess" for?  :)
<bz> I have no idea whether the code is actually correct.  ;)
<bz> e.g. I have no idea why looking at the .top matters
<jlebar> bz, Oh.  If we don't look at .top, we fire the mozbrowseropenwindow event on the inner <iframe>, not on the <iframe mozbrowser>.
<jlebar> bz, It's not a problem OOP because we never see the <iframe>, only the outer <iframe mozbrowser>.
https://hg.mozilla.org/mozilla-central/rev/6838f7908bda
https://hg.mozilla.org/mozilla-central/rev/633a85b28dbb
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
Naoki - Could you verify this fix when there's a gaia build containing this patch?

Do we know when this patch (if not already) should be in an otoro build (new to the build process, so I don't know the full details of when mozilla central patches end up in an otoro build)?
Whiteboard: [qa+]
Jason, please find me on IRC sometime and I'll help you figure out how to tell whether a build contains a given changeset.
Blocks: browser-api
No longer depends on: browser-api
Component: DOM: Mozilla Extensions → DOM
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: