Commit Graph

362 Commits

Author SHA1 Message Date
Boris Zbarsky
ad81ec1f35 Bug 1535384 part 8. Remove MOZ_CAN_RUN_SCRIPT_BOUNDARY for Web IDL Function. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D23779
2019-03-19 20:52:03 +00:00
Boris Zbarsky
d30d048324 Bug 1532351. Remove idle observer API on navigator. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D22029
2019-03-05 08:32:57 +00:00
Boris Zbarsky
74d3c66e2d Bug 1489308 part 10. Remove some document.open handling in outer window that's no longer needed. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D18077
2019-02-27 05:36:38 +00:00
Boris Zbarsky
465d5e2181 Bug 1528146. Fix how web extensions are injected into about:blank. r=kmag
The basic idea is to make non-initial about:blank fire
document-element-inserted notifications just like every other document.  We
then ensure that there's a notification (initial-document-element-inserted)
that only gets fired once per window for documents that are in a window.  This
notification is what webextensions use to inject into the document.

The old setup which injected into about:blank when its global is created gets
removed in favor of injecting the same way as into every other document.

The changes to Document.cpp are fixing a bug in the "block the parser" stuff
webextensions do.  For about:blank, the blocking happens at a point when the
parser really has nothing else to parse (since it's parsing the empty string).
So the blocking is a no-op.  But we do want to prevent DOMContentLoaded firing,
because otherwise the "end of document" scripts could run before we finish
doing the "beginning of document" work in webextensions.  So we want to make
sure we block DOMContentLoaded, not just the load event.

Differential Revision: https://phabricator.services.mozilla.com/D19892
2019-02-22 21:27:44 +00:00
Coroiu Cristina
6afadf9439 Backed out changeset 367ca1e16853 (bug 1528146) on request by igoldan, assignee didn't replied back on time a=backout 2019-02-22 10:10:33 +02:00
Boris Zbarsky
adffade759 Bug 1528146. Fix how web extensions are injected into about:blank. r=kmag
The basic idea is to make non-initial about:blank fire
document-element-inserted notifications just like every other document.  We
then ensure that there's a notification (initial-document-element-inserted)
that only gets fired once per window for documents that are in a window.  This
notification is what webextensions use to inject into the document.

The old setup which injected into about:blank when its global is created gets
removed in favor of injecting the same way as into every other document.

The changes to Document.cpp are fixing a bug in the "block the parser" stuff
webextensions do.  For about:blank, the blocking happens at a point when the
parser really has nothing else to parse (since it's parsing the empty string).
So the blocking is a no-op.  But we do want to prevent DOMContentLoaded firing,
because otherwise the "end of document" scripts could run before we finish
doing the "beginning of document" work in webextensions.  So we want to make
sure we block DOMContentLoaded, not just the load event.

Differential Revision: https://phabricator.services.mozilla.com/D19892
2019-02-15 23:29:34 +00:00
Tim Nguyen
c499a486c2 Bug 1241885 - Implement support for -moz-window-dragging in GTK and remove toolkit toolbar-drag binding. r=dao,bzbarsky,stransky
The restriction preventing fullscreen windows from being dragged is removed.

Differential Revision: https://phabricator.services.mozilla.com/D15075
2019-01-18 22:42:24 +00:00
Andreea Pavel
cdf494d836 Backed out 1 changesets (bug 1241885) for build bustages on a CLOSED TREE
Backed out changeset 176be7000d33 (bug 1241885)
2019-01-18 23:49:55 +02:00
Tim Nguyen
443d70bc2e Bug 1241885 - Implement support for -moz-window-dragging in GTK and remove toolkit toolbar-drag binding. r=dao,bzbarsky,stransky
The restriction preventing fullscreen windows from being dragged is removed.

Differential Revision: https://phabricator.services.mozilla.com/D15075
2019-01-18 16:51:08 +00:00
Alastor Wu
82c98c3f2f Bug 1516482 - part3 : reset user gesture activation flag when top level document changes. r=nika
As the user gesture activation flag is a flag which is used to reflect whether the corresponding document of browsing context has been activated by user or not, we should reset the flag when the top level window changes its document.

Differential Revision: https://phabricator.services.mozilla.com/D16094
2019-01-14 23:21:05 +00:00
Emilio Cobos Álvarez
dc336a73ba Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Peter Van der Beken
a4c053befe Bug 1353867 - Add cross-process proxies for WindowProxy. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D12656
2019-01-02 13:29:18 +00:00
Peter Van der Beken
955ad9221e Bug 1353867 - Change WindowProxyHolder's native type to BrowsingContext. r=bzbarsky
Make the WindowProxyHolder hold a strong reference to a BrowsingContext, as in the future
we might not have a nsPIDOMWindowOuter (if the document is loaded in a different process).

Differential Revision: https://phabricator.services.mozilla.com/D12651
2019-01-02 13:27:05 +00:00
Peter Van der Beken
0792b09f79 Bug 1353867 - Change WindowProxy type. r=bzbarsky
Add a WindowProxyHolder type and generate binding code that takes or returns it whenever
the WebIDL refers to the WindowProxy type. This patch just makes the WindowProxyHolder
hold a strong reference to a nsPIDOMWindowOuter.

Differential Revision: https://phabricator.services.mozilla.com/D12650
2019-01-02 13:26:56 +00:00
Bogdan Tara
a71e3e3f4d Backed out changeset 82ca028b0524 (bug 1503984) for StaticPrefList failures CLOSED TREE 2018-12-18 22:06:19 +02:00
Felipe Gomes
be30248df5 Bug 1503984 - Add a pref to block chrome code from accessing content subframes. r=nika
The pref dom.chrome_frame_access.enabled will default to true. When false, it will block various methods that chrome code can use to traverse subframes. The initial list is:
  iframe.contentWindow
  iframe.contentDocument
  window.top
  window.parent
  window.opener
  window.frames[i]
  window.frames.length
  MessageEvent.source

More blocks are likely to be added in the future.

Differential Revision: https://phabricator.services.mozilla.com/D13180
2018-12-18 18:53:24 +00:00
Andrea Marchesini
ab2f923d5e Bug 1513895 - Unify PopupBlocker algorithm in 1 single file, r=smaug 2018-12-16 10:21:16 +01:00
Sylvestre Ledru
e5a134f73a Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
Peter Van der Beken
9cb2e3a222 Bug 1507604 - Remove nsPIDOMWindowInner::IsTopLevelWindowActive. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D12141
2018-11-23 15:33:11 +00:00
Peter Van der Beken
547b48e396 Bug 1507604 - Remove nsPIDOMWindowInner::GetPrivateRoot. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D12140
2018-11-23 15:39:54 +00:00
Peter Van der Beken
6821b883f2 Bug 1507604 - Remove unused GetSerial methods. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D12137
2018-11-23 15:14:23 +00:00
Peter Van der Beken
ce73512889 Bug 1507604 - Remove nsPIDOMWindowInner::SetOpenerWindow. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D12134
2018-11-23 15:17:01 +00:00
Andrea Marchesini
8ece04d2f7 Bug 1509132 - Inform the 3rd party tracker window when the storage permission is granted, r=ehsan
This is needed for the LocalStorage Next-Generation project which sends storage
notifications only to content processes with an existing LocalStorage object.

I cannot write a test for this, because the current localStorage all works fine.
2018-11-23 08:12:02 +01:00
Gijs Kruitbosch
ca88c0afe0 Bug 1506608 - default to remote for e10s windows, r=mconley,nika
Differential Revision: https://phabricator.services.mozilla.com/D11913
2018-11-19 18:56:18 +00:00
Andrea Marchesini
406cb11397 Bug 1438945 - Part 3: SharedWorkerService and SharedWorkerManager. r=asuth 2018-11-19 15:18:21 -08:00
Nika Layzell
0b81add4ae Bug 1477432 - Part 6: Stop using nsIJSID inside of WebIDL bindings, r=mccr8
Rather than adding a native type for nsID objects in WebIDL, this patch just
takes the approach of switching consumers over to using 'any' and calling the
APIs defined in Part 1.

Differential Revision: https://phabricator.services.mozilla.com/D2283
2018-11-16 17:27:39 -05:00
Andrea Marchesini
48424e4b0e Bug 1502802 - Implement PostMessageOptions for Window, r=smaug 2018-10-29 16:26:30 +01:00
Daosheng Mu
664a6bae9a Bug 1501869 - Part 2: Stop calling VR tasks when they are at background. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D9880
2018-10-28 22:49:15 +00:00
Cosmin Sabou
650e904454 Backed out 2 changesets (bug 1501869) for causing wpt failures on webvr-enabled-by-feature-policy-attribute-redirect-on-load
Backed out changeset 56896b0e10d3 (bug 1501869)
Backed out changeset cdb87cbfe882 (bug 1501869)
2018-10-27 00:51:10 +03:00
Daosheng Mu
33ed3fc76b Bug 1501869 - Part 2: Stop calling VR tasks when they are at background. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D9880
2018-10-26 17:26:32 +00:00
Andrea Marchesini
832c9ca2e3 Bug 1500733 - Remove the support for BufferSource in createImageBitmap, r=aosmond 2018-10-23 23:35:43 +02:00
Jim Blandy
484717430e Bug 1499792: Remove unneeded 'ThrottledEventQueue' forward declarations. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D9008
2018-10-18 12:20:14 +00:00
Emilio Cobos Álvarez
20988a6ca9 Bug 1498860 - Add window.screenLeft / window.screenTop as aliases of screenX / screenY. r=smaug
Tests are at https://github.com/web-platform-tests/wpt/pull/13543.

Spec is waiting on those, but this matches all other browsers.

Differential Revision: https://phabricator.services.mozilla.com/D8917
2018-10-17 02:20:15 +00:00
Olli Pettay
3114641c66 Bug 1492823 - Ensure user input suppression works correctly even after document.open. r=peterv 2018-10-09 08:56:01 -04:00
shindli
72e7e72ae2 Backed out changeset 58f0722012cd (bug 1475415) for force-cargo-library-build bustages CLOSED TREE 2018-09-24 19:37:49 +03:00
Tristan Bourvon
4a199b206f Bug 1475415 - Add first version of IPDL-JS API r=mrbkap,mccr8
Add the first version of the IPDL-JS API, which allow chrome JS to load IPDL files and use them to communicate accross Content processes.
See IPDLProtocol.h for more information regarding how to use the API.

Differential Revision: https://phabricator.services.mozilla.com/D2116
2018-09-24 14:13:20 +00:00
Xidorn Quan
5fa29d57e1 Bug 1490539 part 1 - Change FullScreen to Fullscreen in various names. r=smaug
Some methods on Window are not changed because they are part of public
interface. Method names from widget are also unchanged.

Many "full-screen" in comments are also updated to "fullscreen" instead.

Differential Revision: https://phabricator.services.mozilla.com/D5639
2018-09-12 15:51:30 +00:00
Tanushree Podder
74088f66ca Bug 1357785 - Expose the Visual Viewport API to web content. r=botond, r=nika 2018-08-20 16:28:42 -04:00
Andrea Marchesini
e01da52a2c Bug 1480131 - AntiTrackingCommon::IsFirstPartyStorageAccessGrantFor() should not grant permission to sub-sub-iframe channels; r=ehsan 2018-08-10 14:59:33 -04:00
Imanol Fernandez
3c3827f1b4 Bug 1481393 - Implement a listener for WebVR PresentationGenerationContext changes; r=kip,rbarker,nika
MozReview-Commit-ID: FAR1fYnNM0U

Differential Revision: https://phabricator.services.mozilla.com/D2832
2018-08-07 23:09:42 +00:00
Perry Jiang
9381a63e50 Bug 1479592 - Remove unused PromiseWindowProxy r=mrbkap
Remove unused PromiseWindowProxy code and nsGlobalWindowInner::AddPendingPromise and nsGlobalWindowInner::RemovePendingPromise

Differential Revision: https://phabricator.services.mozilla.com/D2621
2018-08-02 17:00:35 +00:00
Boris Zbarsky
d394e3c238 Bug 1479492. Remove some dead dialog-options parsing code. r=mrbkap
This became dead when we removed showModalDialog.
2018-08-01 13:07:11 -04:00
Boris Zbarsky
7e14d97a48 Bug 1479486. Remove some unused chromeonly history APIs on Window. r=mccr8
Well, back() is used, but only in tests, and those can use history.back().
2018-07-31 17:27:03 -04:00
Boris Zbarsky
6cbb5644fb Bug 1479475 part 1. Remove dead code in nsGlobalWindowInner that is outer-window-only. r=nika 2018-07-31 17:27:02 -04:00
Brindusan Cristian
59b68cd93d Backed out 4 changesets (bug 1479486, bug 1479497, bug 1479475) for build bustages on builds/worker/workspace/build/src/dom/base/nsGlobalWindowInner.cpp:932:53. CLOSED TREE
Backed out changeset b75e262fac02 (bug 1479486)
Backed out changeset 45692ba0fddd (bug 1479475)
Backed out changeset 524fb20de6a2 (bug 1479475)
Backed out changeset 4663bd19da9b (bug 1479497)
2018-08-01 00:49:43 +03:00
Boris Zbarsky
c527be3899 Bug 1479486. Remove some unused chromeonly history APIs on Window. r=mccr8
Well, back() is used, but only in tests, and those can use history.back().
2018-07-31 17:27:03 -04:00
Boris Zbarsky
4a1faf1a93 Bug 1479475 part 1. Remove dead code in nsGlobalWindowInner that is outer-window-only. r=nika 2018-07-31 17:27:02 -04:00
Boris Zbarsky
b25d5063c0 Bug 1478904. Remove unused nsGlobalWindowInner::CallerInnerWindow. r=nika 2018-07-30 11:51:52 -04:00
Boris Zbarsky
1debe14ab9 Bug 1478721. Remove nsIIdleObserver. r=mccr8 2018-07-27 00:37:44 -04:00
Boris Zbarsky
9764373b38 Bug 1476145 part 1. Add a getter to get the nsIDOMWindowUtils from a window. r=nika
The new attribute is not [Cached] because we would need to bump
JSCLASS_GLOBAL_APPLICATION_SLOTS for that and it's not obvious that we should do
that.
2018-07-24 19:47:40 -04:00