Commit Graph

1834 Commits

Author SHA1 Message Date
Bobby Holley
0dd25b5a1f Bug 860941 - Separate the handling of |dialogArguments| and |arguments|, and use IDL for the |dialogArguments| getter. r=jst
This patch is bigger than I'd like it to be, but there are a lot of interlocked
dependencies and I eventually decided it was easier to just lump it together.

The semantics of |showModalDialog|/|window.dialogArguments| (an web-exposed
HTML5 feature) and |openDialog|/|window.arguments| (a XUL-proprietary feature)
are quite different. The former is essentially a security-checked JSVal, while
the latter gets converted into an array. We handled them together in the old
world, which led to a lot of confusion and muddled semantics. This patch
separates them.

This patch also eschews the roundabout resolve hook for dialogArguments in favor
of returning them directly from the XPIDL getter. This better matches the
behavior in the spec, especially because it allows dialogArguments to live on
the outer as they're supposed to, rather than the first inner that happens to
end up in the docshell. All in all, this should make this all very
straightforward to convert WebIDL when the time comes.

The current spec on the origin checks here is pretty fictional, so I've filed
https://www.w3.org/Bugs/Public/show_bug.cgi?id=21932 to fix it. This patch
should more or less preserve the current security behavior.
2013-05-17 10:43:19 -07:00
Bobby Holley
9e46df861a Bug 860941 - Remove unnecessary argument cleanup in nsGlobalWindow::DetachFromDocShell. r=jst
This function proceeds to invoke CleanUp(), which also cleans this stuff up.
2013-05-17 10:43:18 -07:00
Bobby Holley
ffc37e39f1 Bug 860941 - Clarify shutdown invariants in ~nsGlobalWindow. r=jst
While the mArguments invariant should hold for _outers_, it doesn't necessarily
hold for inners, so this assertion fires reliably in automation. If mCleanedUp
is true then mArguments is definitely null, so let's disentangle this from
mArguments and be clearer about the invariants we expect.
2013-05-17 10:43:18 -07:00
Bobby Holley
5c956fa545 Bug 860941 - Remove mArgumentsLast. r=jst
I'm not sure what it used to do, but it sure doesn't do a damn thing now.
2013-05-17 10:43:18 -07:00
Ed Morley
cfece539df Backed out changeset 70c3a3a74362 (bug 860941) for mochitest-3 timeouts on a CLOSED TREE 2013-05-17 09:09:21 +01:00
Ed Morley
9dbc58f6e7 Backed out changeset 98594535c1e9 (bug 860941) 2013-05-17 09:08:49 +01:00
Ed Morley
a2960310f0 Backed out changeset 474792d1fb89 (bug 860941) 2013-05-17 09:08:46 +01:00
Ed Morley
6d0c9e05ad Backed out changeset 0ad1a92ca568 (bug 860941) 2013-05-17 09:08:44 +01:00
Ed Morley
573dff61c1 Backed out changeset 90b318fb8375 (bug 860941) 2013-05-17 09:08:41 +01:00
Ed Morley
30605763bc Backed out changeset 95006bb32743 (bug 860941) 2013-05-17 09:08:38 +01:00
Ed Morley
3261187878 Backed out changeset de30d8faf09a (bug 860941) 2013-05-17 09:08:36 +01:00
Bobby Holley
4e2270f20a Bug 860941 - Stop clearing return values on navigation. r=jst
Since this stuff is a property on the browsing context, this only makes sense
as a security check. But now that we're using a DialogValueHolder, the origin
checks are taken care of. So we can kill this off.
2013-05-16 23:33:15 -07:00
Bobby Holley
64fff27cc1 Bug 860941 - Use DialogValueHolder for returnValue. r=jst
The spec currently has returnValue as a DOMString, but this doesn't match
reality given my testing. I filed [1] to fix it.

Note that nsGlobalModalWindow is already set up to CC mReturnValue. Since
we're swapping in another CC-ed container class, we don't need to make any
changes here.

[1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=21771
2013-05-16 23:33:15 -07:00
Bobby Holley
623fd2749f Bug 860941 - Make dialogArguments default to |undefined| rather than |null|. r=jst
This is correct by my reading of the spec. Quoting:

The dialogArguments IDL attribute, on getting, must check whether its browsing
context's active document's origin is the same as the dialog arguments' origin.
If it is, then the browsing context's dialog arguments must be returned
unchanged. Otherwise, if the dialog arguments are an object, then the empty
string must be returned, and if the dialog arguments are not an object, then
the stringification of the dialog arguments must be returned.
2013-05-16 23:33:14 -07:00
Bobby Holley
dcff86037c Bug 860941 - Separate the handling of |dialogArguments| and |arguments|, and use IDL for the |dialogArguments| getter. r=jst
This patch is bigger than I'd like it to be, but there are a lot of interlocked
dependencies and I eventually decided it was easier to just lump it together.

The semantics of |showModalDialog|/|window.dialogArguments| (an web-exposed
HTML5 feature) and |openDialog|/|window.arguments| (a XUL-proprietary feature)
are quite different. The former is essentially a security-checked JSVal, while
the latter gets converted into an array. We handled them together in the old
world, which led to a lot of confusion and muddled semantics. This patch
separates them.

This patch also eschews the roundabout resolve hook for dialogArguments in favor
of returning them directly from the XPIDL getter. This better matches the
behavior in the spec, especially because it allows dialogArguments to live on
the outer as they're supposed to, rather than the first inner that happens to
end up in the docshell. All in all, this should make this all very
straightforward to convert WebIDL when the time comes.

The current spec on the origin checks here is pretty fictional, so I've filed
https://www.w3.org/Bugs/Public/show_bug.cgi?id=21932 to fix it. This patch
should more or less preserve the current security behavior.
2013-05-16 23:33:14 -07:00
Bobby Holley
7410c858bc Bug 860941 - Remove unnecessary argument cleanup in nsGlobalWindow::DetachFromDocShell. r=jst
This function proceeds to invoke CleanUp(), which also cleans this stuff up.
2013-05-16 23:33:14 -07:00
Bobby Holley
1131fe8b96 Bug 860941 - Clarify shutdown invariants in ~nsGlobalWindow. r=jst
While the mArguments invariant should hold for _outers_, it doesn't necessarily
hold for inners, so this assertion fires reliably in automation. If mCleanedUp
is true then mArguments is definitely null, so let's disentangle this from
mArguments and be clearer about the invariants we expect.
2013-05-16 23:33:14 -07:00
Bobby Holley
7f92c87a6d Bug 860941 - Remove mArgumentsLast. r=jst
I'm not sure what it used to do, but it sure doesn't do a damn thing now.
2013-05-16 23:33:13 -07:00
David Zbarsky
d1e4e2d914 Bug 868312 - Rooting fixes for dom r=bz 2013-05-14 16:25:32 -07:00
Masatoshi Kimura
7168216600 Bug 673919 - Remove captureEvents, releaseEvents, and routeEvent. r=smaug 2013-05-14 21:18:39 +09:00
David Zbarsky
c9e89d461d Backed out changeset 3b73e9c7a5d0 for orange 2013-05-14 01:00:11 -07:00
David Zbarsky
d43213e6a5 Bug 868312 - Rooting fixes for dom r=bz 2013-05-14 00:15:53 -07:00
Ehsan Akhgari
01b80a6ccf Bug 871315 - Fix some rooting hazards in content/; r=till,bzbarsky 2013-05-13 13:43:53 -04:00
Mounir Lamouri
ab9e5b46e0 Bug 851642 - Make sure fullscreenchange event is sent even when the document is being removed from the doctree. r=smaug
... instead of relying on nsScreen being destroyed which was causing flaky
behaviour on Firefox Android (based on GC) and was creating a race condition bug
on Firefox OS.
2013-05-13 12:00:42 +01:00
Ehsan Akhgari
04515a0b00 Backed out 2 changesets (bug 871315) because different compilers have different standards on what is and is not C++
Backed out changeset d0d2e13e8b83 (bug 871315)
Backed out changeset be3976bd2d57 (bug 871315)

Landed on a CLOSED TREE
2013-05-13 14:42:03 -04:00
Ehsan Akhgari
337f1b1655 Bug 871315 - Fix some rooting hazards in content/; r=till,bzbarsky 2013-05-13 13:43:53 -04:00
Michael Harrison
ea1c21f991 Bug 260272 - Remove obsolete code from nsGlobalChromeWindow::SetCursor. r=dbaron,mats 2013-05-12 23:09:29 +02:00
David Zbarsky
38c8f91df5 Bug 868312 - Rooting fixes for dom r=bz 2013-05-12 01:17:42 -04:00
David Zbarsky
679cefe081 Bug 868312 - Some more rooting fixes for dom r=bz 2013-05-10 22:39:45 -04:00
David Zbarsky
82142be8bc Bug 868312 - Rooting fixes for dom r=bz 2013-05-10 14:22:21 -04:00
Boris Zbarsky
463cb38edd Bug 868996. Allow setting opener on the window to non-null, for just the lifetime of the page. r=bholley 2013-05-09 13:07:39 -04:00
Ryan VanderMeulen
c804b855d7 Backed out 6 changesets (bug 868996, bug 867903, bug 869014, bug 870219, bug 861587) for PGO bustage.
CLOSED TREE
2013-05-09 17:11:59 -04:00
Boris Zbarsky
73305ee094 Bug 868996. Allow setting opener on the window to non-null, for just the lifetime of the page. r=bholley 2013-05-09 13:07:39 -04:00
David Zbarsky
cc3ae7e546 Bug 868312: Root dom/workers r=bz 2013-05-09 03:27:40 -04:00
Terrence Cole
afa7e6700f Bug 777548 - Make non-cc-participant tracing indirect; r=smaug,billm,jst 2013-03-28 13:37:22 -07:00
Ms2ger
462a4185fa Bug 868727 - Pass an nsAString to nsGlobalWindow::GetChildWindow; r=bz 2013-05-05 09:03:19 +02:00
Ms2ger
879226f26a Bug 868411 - Handlify js::GetObjectProto; r=bz 2013-05-05 09:03:14 +02:00
David Zbarsky
a4d5e39056 Bug 868312: Various dom rooting fixes r=bz 2013-05-04 03:52:57 -04:00
David Zbarsky
65577db573 Bug 868312: Root nsDOMClassInfo.cpp, part 2 r=bz 2013-05-04 03:51:53 -04:00
Boris Zbarsky
7722e3712c Bug 865969 part 7. Fix rooting hazards in DOMJSProxyHandler.cpp. r=ms2ger 2013-05-03 19:29:09 -04:00
David Zbarsky
e1ec6f00cb Bug 868312: Root part of nsDOMClassInfo.cpp r=bz 2013-05-03 14:53:32 -04:00
Bobby Holley
ae35d8196e Bug 834699 - Stop checking dom.xbl_scopes. r=bz 2013-05-02 16:02:03 -07:00
David Zbarsky
1bc9e28725 Bug 866450 Part 3: Fix rooting hazards under content/ and dom/ r=bz 2013-05-02 05:12:46 -04:00
David Zbarsky
4ee20224dc Bug 866450 Part 2: Fix rooting hazards under content/ and dom/ r=bz 2013-05-02 05:12:46 -04:00
Ed Morley
50846cada0 Backed out changeset b514d768d793 (bug 866450) 2013-05-02 11:57:14 +01:00
Ed Morley
783d08690f Backed out changeset 6e6a175fc36a (bug 866450) 2013-05-02 11:57:10 +01:00
David Zbarsky
f600017ce2 Bug 866450 Part 3: Fix rooting hazards under content/ and dom/ r=bz 2013-05-02 05:12:46 -04:00
David Zbarsky
d9ede3c906 Bug 866450 Part 2: Fix rooting hazards under content/ and dom/ r=bz 2013-05-02 05:12:46 -04:00
Boris Zbarsky
0b50592673 Bug 866545. Remove the obsolete dom.enable_performance preference, so we can rely on things like performance.now() existing. r=smaug 2013-05-01 23:44:11 -04:00
Jim Blandy
62fa8b7821 Bug 862531: Replace BaseProxyHandler::obj_toString with className. r=jorendorff 2013-04-30 14:44:50 -07:00