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

340 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez d36c96ab4c Bug 1612068 - Move zoom from the content viewer to the browsing context. r=nika
We need it to live in BrowsingContext instead of WindowContext, because
we need to preserve the zoom level across same-origin navigation.

It'd be nice if it only lived in the top BC, but that's not possible at
the moment because a lot of tests rely on zooming only iframes. Some of
them can be adjusted for scaling the top instead, but not sure it's
worth it's worth fixing them and moving the zoom to be top-only, as it'd
be a bunch of effort, and the complexity and overhead of propagating the
zoom is not so big.

The print-preview-specific code in nsContentViewer is from before we did
the document cloning setup, and it seems useless. I've tested print
preview scaling before and after my patch and both behave the same.

The rest is just various test changes to use the SpecialPowers APIs or
BrowsingContext as needed instead of directly poking at the content
viewer.

I named the pres context hook RecomputeBrowsingContextDependentData, as
more stuff should move there like overrideDPPX and other media emulation
shenanigans.

I also have some ideas to simplify or even remove ZoomChild and such,
but that's followup work.

Differential Revision: https://phabricator.services.mozilla.com/D71969
2020-04-22 19:32:52 +00:00
Andreea Pavel 94bb650cd4 Backed out 2 changesets (bug 615761) for failing bc browser_policy_search_engine.js on a CLOSED TREE
Backed out changeset 2388eb7ac460 (bug 615761)
Backed out changeset 8afe4a315797 (bug 615761)
2020-04-22 22:13:03 +03:00
pbz 3ecb060dd3 Bug 615761 - Promise chain AddSearchProvider window actor calls to prevent IPC flooding. r=johannh,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D70870
2020-04-22 17:32:32 +00:00
pbz efff5156a0 Bug 615761 - Made window.external.AddSearchProvider prompts tab modal. r=johannh,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D69838
2020-04-22 17:34:16 +00:00
Gijs Kruitbosch 1c0a1c9f3e Bug 1631358 - remove traces of CPOWs from browser/, testing/ and toolkit/, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D71510
2020-04-21 14:05:35 +00:00
Noemi Erli c0bd1834c8 Backed out 19 changesets (bug 1602318) for causing multiple failures
Backed out changeset 4b3345b2e33b (bug 1602318)
Backed out changeset 7240b27afe28 (bug 1602318)
Backed out changeset a7091729d8c9 (bug 1602318)
Backed out changeset e496ab6c0857 (bug 1602318)
Backed out changeset 184da6309f0c (bug 1602318)
Backed out changeset 79b540f8619d (bug 1602318)
Backed out changeset b298015ee960 (bug 1602318)
Backed out changeset 6d0783cd5e01 (bug 1602318)
Backed out changeset cbc308486b17 (bug 1602318)
Backed out changeset 94142944fb54 (bug 1602318)
Backed out changeset 7c1eeb299b78 (bug 1602318)
Backed out changeset 0fc27502503a (bug 1602318)
Backed out changeset 0fc27c2e09d9 (bug 1602318)
Backed out changeset b5e2aa4741b2 (bug 1602318)
Backed out changeset 57d568114c5a (bug 1602318)
Backed out changeset 8f7360d827dc (bug 1602318)
Backed out changeset 78930a97c2df (bug 1602318)
Backed out changeset 8015780587cd (bug 1602318)
Backed out changeset bc9da03cb3a3 (bug 1602318)
2020-04-21 03:46:41 +03:00
Matt Woodrow 8c122b6d22 Bug 1602318 - Make RemoteWebProgress:stop also stop any current loads in the parent process. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70626
2020-04-20 23:02:32 +00:00
Edgar Chen 1835c415b7 Bug 1628186 - Mouse event on <select> elements should be composed; r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D71073
2020-04-17 16:25:34 +00:00
pbz 3075dbd453 Bug 1615588 - Extended nsIPromptService to support tab modal prompts. r=johannh,MattN,necko-reviewers,dragana
This patch introduces a new tab modal system prompt type. It can be opened via the nsIPromptService
with a destination BrowsingContext. These tab system prompts overlap slightly with the upper
chrome UI to differentiate them from content prompts (previously called tab prompts).

- Extended nsIPromptService and nsIPrompt to accept 3 types of modal prompts:
  - Window prompts
  - Tab (system) prompts
  - Content prompts (the old tab prompts)
- Removed prompt code from Prompter.jsm, always call PromptParent window actor instead
- Added PromptChild window actor to forward pagehide events to parent actor
- Created additional prompt methods in nsIPromptService to prompt by browsingContext and modalType
- Backwards compatibility is maintained, consumers can still open content prompts calling nsIPrompt with a content window

Differential Revision: https://phabricator.services.mozilla.com/D66446
2020-04-16 14:43:50 +00:00
Csoregi Natalia 954b969608 Backed out 5 changesets (bug 1615588) for browser-chrome failures e.g. browser_beforeunload_duplicate_dialogs.js. CLOSED TREE
Backed out changeset 751cca7566a8 (bug 1615588)
Backed out changeset 474aca043834 (bug 1615588)
Backed out changeset 7839b95ef76c (bug 1615588)
Backed out changeset 32bb87f48b13 (bug 1615588)
Backed out changeset 264e642042b1 (bug 1615588)

--HG--
extra : rebase_source : 41ed149c97382bc1cf823abc56811b382cae0207
2020-04-10 21:19:15 +03:00
pbz 2f0f0d62d1 Bug 1615588 - Extended nsIPromptService to support tab modal prompts. r=johannh,MattN
This patch introduces a new tab modal system prompt type. It can be opened via the nsIPromptService
with a destination BrowsingContext. These tab system prompts overlap slightly with the upper
chrome UI to differentiate them from content prompts (previously called tab prompts).

- Extended nsIPromptService and nsIPrompt to accept 3 types of modal prompts:
  - Window prompts
  - Tab (system) prompts
  - Content prompts (the old tab prompts)
- Removed prompt code from Prompter.jsm, always call PromptParent window actor instead
- Added PromptChild window actor to forward pagehide events to parent actor
- Created additional prompt methods in nsIPromptService to prompt by browsingContext and modalType
- Backwards compatibility is maintained, consumers can still open content prompts calling nsIPrompt with a content window

Differential Revision: https://phabricator.services.mozilla.com/D66446

--HG--
extra : moz-landing-system : lando
2020-04-10 16:47:00 +00:00
Neil Deakin 8d97cadc7f Bug 1614713, add a remote page manager like object that uses JSWindowActor instead. Move access management into a separate module that can be used within a child or parent process. Ensure all RPM calls go through the access manager, r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D63713

--HG--
rename : toolkit/components/remotepagemanager/MessagePort.jsm => toolkit/actors/RemotePageChild.jsm
extra : moz-landing-system : lando
2020-04-08 14:08:11 +00:00
Nika Layzell 98528edbf2 Bug 1616353 - Part 6.2: Remove setOriginAttributesBeforeLoading API, r=smaug
This API is no longer possible to implement, as it will always try to set the
OriginAttributes on a content BrowsingContext after it has been attached, and JS
can never observe a detached BrowsingContext.

Users of this API are instead changed to perform assertions that
originAttributes have already been set correctly.

Differential Revision: https://phabricator.services.mozilla.com/D67046

--HG--
extra : moz-landing-system : lando
2020-04-07 21:39:14 +00:00
Bogdan Tara 40fdcf8307 Backed out 2 changesets (bug 1621726) for web platform test failures CLOSED TREE
Backed out changeset ebe18133a194 (bug 1621726)
Backed out changeset c43c38de33b2 (bug 1621726)
2020-04-06 22:03:02 +03:00
Bogdan Tara d623691c7b Bug 40545 - Fix prettier errors on browser_selectpopup.js and SelectChild.jsm CLOSED TREE 2020-04-06 21:32:59 +03:00
Emilio Cobos Álvarez ce71033ca1 Bug 40545 - Fix the empty-label attribute case in the select popup. r=chutten
And rename GetRenderLabel to GetRenderedLabel, as it's a slightly more
descriptive name IMHO.

Differential Revision: https://phabricator.services.mozilla.com/D69837

--HG--
extra : moz-landing-system : lando
2020-04-06 16:43:17 +00:00
Cosmin Sabou aefb5f9c88 Backed out 24 changesets (bug 1616353) for fission assertion failures nsGlobalWindowOuter.cpp.
Backed out changeset 3a43210e4900 (bug 1616353)
Backed out changeset cb77e9149cf8 (bug 1616353)
Backed out changeset 3aacc7cfe33f (bug 1616353)
Backed out changeset c026b06063a5 (bug 1616353)
Backed out changeset 580e790c5d17 (bug 1616353)
Backed out changeset 6f09bc1c476d (bug 1616353)
Backed out changeset 6955906262c0 (bug 1616353)
Backed out changeset a7700472807a (bug 1616353)
Backed out changeset a4735096e01b (bug 1616353)
Backed out changeset bd1706c57d91 (bug 1616353)
Backed out changeset 363c13296fda (bug 1616353)
Backed out changeset e414df387524 (bug 1616353)
Backed out changeset 765d3364cca0 (bug 1616353)
Backed out changeset 8a13355b4ac4 (bug 1616353)
Backed out changeset ada17fb8fca7 (bug 1616353)
Backed out changeset 6b6b99af186d (bug 1616353)
Backed out changeset ea966e78b296 (bug 1616353)
Backed out changeset cb88e0bbb3b9 (bug 1616353)
Backed out changeset f89a89015114 (bug 1616353)
Backed out changeset ae6058552969 (bug 1616353)
Backed out changeset f42bb5b48c1b (bug 1616353)
Backed out changeset 1ab9d22c73bb (bug 1616353)
Backed out changeset 2692c2c1396b (bug 1616353)
Backed out changeset 11a279c8da08 (bug 1616353)
2020-04-06 20:03:02 +03:00
Chris H-C 8b1032cdc9 Bug 40545 - Options to use label attribute when present r=emilio,jfkthame,mats
According to spec, option elements with label attributes should show and use
those labels rather than their element text. So let's do that.

Requires some trickery because the option element is a block element (so it
lays out its width based on its text content) so we put its label (if it has
one) in its ::before and skip frame generation so it measures the text of its
label, not of its text node children.

Differential Revision: https://phabricator.services.mozilla.com/D63545

--HG--
extra : moz-landing-system : lando
2020-04-06 16:06:36 +00:00
Nika Layzell b6d18805e0 Bug 1621726 - Part 1: Manage PWindowGlobal with PContent instead of PBrowser, r=farre
Previously, the PWindowGlobal actor was managed by the PBrowser which hosted it,
however this could cause issues when the tab containing the PWindowGlobal was
being destroyed. Due to the slightly different lifecycles of the PBrowser actor
and the nsGlobalWindowInner which the PWindowGlobal was trying to match the
lifetime of, the actor would sometimes not fire 'willDestroy' events correctly.

This patch moves PWindowGlobal to be directly managed by PContent, and changes
logic which previously used `Manager()` to get `Browser{Parent,Child}` to
instead use a pointer member.

Differential Revision: https://phabricator.services.mozilla.com/D68596

--HG--
extra : moz-landing-system : lando
2020-04-06 15:06:30 +00:00
Nika Layzell f0e314fa2a Bug 1616353 - Part 6.2: Remove setOriginAttributesBeforeLoading API, r=smaug
This API is no longer possible to implement, as it will always try to set the
OriginAttributes on a content BrowsingContext after it has been attached, and JS
can never observe a detached BrowsingContext.

Users of this API are instead changed to perform assertions that
originAttributes have already been set correctly.

Differential Revision: https://phabricator.services.mozilla.com/D67046

--HG--
extra : moz-landing-system : lando
2020-04-06 14:29:50 +00:00
Mike Conley 35c3f141c1 Bug 1624702 - Add a preference to control the minimum video length for displaying the Picture-in-Picture toggle. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D68822

--HG--
extra : moz-landing-system : lando
2020-04-02 19:30:44 +00:00
Gurzau Raul 7a19945570 Backed out changeset 813e1405e501 (bug 40545) for Android failures at test_bug659596.html on a CLOSED TREE. 2020-04-01 19:35:32 +03:00
Chris H-C faf5bd0c34 Bug 40545 - Options to use label attribute when present r=emilio,jfkthame,mats
According to spec, option elements with label attributes should show and use
those labels rather than their element text. So let's do that.

Requires some trickery because the option element is a block element (so it
lays out its width based on its text content) so we put its label (if it has
one) in its ::before and skip frame generation so it measures the text of its
label, not of its text node children.

Differential Revision: https://phabricator.services.mozilla.com/D63545

--HG--
extra : moz-landing-system : lando
2020-04-01 09:20:21 +00:00
Csoregi Natalia 7f39c4edfb Backed out changeset 9e1fba94da3a (bug 1621726) for bustages on WinHeaderOnlyUtils.h. CLOSED TREE
--HG--
extra : histedit_source : 475a57cb7d987f9ce3e1cf35e46292bc9b588a24
2020-04-01 00:05:16 +03:00
Nika Layzell 33e15617d3 Bug 1621726 - Manage PWindowGlobal with PContent instead of PBrowser, r=farre
Previously, the PWindowGlobal actor was managed by the PBrowser which hosted it,
however this could cause issues when the tab containing the PWindowGlobal was
being destroyed. Due to the slightly different lifecycles of the PBrowser actor
and the nsGlobalWindowInner which the PWindowGlobal was trying to match the
lifetime of, the actor would sometimes not fire 'willDestroy' events correctly.

This patch moves PWindowGlobal to be directly managed by PContent, and changes
logic which previously used `Manager()` to get `Browser{Parent,Child}` to
instead use a pointer member.

Differential Revision: https://phabricator.services.mozilla.com/D68596

--HG--
extra : moz-landing-system : lando
2020-03-31 17:47:51 +00:00
Tim Nguyen b7aa4f227f Bug 1625314 - Followup: fix eslint failure.
Differential Revision: https://phabricator.services.mozilla.com/D68924

--HG--
extra : moz-landing-system : lando
2020-03-30 22:37:00 +00:00
Tim Nguyen df1db34a36 Bug 1625314 - Followup: fix browser_selectpopup.js failures.
Differential Revision: https://phabricator.services.mozilla.com/D68923

--HG--
extra : moz-landing-system : lando
2020-03-30 22:35:05 +00:00
Ian Neal 40b642e225 Bug 1625776 - data.shouldWrap is unused in ViewSourceChild.jsm r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D68726

--HG--
extra : moz-landing-system : lando
2020-03-30 16:41:13 +00:00
Neil Deakin bfc0e32f89 Bug 1622998, fix reference to browser so that three-finger lookup works again, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D67218

--HG--
extra : moz-landing-system : lando
2020-03-18 20:55:18 +00:00
Matthew Noorenberghe 2b09202510 Bug 1619498 - Record in telemetry how long it takes to display an autocomplete popup. r=sfoster
For now only record for password manager autocomplete but the event structure is setup to support others.

Differential Revision: https://phabricator.services.mozilla.com/D66730

--HG--
extra : moz-landing-system : lando
2020-03-18 19:03:51 +00:00
Mike Conley 3d7fa66343 Bug 1622671 - Make the Picture-in-Picture player background colour solid black. r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D66907

--HG--
extra : moz-landing-system : lando
2020-03-16 14:41:15 +00:00
Bianca Danforth 95f41e25c5 Bug 1616356 - Record a telemetry event the first time password generation autocomplete is shown for a site r=MattN
* To ensure it is only recorded the first time for a site per session, the event is recorded in the parent process.
* To ensure it is recorded any time the option could be displayed in the popup, there is a check everywhere AutoCompleteResultView.setResults gets called, since the 'results' object represents the options presented in the autocomplete popup, including the password generation option.
  * AutoCompleteParent.showPopupWithResults
    * This covers the case when 'results' changes, and the popup is not currently open.
  * AutoCompleteParent.invalidate
    * This covers the case when 'results' changes, and the popup is already open.
* Also removed some dead code (an extraneous if/else block) in showPopupWithResults.

Differential Revision: https://phabricator.services.mozilla.com/D65407

--HG--
extra : moz-landing-system : lando
2020-03-13 21:09:07 +00:00
Neil Deakin 8d3992adb0 Bug 1558520, rework remote controller to use JSWindowActor instead of having the browser have a controller, r=smaug
When searching for the controller for a command in nsWindowRoot::GetControllerForCommand, look for a focused browsing context instead and get the controller through the Controllers actor associated with that browsing context. When a command update occurs in a window in the child process, send the list of commands to the parent process along with the browsing context for that window. The parent will pass this information to the controllers actor. As long as we can get the right currently focused browsing context descendant, we can get the correct command state and invoke commands through the right actor.

Differential Revision: https://phabricator.services.mozilla.com/D66222

--HG--
rename : toolkit/modules/RemoteController.jsm => toolkit/actors/ControllersParent.jsm
extra : moz-landing-system : lando
2020-03-12 16:47:57 +00:00
Bernard Igiri 2791a5ffc6 Bug 1607624 - Migrating UnselectedTabHover to use JSWindowActor r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D64388

--HG--
extra : moz-landing-system : lando
2020-03-06 17:29:03 +00:00
Alastor Wu 0936fc7520 Bug 1577890 - part6 : remove browser's methods which were used for android media control. r=baku
These methods were used for media control and audio focus on Fennec, and we don't need them anymore.

Differential Revision: https://phabricator.services.mozilla.com/D65262

--HG--
extra : moz-landing-system : lando
2020-03-05 06:15:33 +00:00
Gijs Kruitbosch c9e459715b Bug 1619630 - remove useless 'dispatcher' argument to various JSWindowActorChild constructors, r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D65126

--HG--
extra : moz-landing-system : lando
2020-03-03 18:40:25 +00:00
Jonathan Watt a6385396aa Bug 1606512. Have save-as-PDF default to using the document title as the file name. r=bobowen
This behavior was broken by bug 1601775.

Differential Revision: https://phabricator.services.mozilla.com/D64928

--HG--
extra : moz-landing-system : lando
2020-03-02 10:45:38 +00:00
Neil Deakin 6b03089559 Bug 1558323, move addSearchProvider implementation to use JSWindowActor, also helps reduce the extra code in MainProcessSingleton.jsm, r=adw
Differential Revision: https://phabricator.services.mozilla.com/D63534

--HG--
extra : moz-landing-system : lando
2020-02-27 16:30:58 +00:00
Kris Maglione f3354d4788 Bug 1617254: Rename BrowsingContext.getChildren() to .children. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D63699

--HG--
extra : moz-landing-system : lando
2020-02-25 22:33:53 +00:00
Arthur Iakab 73b6d9dca6 Backed out changeset 5616425b54da (bug 1617254)for casuing multiple browser-chrome failures.
CLOSED TREE
2020-02-26 00:09:34 +02:00
Kris Maglione c65ef42473 Bug 1617254: Rename BrowsingContext.getChildren() to .children. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D63699

--HG--
extra : moz-landing-system : lando
2020-02-25 21:03:58 +00:00
Noemi Erli 6b488deed0 Backed out changeset 034e2e79ecfa (bug 1617254) for causing build bustages CLOSED TREE 2020-02-25 21:59:14 +02:00
Kris Maglione e4c4115afb Bug 1617254: Rename BrowsingContext.getChildren() to .children. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D63699

--HG--
extra : moz-landing-system : lando
2020-02-25 19:39:25 +00:00
Karan Sapolia ef720de9fe Bug 1611634 - Picture-in-Picture keyboard shortcut should open currently playing video. r=jaws
If a page has multiple videos, PiP keyboard shortcut opens the currently playing video.
Opens the first video, if no video is playing.

Differential Revision: https://phabricator.services.mozilla.com/D63780

--HG--
extra : moz-landing-system : lando
2020-02-25 14:27:39 +00:00
Jonathan Watt 9bed859779 Bug 855889. Remove the print.use_global_printsettings pref. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D62754

--HG--
extra : moz-landing-system : lando
2020-02-14 02:59:45 +00:00
Gijs Kruitbosch 3a1283d7da Bug 1613069 - don't trip over null mousemove tasks when destroying PictureInPictureChild actors, r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D61551

--HG--
extra : moz-landing-system : lando
2020-02-06 17:32:28 +00:00
Brad Werth 67081368c7 Bug 1516413 Part 2: Make browser FullZoom act on the new zoom change events. r=mstange
This replaces the handling of the ZoomChangeUsingMouseWheel event with
2 new zoom events that trigger the actual zoom changes. As a side effect,
this allows the mousewheel and zoom in/out key events to have an effect
on Reader and PDFJS views as well.

Differential Revision: https://phabricator.services.mozilla.com/D59260

--HG--
extra : moz-landing-system : lando
2020-01-30 17:17:26 +00:00
Brian Grinstead 3d2d2d0ea7 Bug 1608281 - Automated rewrite away from reading properties on the global `this` in JSM files - round 1 r=mossop
This patch was generated with a script. It doesn't include all files:

- Files that use the preprocessor or fail to parse are skipped
- Files that are loaded as JSMs but don't use the .jsm extension are skipped (those will be renamed in Bug 1609269)

It was generated with the following command using d855222aa2/no-this-property-read.js:

```
hg revert --all &&
cp .gitignore .rgignore &&
rg --files-without-match -g '*.jsm' '^#endif|^#include|^#filter' | jscodeshift --stdin --transform ~/Code/jsm-rewrites/no-this-property-read.js --ignore-pattern ./mobile/android/modules/Sanitizer.jsm --ignore-pattern ./js/xpconnect/tests/unit/syntax_error.jsm &&
./mach eslint `hg st | rg '^M ' | sed 's/^M //'`
```

Differential Revision: https://phabricator.services.mozilla.com/D60187

--HG--
extra : moz-landing-system : lando
2020-01-29 21:50:04 +00:00
Gabriel Luong aa684c0c76 Bug 1602841 - Implement keystroke handling for PiP window for video controls. r=mconley
This implements keystroke handling behind a pref "media.videocontrols.picture-in-picture.keyboard-controls.enabled".
This patch handles all the keystrokes for video controls, which include play, pause,
volume decrease and increase, mute, unmute, seek forward and backward for 15 seconds
or by 10% of the max video duration, seek to beginning and seek to end.
This reuses the key handler logic from https://searchfox.org/mozilla-central/rev/cfd1cc461f1efe0d66c2fdc17c024a203d5a2fd8/toolkit/content/widgets/videocontrols.js#1687-1810.

Differential Revision: https://phabricator.services.mozilla.com/D60631

--HG--
extra : moz-landing-system : lando
2020-01-26 06:21:23 +00:00
Neil Deakin 0355257f83 Bug 1505915, move view source components to use JSWindowActor. This allows view frame source to work in out of process child frames, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D60253

--HG--
rename : toolkit/components/viewsource/content/viewSource-content.js => toolkit/actors/ViewSourceChild.jsm
rename : toolkit/components/viewsource/content/viewSource-content.js => toolkit/actors/ViewSourcePageChild.jsm
rename : toolkit/components/viewsource/ViewSourceBrowser.jsm => toolkit/actors/ViewSourcePageParent.jsm
extra : moz-landing-system : lando
2020-01-24 19:53:55 +00:00