Commit Graph

2686 Commits

Author SHA1 Message Date
Bobby Holley
05e10f96c1 Bug 774633 - Fold SetOpenerScriptPrincipal into SetInitialPrincipalToSubject, and make it indempotent and callable without an existing document. r=jst
There's no reason it has to fail if there's no mDoc, since any document is promptly
blown away with the new about:blank document.

The indempotence is important because we want to be able to call this method
unconditionally in OpenJSWindowInternal (since we may not have gone through
RegisterTopLevelWindow) without worrying about whether we've called it already.
2012-09-05 11:32:06 -07:00
Bobby Holley
517b3a2ec0 Bug 774633 - Remove dead mOpenerScriptPrincipal. r=jst
This value is initialized to null and never set, so we can get rid of it.
2012-09-05 11:32:06 -07:00
Bobby Holley
e0da4110dc Bug 774633 - Wean SetInitialPrincipalToSubject off some parameters and clean it up. r=jst
We can remove the fallback to the principal of aParent because we already push the
cx for aParent (callerContextGuard) whenever we're concerned about using its principal.
2012-09-05 11:32:06 -07:00
Bobby Holley
3d944bcab3 Bug 774633 - Factor nsWindowWatcher call to SetOpenerScriptPrincipal into a method on nsGlobalWindow. r=jst
This doesn't change any functionality in the code. Note that the name is currently
a bit of a misnomer, but we change that in the next patch when we rip out the
arguments.
2012-09-05 11:32:06 -07:00
Boris Zbarsky
437a27a6d1 Bug 778044. Add a way to pref off Paris binding constructor objects. r=peterv 2012-09-05 13:37:28 -04:00
Mike Habicher
991f26aa4b Bug 779139 - Make DOM-facing camera objects cycle collection participants. r=jst
--HG--
rename : dom/camera/CameraControl.h => dom/camera/CameraControlImpl.h
rename : dom/camera/GonkCameraCapabilities.cpp => dom/camera/DOMCameraCapabilities.cpp
2012-09-04 21:01:56 -04:00
Brendan Dahl
3f688bb97f Bug 745025 - Part 1 - Adds mozPrintCallback for canvas. r=smaug 2012-08-31 10:45:45 -07:00
Kyle Machulis
93cbb2ff95 Bug 783426 - Async firing for FireSuccess/Error on DOMRequest; r=jonas r=khuey 2012-09-04 13:19:22 -07:00
Masayuki Nakano
652c834ce7 Bug 786898 part.2 Add overflow delta value tests r=smaug, sr=smaug 2012-09-04 17:39:28 +09:00
Ed Morley
970e1b69f3 Backout 1d89bc229215 (bug 784142) for bug 787744 2012-09-03 10:04:49 +01:00
Randell Jesup
eedf93a21d Bug 773151: Convert nsCAutoString->nsAutoCString CLOSED TREE r=bsmedberg 2012-09-01 22:35:17 -04:00
Kyle Huey
c25f8e64ef Bug 687332: Part 2 - Move event handlers off of DOM objects and keep track of them solely in the event listener manager. r=smaug,bz 2012-08-30 20:45:16 -07:00
Ryan VanderMeulen
df8b5323ba Merge the last PGO-green inbound changeset to m-c. 2012-08-30 21:54:09 -04:00
Kyle Huey
75454be03c Bug 786048: Rename 'JSEventListener' to 'EventHandler' to better match the spec's terminology. r=smaug 2012-08-30 09:25:10 -07:00
Masayuki Nakano
7664e6a01a Bug 674477 Don't scroll around axis whose overflow is hidden by wheel events r=smaug 2012-08-30 10:05:16 +09:00
Neil Deakin
3b9299ae04 Bug 784142, assertion and crash calling alert while closing a window, r=smaug 2012-08-30 15:39:39 -04:00
Yoshi Huang
34c48a72ba Bug 744714 - Part 4 : DOMEvent. r=smaug 2012-06-11 19:28:16 +08:00
Yoshi Huang
834cc56292 Bug 744714 - Part 2: MozIccManager. r=smaug 2012-06-28 16:21:48 +02:00
Yoshi Huang
a1a91d777b Bug 785942 - Part 2: Update Impl. r=smaug 2012-08-27 14:34:10 -03:00
Ryan VanderMeulen
93bb5ffbd7 Merge m-c to inbound. 2012-08-28 13:23:42 -04:00
Olli Pettay
ec8a1d0493 Bug 784259 - nsDOMMutationObserver should inherit nsWrapperCache, r=peterv 2012-08-28 18:25:19 +03:00
Rafael Ávila de Espíndola
3ae64f38a4 Bug 786148 - s/IPC/ipc/. r=ted.
This makes our builds a bit more reproducible. Without it when processing

#include "IPC/IPCMessageUtils.h

we end up in

#include "ShadowLayers.h"

which in the final XUL translates into the symbol (run nm -a to see it):

 - 00 0000   SOL ../../../../gfx/layers/IPC/ShadowLayers.h

now when some file in gfx/layers/ipc does

#include "ShadowLayres.h"

the file found is the local one with the lowercase directory name and we end up
with

 - 00 0000   SOL ../../../../gfx/layers/ipc/ShadowLayers.h

--HG--
extra : rebase_source : 96c68f6a3448eedaa280039960df911a9c707cac
2012-08-28 08:41:04 -04:00
Andrew McCreight
3f6c58c43d Bug 749366 - Remove mostly bogus size arg from CC callbacks. r=smaug 2012-08-27 10:41:04 -07:00
Andrea Marchesini
a8265b9cdc Bug 784190 - Fix Cycle collection casting in DOMRequest, r=mccr8 2012-08-27 09:44:25 -07:00
Vicamo Yang
eb5c8277b8 Bug 579517 follow-up: Remove NSPR types that crept in 2012-08-27 23:31:35 +08:00
Philipp von Weitershausen
5801c8b2ab Bug 776825 - Separate message managers into senders and broadcasters. r=smaug
--HG--
rename : content/base/public/nsIFrameMessageManager.idl => content/base/public/nsIMessageManager.idl
2012-08-27 11:13:02 -03:00
Gabor Krizsanits
56e99a4fb8 Bug 738244 - Supporting DOM specific collection properties through xray wrappers; r=mrbkap 2012-08-27 15:06:34 +02:00
Benjamin Peterson
de7d529c1c Bug 781035 - Use the C++ JS compile API in more places. r=jorendorff sr=jst 2012-08-27 08:04:37 -04:00
Andrew McCreight
d22deaa03b Bug 765527. r=mrbkap 2012-08-25 14:56:45 -07:00
Michael Comella
f820953155 Bug 784016 - Bug fix for patch in bug 781977 - correct misordered params. r=jimm 2012-08-25 11:04:14 -05:00
Ryan VanderMeulen
6989c1bf30 Merge m-c to inbound. 2012-08-24 16:18:09 -04:00
Olli Pettay
8cd4cd7ed2 Bug 785228 - nsGlobalWindow is described twice during traverse, r=mccr8
--HG--
extra : rebase_source : 3ebb0df0d4d20618d03bd9f7be2fedd54d6ef843
2012-08-23 14:15:39 -07:00
Ben Turner
0727b7098c Bug 784726 - 'Remove old IPC::URI'. r=cjones+khuey.
--HG--
rename : ipc/glue/IPCSerializableParams.ipdlh => ipc/glue/InputStreamParams.ipdlh
extra : transplant_source : %A6%BC%8B%8D%3A_%7Df%2B%FE%AA%94%81%AB%CAW%15K%A7%03
2012-08-23 12:33:46 -07:00
Kyle Machulis
745ad2e64b Backout of f98bea38e654 due to mochi bustage 2012-08-23 12:01:27 -07:00
Kyle Machulis
ee26c8d64a Backout of c129811b87ef due to mochi bustage 2012-08-23 12:00:51 -07:00
Kyle Machulis
b48c1bd763 Bug 783426: Patch 2 - Async DOMRequest Firing Tests; r=sicking 2012-08-23 09:52:54 -07:00
Kyle Machulis
05bf643907 Bug 783426: Patch 1 - Async DOMRequest Firing; r=sicking 2012-08-23 09:52:29 -07:00
Rafael Ávila de Espíndola
8b3fc1dbd6 Bug 784889 - Use nullptr in a function that returns a pointer. r=ms2ger. 2012-08-23 09:56:10 -04:00
Nathan Froyd
2d595e5d44 Bug 783357 - part 1: add XPIDL_FLAGS to make idl dependencies more explicit; r=khuey 2012-08-24 16:01:30 -04:00
Jan Varga
e29317c8d8 Bug 763854 - Check file references (cleanup stored files) only when needed. r=bent 2012-08-24 11:51:33 -07:00
Kyle Huey
1a68eab98d Bug 783162: Make mapped attributes hold the image alive. r=bz
The nsCSSValue in nsGenericHTMLElement::MapBackgroundInto is a temporary.  This causes a problem after Bug 697230 landed, because the nsCSSValue::Image we put into that value is destroyed once we're done doing style stuff.  Previously the nsImageLoader would grab the request off the nsCSSValue::Image and hold it alive.  Bug 697230 changed the behavior here; now when the nsCSSValue::Image is destroyed it tells the image loader to drop the request.  The result is that all the references to the request are dropped and the frame is never told it has a background.

The solution is to keep the nsCSSValue::Image alive longer.  This patch adds two new types of nsAttrValue.  The first is an nsCSSValue::URL.  A ParseBackgroundAttribute method is added on nsGenericHTMLElement that the relevant elements (body/td/th/table/tr/tbody/thead/tfoot) call that parses background into an nsCSSValue::URL.  The second is an nsCSSValue::Image.  nsGenericHTMLElement::MapBackgroundInto attempts to convert the nsCSSValue::URL into an nsCSSValue::Image by kicking off the image load.  The result is that image loads are only started when the element is actually visible.  This also mirrors the way background-image works.  This also allows us to fix two longstanding bugs in this code.  Since MapBackgroundInto doesn't have a pointer to the actual element, it relied on grabbing the principal of the document.  Now we can grab the principal of the node in ParseBackgroundAttribute.  MapBackgroundInto also has no way to get at the element's base URI (to honor xml:base), which is now possible in ParseBackgroundAttribute.

nsCSSValue::[Image|URL] have also been moved to be mozilla::css::[Image|URL]Value.  nsAttrValue.h is included in external linkage code, so it can't include nsCSSValue.h to get the declarations of nsCSSValue::[Image|URL], and nested classes can't be forward declared.  Moving the classes to a namespace solves the problem.

Finally some old inoperative quirks mode code was removed.  This code has done nothing since Bug 273078 was landed in 2004.
2012-08-24 10:50:49 -07:00
Andrew McCreight
62325fa9f3 Bug 750570, part 4 - Switch most native CC classes to use the purple buffer. r=smaug
This patch actually converts over most of the existing native CC classes
to use the participant. This is done by converting them to use
the newly generalized nsCycleCollectingAutoRefCnt instead of their usual
ref count.

This is mostly a matter of defining new macros defining AddRef() and Release()
for native CC classes with the CC ref count.

nsTimeout is left as a legacy native CC class because it is a weird class,
but hopefully eventually it too can be converted over.  See bug 774874.
2012-08-24 09:50:06 -07:00
Matt Brubeck
5e47d4412f Back out 670c8a2695b3 (bug 771354), 134557d57e6e 4ad52e488977 (bug 774607), and...
036eb8c2a08a d4d36e3b948f 35334e820632 6bd07fd5147d d49e7c0d762c 407f19deb14c d84551808abb (bug 774633)
on a CLOSED TREE
2012-08-23 21:34:27 -07:00
Luke Wagner
94264a0bc8 Bug 625199 - s/JSAutoEnterCompartment/JSAutoCompartment/ and make it infallible (r=bholley)
--HG--
extra : rebase_source : 12acf2288285f5caefd7fecea8207de3a47eab5b
2012-08-21 18:42:53 -07:00
Luke Wagner
18c0268620 Bug 625199 - kill dummy frames (r=mrbkap)
--HG--
extra : rebase_source : df4e3bddabf20cdc5b9122370fa62b40e64177c7
2012-08-17 18:05:06 -07:00
Bobby Holley
6dbb03cd4b Bug 771354 - Don't special-case principal assignment for chrome windows in nsGlobalWindow.cpp. r=bz 2012-08-23 16:44:53 -07:00
Bobby Holley
a2d7eabc5a Bug 774607 - Remove use of JS_{Is,Make}SystemObject from Gecko. r=bz
We currently set this for system globals and anything whose parent
chain leads to a system global. Maybe this was relevant before, but
with CPG this is just equivalent to asking whether the object is in
a system compartment. And the only place where we _check_ this bit
is immediately after checking for a system compartment, in
WrapperFactory. So AFAICT this can go away entirely.
2012-08-23 16:44:53 -07:00
Bobby Holley
487e2dd7a7 Bug 774633 - Assert against switching origins on a compartment. r=jst 2012-08-23 16:44:53 -07:00
Bobby Holley
27cb64cf35 Bug 774633 - Remove "is chrome window" condition for inner window reuse. r=jst
WouldReuseInnerWindow also returns true if the new window is same-origin with
the old one about:blank document.

This condition exists in order to handle some sloppiness with respect to the
principals on initial about:blank documents. Chrome callers sometimes parent
chrome windows (with XUL document) to content windows. But this parenting causes
us to push the cx of the content window during window creation, meaning that
the subsequent load of chrome://foo.xul blows away the old inner window and any
expandos on it. We can handle this case more precisely by skipping the cx push
for type="chrome" windows.

Furthermore, this was also necessary to prevent the inner window from being
blown away in the call to SetOpenerScriptPrincipal once nsWindowWatcher gets
the window back from the window creator (and after it's already told consumers
about the window via "domwindowcreated"). But we fixed this nastiness in the
previous patches.

So we can remove this case. By doing so, we can prevent inner windows from ever
changing origins, which is very important for compartment security invariants.
2012-08-23 16:44:53 -07:00
Bobby Holley
bdfc1a194e Bug 774633 - Fold SetOpenerScriptPrincipal into SetInitialPrincipalToSubject, and make it indempotent and callable without an existing document. r=jst
There's no reason it has to fail if there's no mDoc, since any document is promptly
blown away with the new about:blank document.

The indempotence is important because we want to be able to call this method
unconditionally in OpenJSWindowInternal (since we may not have gone through
RegisterTopLevelWindow) without worrying about whether we've called it already.
2012-08-23 16:44:52 -07:00