Commit Graph

1212 Commits

Author SHA1 Message Date
Benjamin VanderSloot
b0352105fc Bug 1848783, part 5 - Move UsingStorageAccess onto the WindowContext to fix the storage access check for resource reuqests within subdocuments without active storage access but with permission r=timhuang,nika
Differential Revision: https://phabricator.services.mozilla.com/D187138
2023-09-19 21:03:08 +00:00
Chris H-C
217642a103 Bug 1848708 - Convert all Glean Metric types to webidl. r=nika,janerik,perry.mcmanis,application-update-reviewers,nalexander
Though these are in essence plain objects that need no refcounting,
the presence of a NamedGetter on GleanLabeled means we need to register
everything with the wrappercache.

Paths not taken:
* Making a common utility for Maybe<T> -> dom::Nullable<T>
* GleanEvent::Record taking a dictionary instead of object
* TimerId as opaque Web IDL
* GleanDatetime accept JS Date as well as return it

(( Should make decent follow-ups ))

Differential Revision: https://phabricator.services.mozilla.com/D186267
2023-09-19 17:39:09 +00:00
Narcis Beleuzu
48b97a9a32 Backed out 7 changesets (bug 1848708) for bustages on TimingDistribution.cpp
Backed out changeset e63a855c0acf (bug 1848708)
Backed out changeset 242478709593 (bug 1848708)
Backed out changeset f1a77753fa0c (bug 1848708)
Backed out changeset d230a932c850 (bug 1848708)
Backed out changeset 1261ba650483 (bug 1848708)
Backed out changeset 06061d509ab5 (bug 1848708)
Backed out changeset 726d5138b1d2 (bug 1848708)
2023-09-19 19:18:00 +03:00
Chris H-C
456557ec79 Bug 1848708 - Convert all Glean Metric types to webidl. r=nika,janerik,perry.mcmanis,application-update-reviewers,nalexander
Though these are in essence plain objects that need no refcounting,
the presence of a NamedGetter on GleanLabeled means we need to register
everything with the wrappercache.

Paths not taken:
* Making a common utility for Maybe<T> -> dom::Nullable<T>
* GleanEvent::Record taking a dictionary instead of object
* TimerId as opaque Web IDL
* GleanDatetime accept JS Date as well as return it

(( Should make decent follow-ups ))

Differential Revision: https://phabricator.services.mozilla.com/D186267
2023-09-19 15:03:57 +00:00
Narcis Beleuzu
cf8743b301 Backed out 9 changesets (bug 1835920, bug 1848783, bug 1837168) for assertion failure on PermissionManager.cpp . CLOSED TREE
Backed out changeset 589241e4e1f6 (bug 1848783)
Backed out changeset 7446d643420d (bug 1848783)
Backed out changeset 1b5a505a9bc6 (bug 1848783)
Backed out changeset bfd4df9014d7 (bug 1848783)
Backed out changeset 01f053bbdb97 (bug 1848783)
Backed out changeset e1b829bfb8d1 (bug 1848783)
Backed out changeset f17d58a27f3c (bug 1848783)
Backed out changeset d21bdbf5baf1 (bug 1837168)
Backed out changeset a2d17b5958b8 (bug 1835920)
2023-09-19 16:15:26 +03:00
Benjamin VanderSloot
01de371f9e Bug 1848783, part 6 - Revoke has storage access when the permission is revoked - r=anti-tracking-reviewers,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D187287
2023-09-19 11:11:19 +00:00
Benjamin VanderSloot
218d63a6cc Bug 1848783, part 5 - Move UsingStorageAccess onto the WindowContext to fix the storage access check for resource reuqests within subdocuments without active storage access but with permission r=timhuang,nika
Differential Revision: https://phabricator.services.mozilla.com/D187138
2023-09-19 11:11:19 +00:00
Gregory Pappas
32906a3125 Bug 1428302 - Remove window.sidebar r=webidl,saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D188418
2023-09-17 15:34:47 +00:00
Markus Stange
a4e2816d54 Bug 1843484 - Use EventTarget* instead of nsISupports* for the event target parameter of the EventDispatcher::Dispatch methods. r=smaug
This saves a few QueryInterface calls on the hot path.

Differential Revision: https://phabricator.services.mozilla.com/D186977
2023-08-28 23:38:43 +00:00
Markus Stange
70bd936589 Bug 1843484 - Use EventTarget* instead of nsISupports* for the event target parameter of the nsContentUtils::Dispatch methods. r=smaug
This saves a few queryInterface calls on the hot path.

Differential Revision: https://phabricator.services.mozilla.com/D186976
2023-08-28 23:38:42 +00:00
Olli Pettay
22262b6f58 Bug 1843473 - Don't dispatch DOMActivate if there are no listeners for it, r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D186473
2023-08-18 06:01:16 +00:00
Tooru Fujisawa
63adc251d4 Bug 1847469 - Part 23: Use uint32_t for line and column in DescribeScriptedCaller* functions as a preparation to use column number types. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185761
2023-08-16 17:31:41 +00:00
Cristian Tuns
77d753c741 Backed out 27 changesets (bug 1847469) for causing spidermonkey bustages in Script.cpp CLOSED TREE
Backed out changeset 9d6e2651a013 (bug 1847469)
Backed out changeset 9b72d668efd2 (bug 1847469)
Backed out changeset 86abf5cf0a22 (bug 1847469)
Backed out changeset 46833087f8ac (bug 1847469)
Backed out changeset f3e2207fdeec (bug 1847469)
Backed out changeset aed75776cfff (bug 1847469)
Backed out changeset 8292a38bd99f (bug 1847469)
Backed out changeset 1320f83fb8c7 (bug 1847469)
Backed out changeset df9f925f9837 (bug 1847469)
Backed out changeset 69f32cf1862a (bug 1847469)
Backed out changeset b2ddddec8818 (bug 1847469)
Backed out changeset 056eed7abc97 (bug 1847469)
Backed out changeset 5df4f43ac0bf (bug 1847469)
Backed out changeset cb57923f6532 (bug 1847469)
Backed out changeset a0993f2a2195 (bug 1847469)
Backed out changeset 782499fbedf2 (bug 1847469)
Backed out changeset cf84fb98c5e1 (bug 1847469)
Backed out changeset 1fa5ab59814b (bug 1847469)
Backed out changeset f5f78944df81 (bug 1847469)
Backed out changeset aa14337bf5c6 (bug 1847469)
Backed out changeset 6757db4575d7 (bug 1847469)
Backed out changeset 236ff135701e (bug 1847469)
Backed out changeset 9b4d5b435020 (bug 1847469)
Backed out changeset a0f789621bc8 (bug 1847469)
Backed out changeset c19b81f48055 (bug 1847469)
Backed out changeset b4521e546d7e (bug 1847469)
Backed out changeset f26a10289316 (bug 1847469)
2023-08-16 07:08:01 -04:00
Tooru Fujisawa
982cdf0ff7 Bug 1847469 - Part 23: Use uint32_t for line and column in DescribeScriptedCaller* functions as a preparation to use column number types. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D185761
2023-08-16 10:26:33 +00:00
Benjamin VanderSloot
3d8d18cfc1 Bug 1835907, part 5 - Refactor the window's mStorageAccessPermissionGranted variable and its Getters to a more accurate name: mUsingStorageAccess - r=anti-tracking-reviewers,pbz
This probably should have been done earlier, but became obvious with uses of Document::HasStorageAccessPermissionGrated in this stack.

Differential Revision: https://phabricator.services.mozilla.com/D184825
2023-08-15 13:04:05 +00:00
Cosmin Sabou
819840f3b4 Backed out 6 changesets (bug 1835907) for causing multiple failures. CLOSED TREE
Backed out changeset 91ef29afec50 (bug 1835907)
Backed out changeset 989479621780 (bug 1835907)
Backed out changeset 86e3f98ceb31 (bug 1835907)
Backed out changeset 4790e44c234c (bug 1835907)
Backed out changeset bb9f48eec5bf (bug 1835907)
Backed out changeset 74f90708260a (bug 1835907)
2023-08-14 22:18:10 +03:00
Benjamin VanderSloot
dfe479593f Bug 1835907, part 5 - Refactor the window's mStorageAccessPermissionGranted variable and its Getters to a more accurate name: mUsingStorageAccess - r=anti-tracking-reviewers,pbz
This probably should have been done earlier, but became obvious with uses of Document::HasStorageAccessPermissionGrated in this stack.

Differential Revision: https://phabricator.services.mozilla.com/D184825
2023-08-14 18:02:47 +00:00
Chris H-C
d2467e9003 Bug 1848146 - Allow Glean access to about: pages that are secure chrome UI r=nika
I thought about adding a new flag, but all the current about: pages with
IS_SECURE_CHROME_UI should have Glean, and from how it's documented and used,
I think it's low-risk for future users of that flag as well.

Differential Revision: https://phabricator.services.mozilla.com/D185939
2023-08-11 17:00:06 +00:00
Logan Rosen
847ac3aef0 Bug 1091187 - remove unused arguments and check from UpdateCommands r=dom-core,webidl,masayuki,smaug
Differential Revision: https://phabricator.services.mozilla.com/D185385
2023-08-10 04:09:08 +00:00
Olli Pettay
3f2cf8ccea Bug 1843239, optimize Location.hash, r=peterv,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D183788
2023-08-07 12:31:25 +00:00
Peter Van der Beken
5dc8782829 Bug 1846277 - Untangle nsGlobalWindow*.h includes. r=dom-core,media-playback-reviewers,sessionstore-reviewers,padenot,farre
Differential Revision: https://phabricator.services.mozilla.com/D184978
2023-08-02 20:41:49 +00:00
Gregory Pappas
90e64be6e1 Bug 1177968 - Remove dom.caches.enabled pref r=webidl,devtools-reviewers,saschanaz,asuth
Differential Revision: https://phabricator.services.mozilla.com/D183849
2023-07-20 07:26:11 +00:00
Gregory Pappas
8f97726751 Bug 1842451 - Remove dom.requestIdleCallback.enabled pref r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D183799
2023-07-18 08:00:26 +00:00
Mathew Hodson
3aa1fc98c1 Bug 1832733 - Unexpose sizeToContent() in Nightly. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D177867
2023-07-11 14:39:29 +00:00
Gregory Pappas
3189ebd376 Bug 1400140 - Make window.content chrome-only, remove dom.window.content.untrusted.enabled r=saschanaz,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D183216
2023-07-11 08:28:37 +00:00
Razvan Cojocaru
c449c830ae Bug 1842072 - Prevent IntCoordTyped's constructor from accepting non-integral parameters. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D182936
2023-07-08 07:45:44 +00:00
Nika Layzell
30c48eac49 Bug 1839920 - Rename Get{ASCII,UTF}Origin to GetWebExposedOriginSerialization, r=smaug,necko-reviewers,anti-tracking-reviewers,bvandersloot,jesup
This should make uses of the type more clearly indicating where the
origin came from, and should help avoid potential confusion between this
origin and nsIPrincipal::origin in new code.

This new name is long, but explicit. The string returned from this
function corresponds to the "serialization of an origin" from the WHATWG
html spec:
https://html.spec.whatwg.org/multipage/browsers.html#ascii-serialisation-of-an-origin

Differential Revision: https://phabricator.services.mozilla.com/D181794
2023-06-27 19:59:15 +00:00
Peter Van der Beken
4314c23bc3 Bug 1522052 - remove nsIDOMChromeWindow. r=dom-core,webdriver-reviewers,devtools-reviewers,whimboo,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D34310
2023-06-23 14:21:05 +00:00
Tom Schuster
08d5926fce Bug 1838415 - Introduce RFPTarget::WindowDevicePixelRatio. r=tjr
Depends on D181232

Differential Revision: https://phabricator.services.mozilla.com/D181233
2023-06-21 07:01:24 +00:00
Tom Schuster
17c33fc3a1 Bug 1838415 - Use RFPTarget::ScreenOrientation for the orientation listener. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D180956
2023-06-21 07:01:23 +00:00
Tom Schuster
51182d8b86 Bug 1837153 - Remove more RFPTarget::Unknown default parameters in classes inheriting from nsIGlobalObject. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D180198
2023-06-13 19:32:17 +00:00
Emilio Cobos Álvarez
9d4eb5ecb9 Bug 1837953 - Remove dom.window_position_size_properties_replaceable.enabled. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D180674
2023-06-13 10:55:01 +00:00
Cristian Tuns
f44bc90cc2 Backed out 4 changesets (bug 1837582, bug 1837153) for causing build bustages in nsGlobalWindowInner.cpp on Android CLOSED TREE
Backed out changeset e17bfa5f8959 (bug 1837153)
Backed out changeset 662b7f7504b9 (bug 1837582)
Backed out changeset 7c5fa154397d (bug 1837153)
Backed out changeset b447d95efe6e (bug 1837153)
2023-06-12 06:23:38 -04:00
Tom Schuster
c45282a05c Bug 1837153 - Remove more RFPTarget::Unknown default parameters in classes inheriting from nsIGlobalObject. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D180198
2023-06-12 09:48:03 +00:00
Eden Chuang
73cfb8b6d1 Bug 1800659 - P3 Remove WorkerPrivate::ClearMainEventQueue() r=asuth,smaug
Pending->Canceling->Killing (WorkerNeverRan)

Need to clear WorkerPrivate::mPreStartRunnables

Could we call WorkerRunnable::WorkerRun() to release resource? There could be no WorkerGlobalScope...

Pending->Running->Closing->Canceling->Killing(WorkerRan)
Pending->Running->Canceling->Killing(WorkerRan)

When entering “Closing”
1. Keeping receives normal WorkerRunnables
2. Making ParentStatus as Closing
3. Cancel all timeout
4. Don’t clear the main event queue anymore. But we still wait for all SyncLoops be completed.
5. Call WorkerGlobalScope::NoteTerminating() and nsIGlobalObject::DisconnectEventTargetObjects().
6. Switching to “Canceling” by asking parent thread to call WorkerPrivate::Cancel()

When entering “Canceling”
1. Call WorkerGlobalScope::NoteTerminating()
2. Notify StrongWorkerRefs, worker is in “Canceling”, send and complete the corresponding shutdown work right now.
3. Executing all runnables until no normal WorkerRunnables in queue and no WorkerRefs, SyncLoops and children workers
4. Stop receiving normal WorkerRunnables and DisconnectEventTargetObjects of WorkerScope.
4. Entering “Killing”

When entering “Killing”
1. We would not notify WorkerRefs anymore. Logically all WorkerRefs should be released in “Canceling”
2. Executing all remaining ControlRunnables
3. Release corresponding resources of Worker on worker thread.

Depends on D173850

Differential Revision: https://phabricator.services.mozilla.com/D177511
2023-06-06 06:36:50 +00:00
Valentin Gosu
032ec50dd9 Bug 1677718 - Completely remove AppCache API implementation r=necko-reviewers,emilio,jesup
Depends on D179337

Differential Revision: https://phabricator.services.mozilla.com/D179420
2023-06-02 07:55:23 +00:00
Cosmin Sabou
b1db199f92 Backed out 2 changesets (bug 1677718) for causing appcache wpt failures.
Backed out changeset 2b6b58a6fe2f (bug 1677718)
Backed out changeset d1cfc37a01b3 (bug 1677718)
2023-06-01 02:18:51 +03:00
Tom Schuster
591c5f154e Bug 1834737 - Make RFPTarget parameter of nsIGlobalObject::ShouldResistFingerprinting non-optional. r=tjr,media-playback-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D178924
2023-05-31 09:46:53 +00:00
Valentin Gosu
f58adcdc37 Bug 1677718 - Completely remove AppCache API implementation r=necko-reviewers,emilio,jesup
Depends on D179337

Differential Revision: https://phabricator.services.mozilla.com/D179420
2023-05-31 07:45:46 +00:00
Emilio Cobos Álvarez
e61dc5ca6b Bug 1834042 - Expose screen edge slop to chrome code. r=stransky,webidl,smaug
To be used by session restore.

Differential Revision: https://phabricator.services.mozilla.com/D179110
2023-05-30 09:43:59 +00:00
Cosmin Sabou
53851de129 Backed out 2 changesets (bug 1832733) for causing crashtest failures on test_printpreview.xhtml.
Backed out changeset 9a5195a13c83 (bug 1832733)
Backed out changeset 7180df68e4b2 (bug 1832733)
2023-05-19 16:48:54 +03:00
Mathew Hodson
192b8b8463 Bug 1832733 - Unexpose sizeToContent() in Nightly. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D177867
2023-05-19 10:56:59 +00:00
Kagami Sascha Rosylight
7c39b031e7 Bug 1831065 - Part 1: Remove unused ErrorResult in dom/{abort,base} r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D177007
2023-05-03 13:24:53 +00:00
Makoto Kato
0656ad14f8 Bug 1828607 - Remove remained old wakelock code. r=gsvelto
By bug 1369194, we have removed old wakelock implementation, but there is still old code yet.

Differential Revision: https://phabricator.services.mozilla.com/D175740
2023-04-18 11:32:32 +00:00
John Schanck
1f83f703eb Bug 1737205 - remove the legacy U2F javascript API. r=dveditz,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D175297
2023-04-13 17:43:03 +00:00
Emilio Cobos Álvarez
d8324af55d Bug 1811950 - Allow WorkerGlobalScope.fonts to fail. r=aosmond,webidl,saschanaz
It can fail when canceling the worker (though I couldn't reproduce the
crash locally). Some things were already accounting for it.

Rename some things for consistency.

Differential Revision: https://phabricator.services.mozilla.com/D175126
2023-04-11 13:44:53 +00:00
Olli Pettay
7fd2192532 Bug 1826603 - Don't dispatch transition events if there are no listeners, r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D174829
2023-04-06 09:09:33 +00:00
Nika Layzell
0d131758ab Bug 1810619 - Hold a link from nsGlobalWindowInner to the WindowGlobalChild actor longer, r=smaug
I pushed this to try, and it doesn't appear to cause any leaks. This
reference being held for longer (until the window is CC'd) helps avoid
the fundamental issue with the actor not being available from an active
global.

Differential Revision: https://phabricator.services.mozilla.com/D173855
2023-03-28 19:12:43 +00:00
Tom Schuster
7f3c74ec56 Bug 1824391 - Make RFPTarget an enum class. r=tjr
I was getting name clashes when adding a new value.

Differential Revision: https://phabricator.services.mozilla.com/D173534
2023-03-27 13:21:43 +00:00
Cristian Tuns
4486b62b55 Backed out changeset 9614e9b16bf7 (bug 1824391) for causing build bustages with mozilla::RFPTarget CLOSED TREE 2023-03-24 13:41:07 -04:00