Граф коммитов

785 Коммитов

Автор SHA1 Сообщение Дата
Kyle Huey 3b42fbfcd1 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 500be4ff7e Merge the last PGO-green inbound changeset to m-c. 2012-08-30 21:54:09 -04:00
Kyle Huey 20210893cb Bug 786048: Rename 'JSEventListener' to 'EventHandler' to better match the spec's terminology. r=smaug 2012-08-30 09:25:10 -07:00
Neil Deakin d8e7568a69 Bug 784142, assertion and crash calling alert while closing a window, r=smaug 2012-08-30 15:39:39 -04:00
Andrew McCreight fbe861f103 Bug 749366 - Remove mostly bogus size arg from CC callbacks. r=smaug 2012-08-27 10:41:04 -07:00
Philipp von Weitershausen d158b5747c 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
Ryan VanderMeulen 31b5d3335d Merge m-c to inbound. 2012-08-24 16:18:09 -04:00
Olli Pettay db4a617dfb Bug 785228 - nsGlobalWindow is described twice during traverse, r=mccr8
--HG--
extra : rebase_source : 3ebb0df0d4d20618d03bd9f7be2fedd54d6ef843
2012-08-23 14:15:39 -07:00
Rafael Ávila de Espíndola 0d45bdcb77 Bug 784889 - Use nullptr in a function that returns a pointer. r=ms2ger. 2012-08-23 09:56:10 -04:00
Andrew McCreight c063a3e54c 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 cdd4612f38 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 ad90af9ca5 Bug 625199 - s/JSAutoEnterCompartment/JSAutoCompartment/ and make it infallible (r=bholley)
--HG--
extra : rebase_source : 12acf2288285f5caefd7fecea8207de3a47eab5b
2012-08-21 18:42:53 -07:00
Bobby Holley 358de066bc 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 be79576daa 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 fb072823ff Bug 774633 - Assert against switching origins on a compartment. r=jst 2012-08-23 16:44:53 -07:00
Bobby Holley 38274fd965 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 1a9db39ccc 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
Bobby Holley 248ddad9f4 Bug 774633 - Remove dead mOpenerScriptPrincipal. r=jst
This value is initialized to null and never set, so we can get rid of it.
2012-08-23 16:44:52 -07:00
Bobby Holley 133acda80d 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-08-23 16:44:52 -07:00
Bobby Holley 3bd2492b71 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-08-23 16:44:52 -07:00
Justin Lebar 29483a3082 Bug 784436 - Part 2: Use new infallible nsIDocShell methods. r=bz 2012-08-22 18:27:04 -07:00
Ehsan Akhgari e368dc9c85 Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Ian Melven 2495b19dba Bug 341604 - iframe sandbox - block indexedDB if sandboxed without allow-same-origin, add tests for indexedDB r=jst 2012-08-20 11:34:34 -07:00
Ian Melven 4f3defdd1a Bug 341604 - Implement HTML5 sandbox attribute for IFRAMEs r=smaug r=jst 2012-08-20 11:34:32 -07:00
Bill McCloskey 7ea7c080cb Bug 783416 - Stop saving the prototype in WindowStateHolder (r=mrbkap) 2012-08-17 10:09:01 -07:00
Neil Deakin 2e9eced59a Bug 743975 - use a widget listener interface instead of the remaining events that don't need an event, r=tn,jmathies,netzen,smichaud,karlt,blassey,chrisjones 2012-08-15 14:52:42 -04:00
Ehsan Akhgari a09e69cee0 Merge removal of nsnull 2012-08-14 11:29:00 -04:00
Ehsan Akhgari b668854501 Bug 626472 - Remove on last nsnull! 2012-08-14 11:28:45 -04:00
Justin Lebar 74befa949f Bug 769254 - Part 2: Modify nsPIWindowWatcher::OpenWindowJS (renamed to OpenWindow2) so we can pass in the URL for target=_blank links without navigating the opened window to that URL. r=bz 2012-08-14 10:58:00 -04:00
Aryeh Gregor a88ffe5c80 Bug 626472 part 3 - Remove nsnull for good; r=ehsan 2012-08-12 13:43:47 +03:00
Neil Deakin 953592e2fe Bug 391834, don't allow prompts in beforeunload, unload and pagehide events,r=smaug,patch mostly by gavin 2012-08-13 15:05:34 -04:00
Neil Deakin 293dbd7ee1 Bug 391834, rearrange some popup dialog code to be simpler,r=smaug,patch mostly by gavin 2012-08-13 15:03:59 -04:00
Justin Lebar 25c5e67049 Bug 777135 - Part 3: Remove nsDOMWindowUtils::GetIsApp and friends. r=mounir
--HG--
extra : rebase_source : ac3db88b7eb03397c4ae514624e1f3021947c396
2012-08-13 12:58:38 -04:00
Justin Lebar 9ed276e03f Bug 777135 - Part 2: Stop using nsDOMWindowUtils::GetIsApp and friends, and instead use the relevant methods on the principal. r=mounir
--HG--
extra : rebase_source : fa8a153a1edc8f64b230b67f121ba5eaaf1098e6
2012-08-13 12:58:38 -04:00
Robert O'Callahan 65cf9f8b41 Bug 383026. Centralize code that converts DOM scroll offsets to/from layout scroll positions. r=dbaron
--HG--
extra : rebase_source : a6118e0eeea749a601e055741e35cdcd15d81e57
2012-08-10 23:17:06 +12:00
Ms2ger 0ec3bd25cf Backout changeset c77acb256aec for failing to work. 2012-08-11 18:12:54 +02:00
Phil Ringnalda dde42936c6 Backout dcb9d2f694eb (bug 769254) for Windows test_resize_move_windows.html M3 failures 2012-08-10 18:51:29 -07:00
Justin Lebar 6e6f04b273 Bug 769254 - Part 2: Modify nsPIWindowWatcher::OpenWindowJS (renamed to OpenWindow2) so we can pass in the URL for target=_blank links without navigating the opened window to that URL. r=bz
--HG--
rename : layout/reftests/svg/pattern-scale-01c.svg => layout/reftests/svg/pattern-scale-01a.svg
extra : rebase_source : 1e934ffb7a561255430bea738aa204afcaf92c79
2012-08-10 11:42:28 -04:00
Ed Morley 7e6bb0b90b Backout 5d77941eba28 (bug 772726), df597d36bcbb (bug 383026), c9c7e1b9aed9 (bug 779399) for failures in meter-native-style.html 2012-08-10 14:50:43 +01:00
Robert O'Callahan 12edf877ff Bug 383026. Centralize code that converts DOM scroll offsets to/from layout scroll positions. r=dbaron
--HG--
extra : rebase_source : eceb07d8d35e0dd5dd31d065cb04eec12d69a283
2012-08-10 23:17:06 +12:00
Aryeh Gregor 4e199a1679 Bug 780618 - Move all error codes to nsError.h; r=ehsan 2012-07-27 17:03:27 +03:00
Ed Morley b5f4776008 Merge last PGO-green changeset of mozilla-inbound to mozilla-central 2012-08-09 12:46:05 +01:00
Ms2ger 04e6619be6 Bug 780146 - Part a: Move window._content into IDL; r=jst 2012-08-09 09:16:09 +02:00
Boris Zbarsky 71ec9e6ab2 Bug 703855. Don't update performance timing or navigation timing state during document.open. r=jst 2012-08-08 23:47:04 -04:00
Chris Jones a6ec6f5d33 Revert e3e9040a6eb9 for M2 failures 2012-08-08 21:58:23 -07:00
Boris Zbarsky cc86c6a349 Bug 703855. Don't update performance timing or navigation timing state during document.open. r=jst 2012-08-08 23:47:04 -04:00
Ms2ger 772fea0a46 Bug 780165 - Part a: Introduce nsPIDOMWindow::GetDoc(); r=smaug 2012-08-04 09:44:01 +02:00
Ed Morley f4181983a1 Revert inbound to 3d5d1daa2505 to stop OS X M5 failures (backout not clean/could have been a bad merge) on a CLOSED TREE 2012-08-04 18:05:15 +01:00
Ms2ger 9443588dc1 Bug 780165 - Part a: Introduce nsPIDOMWindow::GetDoc(); r=smaug 2012-08-04 09:44:01 +02:00
Ed Morley 81fe0db761 Merge mozilla-central and fx-team 2012-08-03 15:52:55 +01:00