Commit Graph

9279 Commits

Author SHA1 Message Date
J. Ryan Stinnett
95f8000ac8 Bug 1238160 - Add assertions in non-desktop code paths. r=bz,fabrice
Several code paths try to ask the principal if it's in a browser element, but
the principal now only knows about *isolated* browser elements.  All such code
paths are currently unused on desktop.  The frame loader now asserts that
isolation remains enabled for cases where apps are used.

MozReview-Commit-ID: 775DZecc35t
2016-03-02 10:35:56 -06:00
J. Ryan Stinnett
764b9f1ffa Bug 1238160 - Set frame type on TabContext. r=billm,mayhemer
This change renames TabContext::IsBrowserElement to IsIsolatedMozBrowserElement.
Other methods that pass these values around also have name changes.

Adds TabContext::IsMozBrowserElement which is set by the frame loader for all
browser frames.  This is in contrast to its previous implementation, which has
since been renamed IsIsolatedMozBrowserElement, since it checks isolated state
in OriginAttributes.

TabContext methods related to browser elements (and their callers) are updated
to use IsIsolatedMozBrowserElement when check isolation / origins and
IsMozBrowserElement when checking frame types.

MozReview-Commit-ID: DDMZTkSn5yd
2016-03-02 10:35:56 -06:00
J. Ryan Stinnett
777c113bb3 Bug 1238160 - Set docshell isolation mode. r=smaug
Renames nsDocShell isBrowser* attributes to add a "Moz" prefix for clarity.

Adds nsDocShell::GetIsIsolatedMozBrowserElement, which parallels
GetIsInIsolatedMozBrowserElement, but only checks the immediate docshell.

Adds nsDocShell::SetIsInIsolatedMozBrowserElement for the frame loader and tab
child to set the isolation state.

nsDocShell methods related to mozbrowser elements (and their callers) are
updated to use GetIs(In)?IsolatedMozBrowserElement when checking isolation /
origins and GetIsMozBrowserElement when checking frame types.

MozReview-Commit-ID: 6pGD5fF47ZN
2016-03-02 10:35:56 -06:00
J. Ryan Stinnett
a6d2c487b5 Bug 1238160 - Set tab context's isolation from frame attr. r=smaug
Renames existing nsFrameLoader::OwnerIsBrowser* methods to add "Moz" prefix for
clarity.

Adds nsFrameLoader::OwnerIsIsolatedMozBrowserFrame which checks the noisolation
attribute of mozbrowser frames, if present.

This is used to set isolation in nsFrameLoader::GetNewTabContext only when true.

MozReview-Commit-ID: Dz02xBoKh1P
2016-03-02 10:35:56 -06:00
J. Ryan Stinnett
2a55d065b7 Bug 1238160 - Rename OriginAttributes.mInBrowser and associated methods. r=bz,mayhemer
This change renames OriginAttributes.mInBrowser to mInIsolatedMozBrowser and
nsIPrincipal::GetIsInBrowserElement to GetIsInIsolatedMozBrowserElement.  Other
methods that pass these values around also have name changes.

Tokens such as "inBrowser" have previously been serialized into cache keys, used
as DB column names, stored in app registries, etc.  No changes are made to any
serialization formats.  Only runtime method and variable names are updated.

No behavior changes are made in this patch, so some renamed methods may have
nonsensical implementations.  These are corrected in subsequent patches
focused on behavior.

MozReview-Commit-ID: 66HfMlsXFLs
2016-03-02 10:35:56 -06:00
J. Ryan Stinnett
9ad7daa848 Bug 1238160 - Test mozbrowser APIs to ensure no content exposure. r=bz
Check the various mozbrowser APIs to ensure they are allowed when you have
browser permission and blocked when you don't (like regular web content).

MozReview-Commit-ID: FPDA1lEUwRq
2016-03-02 10:35:56 -06:00
Anthony Zhang
1a25854f75 Bug 1251667 - Add a measure SLOW_SCRIPT_PAGE_COUNT, which measures the number of pages per session that have slow scripts. r=wmccloskey
Slow script events are when the script hangs the page's process (that's the content process on e10s).

For further reference, see https://wiki.mozilla.org/Electrolysis/Release_Criteria/Slow_Script. The measure is necessary because SLOW_SCRIPT_NOTICE_COUNT is not comparable between e10s and non-e10s, while SLOW_SCRIPT_PAGE_COUNT will be. This is necessary for evaluating the slow script e10s release criteria.

The measure requires a new field in nsGlobalWindow because we need to keep track of when the page changes in order to know whether we need to count a slow script event. This is a relatively clean option compared to keeping track of that state in XPCJSRuntime or dom::Navigator.
2016-03-01 11:16:33 -05:00
Wes Kocher
01574acd0a Backed out changeset 96580db9b356 (bug 1252565) for test_recursion.html failures
MozReview-Commit-ID: 1ycmM8vfG3d
2016-03-01 15:40:46 -08:00
Kyle Machulis
79cb11f843 Bug 1240471 - Possibly remove invalid queries and post console messages on youtube rewrite; r=khuey fb=cpeterson 2016-03-01 14:05:29 -08:00
Boris Zbarsky
68dc8de0a0 Bug 1252565. Make dom::WarningOnlyErrorReporter handle workers. r=bholley 2016-03-01 16:53:22 -05:00
Dave Huseby
0c0cf070cf Bug 1229222 - add chromeutils for the creation of origin attributes with the correct default values. r=sicking
(HEAD -> oa, refs/patches/oa/Bug_1229222)
Fixes Bug 1229222

--HG--
extra : rebase_source : 299742335452d5b5ac3cf25a3bd2d71ec655049f
2016-02-29 12:26:00 +01:00
Carsten "Tomcat" Book
30e5302af8 Merge mozilla-central to mozilla-inbound 2016-03-01 15:25:31 +01:00
Andrea Marchesini
9e960ae549 Bug 1250572 - Force a parent object in MessagePort/Channel and in StructuredCloneHolder, r=smaug 2016-03-01 15:21:11 +01:00
Ehsan Akhgari
8a0731fdde Bug 1251875 - Part 1: Remove the dom.serviceWorkers.interception.enabled pref; r=bkelly 2016-03-01 09:16:38 -05:00
Daniel Holbert
e23c4f231b Bug 1247478: Rename FirstAdditionalAuthorSheet() to GetFirstAdditionalAuthorSheet(), since it can return null. r=heycam 2016-02-29 15:09:13 -08:00
Daniel Holbert
61ab7f2b20 Bug 1246464: Add 'const' to some stylesheet args in nsDocument methods. r=heycam 2016-02-29 13:24:25 -08:00
Boris Zbarsky
69924c14ce Bug 1252123. Remove some unnecessary JSContext arguments from worker ScriptLoader methods. r=khuey 2016-02-29 14:52:42 -05:00
Boris Zbarsky
663b9bd562 Bug 1252091. Add/RemoveFeature don't need a JSContext argument. r=khuey 2016-02-29 14:52:42 -05:00
Franziskus Kiefer
56bdfe820a Bug 1244116 - Telemetry for mixed content requests by plugins. r=smaug, p=ally
MozReview-Commit-ID: F9rOb1SdPnL

--HG--
extra : rebase_source : 0b2aa83761880fb6e5a18c3a80ac86fe5ca16923
2016-02-16 15:46:36 +01:00
David Anderson
dd2df9d99a Remove some static_casting in CompositorParent. (bug 1245765 part 5, r=mattwoodrow) 2016-02-29 01:53:14 -05:00
Carsten "Tomcat" Book
83adb66526 merge mozilla-inbound to mozilla-central a=merge 2016-03-01 12:01:58 +01:00
Huma Zafar
06fc8dac78 Bug 1206166 - Move FetchUtil::Consume methods into separate BodyUtil class and update Fetch.cpp and ServiceWorkerEvents.cpp accordingly. r=kitcambridge
MozReview-Commit-ID: KgEccQ2LPpC

--HG--
extra : histedit_source : 17fb2f5c022399b050a12b013f004e628ca4b9d0
2016-02-27 13:54:11 -08:00
Peter Van der Beken
946ac27409 Bug 1251655 - Remove support for JavaScript-DOM-class and JavaScript-DOM-interface. r=bz.
--HG--
extra : rebase_source : 88c93e93905e20d2f6755d67d86902fdfc923eb4
2016-02-14 15:59:48 +01:00
Peter Van der Beken
5564e12f54 Bug 1251655 - Remove support for JavaScript-global-constructor-prototype-alias. r=bz.
--HG--
extra : rebase_source : b77f4ad6d582b863bf6462177ce816aa360c64ed
2016-02-13 14:59:46 +01:00
Boris Zbarsky
0f5040d0b3 Bug 1251627. Fix XMLHttpRequest.send() to follow the spec better in terms of the exceptions it throws. r=khuey 2016-02-26 21:15:56 -05:00
Geoff Brown
d05b32db6c Bug 1248817 - Make test_domwindowutils.html more forgiving of coordinate rounding; r=ochameau 2016-02-26 14:01:11 -07:00
Boris Zbarsky
7345c5edb1 Bug 1251045 part 4. Remove the JSContext argument of WorkerRunnable::Dispatch. r=khuey 2016-02-26 15:23:12 -05:00
Boris Zbarsky
878fd26e89 Bug 1251045 part 3. Remove the JSContext argument of WorkerRunnable::PostDispatch and its overrides. r=khuey 2016-02-26 15:23:12 -05:00
Boris Zbarsky
d0b2f4eeda Bug 1251045 part 2. Remove the JSContext argument of ModifyBusyCountFromWorker. r=khuey 2016-02-26 15:23:12 -05:00
Dragana Damjanovic
5031bdb80e Bug 580313 - New resource hints for link. r=smaug
--HG--
extra : rebase_source : 5ce4ef05217f6d513052f83a7e18b00d1596417a
2016-02-26 02:41:00 +01:00
Mike de Boer
16115798a5 Bug 1250871 - only send messages to child scripts when the docShell is still around. r=smaug 2016-02-29 12:25:48 +01:00
Boris Zbarsky
cc6606ed0d Bug 1250975. Stop passing a JSContext argument to WorkerRunnable::PreDispatch and its overrides. r=khuey 2016-02-25 16:05:39 -05:00
Cameron McCormack
49f6905565 Bug 1250790 - Don't try to add CSSStyleSheets from the style sheet service to a ServoStyleSet. r=bholley 2016-02-26 12:51:02 +11:00
Wes Kocher
d66f0ad3fc Backed out changeset bb404647f14c (bug 1250975) for build bustage CLOSED TREE
--HG--
extra : commitid : KyFNIQ1ugVq
2016-02-25 13:41:09 -08:00
Boris Zbarsky
683b099eb9 Bug 1250975. Stop passing a JSContext argument to WorkerRunnable::PreDispatch and its overrides. r=khuey 2016-02-25 16:05:39 -05:00
Andrea Marchesini
ed31fee8d4 Bug 1245184 - nsICookieManager.remove should use the OriginAttributes, r=sicking 2016-02-25 16:41:13 +01:00
Boris Chiou
277bbf98a5 Bug 1234403 - Part 2: Implement document.getAnimations. r=birtles 2016-02-18 02:24:00 +01:00
Boris Chiou
1c9da6a517 Bug 1234403 - Part 1: Implement CSSPseudoElement.getAnimations. r=birtles 2016-02-18 02:21:00 +01:00
Carsten "Tomcat" Book
e232fcd2d4 Merge mozilla-central to mozilla-inbound 2016-02-25 11:59:05 +01:00
Carsten "Tomcat" Book
3695dd59e0 merge mozilla-inbound to mozilla-central a=merge 2016-02-25 11:57:51 +01:00
Carsten "Tomcat" Book
94388a5225 Merge mozilla-central to fx-team 2016-02-24 12:07:20 +01:00
Xidorn Quan
cf344838d0 Bug 1248505 - Remove nsDocument::IsFullScreenDoc and its uses. r=smaug
MozReview-Commit-ID: DfPI5U531ad

--HG--
extra : source : bcfb7b8155c7460b861ef3e11d92900ecb6c5029
2016-02-24 08:40:08 +08:00
Blake Kaplan
89b19e3239 Bug 1183915 - Put images dragged from content processes in the drag data in the parent. r=smaug 2016-02-23 16:31:29 -08:00
Andrew McCreight
1837d54fa7 Bug 1249685 - Use more nsCOMPtrs for stack variables in DOM code. r=smaug 2016-02-23 16:23:43 -08:00
Andrea Marchesini
2dd57b41c0 Bug 1250148 - FormData should treat empty input type=file as empty string in FormData and as unnamed Blob in HTML submission, r=smaug 2016-02-24 00:01:01 +01:00
Boris Zbarsky
e715be26bd Bug 1250185 part 1. nsIStructuredCloneContainer.initFromBase64 doesn't need a JSContext argument. r=khuey 2016-02-23 15:02:32 -05:00
Boris Zbarsky
df912accb2 Bug 1250234. Make WebSocket::CreateAndDispatchMessageEvent properly report JS exceptions it might be producing. r=khuey 2016-02-23 15:02:28 -05:00
Wes Kocher
1a11ff119f Backed out changeset 74f968e36041 (bug 1250148) for test_blobconstructor.html failures
--HG--
extra : commitid : 5I4oajo0G1j
2016-02-23 10:49:24 -08:00
Wei-Cheng Pan
601dc81eb0 Bug 1208641 - Extract stack from DOM/XPC exception. r=bholley 2016-02-24 02:06:42 -08:00
Ms2ger
11753ea579 Bug 1250926 - Remove unused SCRIPTABLE_FLAGS defines from nsDOMClassInfo; r=peterv 2016-02-25 09:28:06 +01:00