Commit graph

5035 commits

Author SHA1 Message Date
Mark Banner
21253cfa1a Bug 1656220 - Implement recording attributions for search engines. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D87501
2020-08-20 09:06:59 +00:00
Emilio Cobos Álvarez
f04cda9679 Bug 1602410 - Make window.print() work with tab-modal printing. r=nika,geckoview-reviewers,agi
Do this by spinning the event loop until we've done the clone for
preview as appropriate.

This should be much less risky than finishing the previous patches
which would still be nice, but realistically landing them for 81 is not
going to happen.

This just returns without doing nothing in a couple cases, like when
there's already another modal dialog or such. That seems acceptable to
me, it's not clear what better way to do would be.

Differential Revision: https://phabricator.services.mozilla.com/D87484
2020-08-19 09:27:18 +00:00
Drew Willcoxon
4a6570ffd6 Bug 1659128 - Exit search mode as appropriate when input.setURI is called. r=harry
We need to exit search mode when a page loads in the current tab. We may need to
exit search mode for page loads in other tabs too: If you're in search mode,
click a slow link, switch tabs, and the page loads in the meantime, then search
mode should be not be entered when you switch back. I don't think we handle that
case correctly right now, and this patch doesn't address that at all. That's
worth doing in another bug because I think the fix will be different.

At first I added an `onLocationChange` method to UrlbarInput that was called by
`XULBrowserWindow.onLocationChange` in browser.js [1], just like we have an
`onLocationChange` in UrlbarProviderSearchTips called by
`XULBrowserWindow.onLocationChange`. But we need to potentially exit search mode
any time `input.setURI` is called. `setURI` happens to be called by
`XULBrowserWindow.onLocationChange`, one of the several places that calls it
[2].

`setURI` is also called when switching tabs. Bug 1647899 already took care of
handling search mode for tab switches, but it would be nice to handle all this
in one place. `setURI` is also how `userTypedValue` is restored in the input,
and of course `userTypedValue` is something we need to restore when switching
tabs, just like search mode. For these reasons I moved per-tab search mode
restoration to `setURI` as part of this.

I'm also changing the name of the second parameter in `setURI`. I wasn't sure
whether it's true iff we're switching tabs, so I tracked down why that param was
added. It was added in bug 1478348, and comment 21 confirms it was added to tell
`setURI` and `XULBrowserWindow.onLocationChange` when they're being called due
to a tab switch. To make this clearer, I renamed the param and added some
javadoc for `XULBrowserWindow.onLocationChange`.

[1] https://searchfox.org/mozilla-central/rev/50cb0892948fb4291b9a6b1b30122100ec7d4ef2/browser/base/content/browser.js#5205
[2] https://searchfox.org/mozilla-central/search?q=symbol:%23setURI&redirect=false

Differential Revision: https://phabricator.services.mozilla.com/D87172
2020-08-17 20:31:44 +00:00
pbz
1058f2522e Bug 1650795 - Implemented TabDialogBox to show chrome dialogs embedded on tab level. r=Gijs,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D83631
2020-08-17 10:26:22 +00:00
Bogdan Tara
f3e186366b Backed out 7 changesets (bug 1650795, bug 1651958) for test_master_password.html failures CLOSED TREE
Backed out changeset 4812945bfaf2 (bug 1651958)
Backed out changeset a3f28fadcdf3 (bug 1651958)
Backed out changeset 70a61c971427 (bug 1651958)
Backed out changeset e7194e7e7ecc (bug 1651958)
Backed out changeset 7e66e5431ef7 (bug 1651958)
Backed out changeset a6c58935e1d8 (bug 1650795)
Backed out changeset b79f254df4cb (bug 1650795)
2020-08-14 23:29:33 +03:00
pbz
509eea0b25 Bug 1650795 - Implemented TabDialogBox to show chrome dialogs embedded on tab level. r=Gijs,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D83631
2020-08-14 11:31:04 +00:00
Csoregi Natalia
eac68e26b0 Backed out 7 changesets (bug 1650795, bug 1651958) for failures on test_modal_prompts.html . CLOSED TREE
Backed out changeset 505f46d2cd97 (bug 1651958)
Backed out changeset f7893f4dc092 (bug 1651958)
Backed out changeset 54ea7a160e0d (bug 1651958)
Backed out changeset c2bc9c8d2e97 (bug 1651958)
Backed out changeset 247880941893 (bug 1651958)
Backed out changeset c8945eb14177 (bug 1650795)
Backed out changeset fc4dcfaf3938 (bug 1650795)
2020-08-14 00:02:08 +03:00
pbz
8c8b150bd2 Bug 1650795 - Implemented TabDialogBox to show chrome dialogs embedded on tab level. r=Gijs,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D83631
2020-08-13 18:43:49 +00:00
Xidorn Quan
ddf0b0df24 Bug 1623856 - Make shift-click reload button open a new window. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D86464
2020-08-12 14:56:50 +00:00
Valentin Gosu
e1f98ce23a Bug 1657582 - Add nsIDNSResolverInfo interface r=necko-reviewers,geckoview-reviewers,snorp,mixedpuppy,extension-reviewers,dragana
This patch adds the nsIDNSResolverInfo interface which is used to hold
information about the resolver to be used in a DNS resolution.

We use this to merge all of the *WithTRRServer resolve functions into one.
Passing a resolver info will use that object when appropriate. No resolver
info means that we default to using the system resolver, or the default TRR
resolver.

This patch also converts the RESOLVE_TYPE_* flags into a cenum and adds
the resolveType as a parameter to asyncResolve thus removing the need
to have asyncResolveByType methods.

Differential Revision: https://phabricator.services.mozilla.com/D86176
2020-08-12 08:25:14 +00:00
Bogdan Tara
694b77183c Backed out 2 changesets (bug 1657582) for test_DNSLookup.js failures CLOSED TREE
Backed out changeset 784122a5f5ab (bug 1657582)
Backed out changeset 0f17312b01ad (bug 1657582)
2020-08-12 11:18:06 +03:00
Valentin Gosu
fc1bf09e47 Bug 1657582 - Add nsIDNSResolverInfo interface r=necko-reviewers,geckoview-reviewers,snorp,mixedpuppy,extension-reviewers,dragana
This patch adds the nsIDNSResolverInfo interface which is used to hold
information about the resolver to be used in a DNS resolution.

We use this to merge all of the *WithTRRServer resolve functions into one.
Passing a resolver info will use that object when appropriate. No resolver
info means that we default to using the system resolver, or the default TRR
resolver.

This patch also converts the RESOLVE_TYPE_* flags into a cenum and adds
the resolveType as a parameter to asyncResolve thus removing the need
to have asyncResolveByType methods.

Differential Revision: https://phabricator.services.mozilla.com/D86176
2020-08-12 01:00:39 +00:00
Drew Willcoxon
075c66c124 Bug 1647889 - Show different Urlbar placeholder while visual indicator is showing. r=harry,fluent-reviewers,flod
This is the simplest possible way to fix this bug in the interest of landing
ASAP. It keeps a hardcoded list of engines that search the web.

Differential Revision: https://phabricator.services.mozilla.com/D86664
2020-08-12 00:25:58 +00:00
Kashav Madan
255b3f3ecb Bug 1566422 - Avoid unnecessary coordinate conversions when showing tooltips, r=emilio
We currently start with screen-relative coordinates, translate them to
widget-relative coordinates, and then translate them back to screen-relative
coordinates when actually showing the tooltip in XULBrowserWindow.showTooltip().
There's no reason for the extra conversions, so we can just send screen-relative
coordinates directly.

Since the widget origin for out-of-process frames is the origin of the frame
itself (instead of the tab, which is the case for in-process frames), the
screen-to-widget conversion was incorrect, and was causing a bug in how the
tooltip was being positioned. Avoiding that conversion altogether also fixes
that bug.

Differential Revision: https://phabricator.services.mozilla.com/D86750
2020-08-11 22:01:40 +00:00
julianwels
3e427e5423 Bug 1656027 - Added cached property 'isSecureContext' as an additional condition when the security UI should be updated. r=pbz
Differential Revision: https://phabricator.services.mozilla.com/D85327
2020-08-11 10:57:40 +00:00
Nika Layzell
c366c291b9 Bug 1589517 - Part 4: Remove sameProcessAsFrameLoader, r=zombie,mconley,farre,smacleod
The functionality has been fully subsumed by the new
initialBrowsingContextGroupId attribute, so it is no longer necessary.

Differential Revision: https://phabricator.services.mozilla.com/D85653
2020-08-06 17:01:13 +00:00
Nika Layzell
2f8013d4a9 Bug 1589517 - Part 2: Add initialBrowsingContextGroupId to sameProcessAsFrameLoader callers, r=mconley,smacleod
This attribute, when combined with the remoteType attribute, should subsume all
callers of sameProcessAsFrameLoader, and also support selecting the same process
as an out-of-process iframe.

Differential Revision: https://phabricator.services.mozilla.com/D85651
2020-08-06 17:01:08 +00:00
Harry Twyford
649526b7fe Bug 1647893 - Enter search mode with default engine on Accel+K. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D85914
2020-08-05 19:17:54 +00:00
Gijs Kruitbosch
2783349ab6 Bug 1645619 - stop using the default URL bar placeholder string after customize mode by using fluent all the time, r=Standard8,fluent-reviewers,flod
The original issue this patch addresses is what happens when exiting customize
mode: the reinsertion of the urlbar (customize mode wraps it in a container)
causes fluent to re-run as there's a DOM mutation, which causes the default
placeholder to be re-translated. This caused issues because we were using
.properties to translate the string that included the engine name, and
fluent for the "default" placeholder string.

This patch fixes the issue by always using fluent, and using a hardcoded
'unknown' placeholder to deal with the case where there is no known engine.

Differential Revision: https://phabricator.services.mozilla.com/D85769
2020-08-05 13:33:17 +00:00
Sebastian Streich
bf58055b03 Bug 1633710 - Move uri.spec calls to nsIPrincipal r=necko-reviewers,geckoview-reviewers,preferences-reviewers,ckerschb,ntim,snorp,valentin
Differential Revision: https://phabricator.services.mozilla.com/D82911
2020-08-04 11:10:41 +00:00
Noemi Erli
5cebe61c77 Backed out changeset 4ed7b13fb7a5 (bug 1633710) for causing failures in browser_amosigned_url.js CLOSED TREE 2020-07-29 22:34:42 +03:00
Sebastian Streich
ea482d8e73 Bug 1633710 - Move uri.spec calls to nsIPrincipal r=necko-reviewers,geckoview-reviewers,preferences-reviewers,ckerschb,ntim,snorp,valentin
Differential Revision: https://phabricator.services.mozilla.com/D82911
2020-07-29 17:33:10 +00:00
Sebastian Streich
fb1d1dc1df Bug 1558394 - Pass the TriggeringSandboxFlags to nsILoadinfo r=ckerschb,smaug,necko-reviewers,valentin
Add triggering Sandbox flags to loadinfo
***
Pass triggering Flags into Loadinfo

***
Fix triggeringSandboxflags passing

Differential Revision: https://phabricator.services.mozilla.com/D69588
2020-07-29 11:43:23 +00:00
Drew Willcoxon
99378dda74 Bug 1654439 - Part 1: Move search-one-offs.js into a jsm, add UrlbarSearchOneOffs.jsm. r=harry
This moves search-one-offs.js into a jsm without making any substantive changes,
adds a new subclass in UrlbarSearchOneOffs.jsm, and uses `UrlbarSearchOneOffs`
in `UrlbarView` instead of the base `SearchOneOffs` class. `UrlbarSearchOneOffs`
will be fleshed out in part 2.

Differential Revision: https://phabricator.services.mozilla.com/D84784
2020-07-28 02:54:37 +00:00
Narcis Beleuzu
d2ab5ee1a5 Backed out 2 changesets (bug 1654439) for lint failure on SearchOneOffs.jsm . CLOSED TREE
Backed out changeset c03e14b7c430 (bug 1654439)
Backed out changeset 51b575b0d605 (bug 1654439)
2020-07-28 03:35:15 +03:00
Drew Willcoxon
97c020d1fc Bug 1654439 - Part 1: Move search-one-offs.js into a jsm, add UrlbarSearchOneOffs.jsm. r=harry
This moves search-one-offs.js into a jsm without making any substantive changes,
adds a new subclass in UrlbarSearchOneOffs.jsm, and uses `UrlbarSearchOneOffs`
in `UrlbarView` instead of the base `SearchOneOffs` class. `UrlbarSearchOneOffs`
will be fleshed out in part 2.

Differential Revision: https://phabricator.services.mozilla.com/D84784
2020-07-27 14:55:41 +00:00
harsh
371e10380d Bug 1640665 - Use inBackground parameter of duplicateTab in duplicateTabIn. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D84236
2020-07-23 17:52:09 +00:00
Emma Malysz
fbe0b5e6ba Bug 1648637, remove fxa panel from main view and place in template r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D81637
2020-07-17 20:17:32 +00:00
Dimi Lee
0ad0e5b18c Bug 1628305 - Fallback to use host or spec when failing to get base domain in SafeBrowsingNotificationBox r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D82492
2020-07-14 06:59:18 +00:00
Sebastian Streich
38264715e9 Bug 1633710 - Move js uri.host to principal r=ckerschb,preferences-reviewers,ntim
Differential Revision: https://phabricator.services.mozilla.com/D73242
2020-07-13 18:35:01 +00:00
Kris Maglione
9d78661f88 Bug 1649221: Update ChromeUtils.generateQI callers to pass strings. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,preferences-reviewers,agi,whimboo,Bebe,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D81594
2020-07-10 23:58:28 +00:00
Emma Malysz
cb57528ee2 Bug 1648640, remove character encoding panel view, panic view, SSB view, more view, and what's new panel view from main panel and place in template r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D81621
2020-07-09 00:35:30 +00:00
Matt Woodrow
17fbf88433 Bug 1649879 - Handle URIFixup that happens on a failed channel in DocumentLoadListener if available, rather than waiting for it to reach nsDocShell. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D81947
2020-07-08 23:38:22 +00:00
Matt Woodrow
8575748f00 Bug 1649879 - Remove URIFixupChild. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D81946
2020-07-08 23:37:59 +00:00
Kris Maglione
bd94db4e9a Bug 1580764: Part 2 - Use BrowsingContext IDs rather than window IDs to compute frame IDs. r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D82464
2020-07-07 21:37:53 +00:00
Dorel Luca
3e761e3907 Backed out changeset 255d9078dd17 (bug 1633710) for Browser-chrome failures in extensions/test/xpinstall/browser_datauri.js. CLOSED TREE 2020-07-06 18:38:13 +03:00
Sebastian Streich
95212989d4 Bug 1633710 - Move js uri.host to principal r=ckerschb,preferences-reviewers,ntim
Differential Revision: https://phabricator.services.mozilla.com/D73242
2020-07-06 14:00:09 +00:00
Coroiu Cristina
057efa89c8 Backed out 5 changesets (bug 1649879) for browser-chrome failures at browser/base/content/test/tabs/browser_progress_keyword_search_handling.js
Backed out changeset f9670eed4ac5 (bug 1649879)
Backed out changeset 76ab8adad34b (bug 1649879)
Backed out changeset 6dc2e9474f43 (bug 1649879)
Backed out changeset 6f905d33681f (bug 1649879)
Backed out changeset 13b19e14a332 (bug 1649879)
2020-07-06 10:44:56 +03:00
Matt Woodrow
1ef58514bd Bug 1649879 - Handle URIFixup that happens on a failed channel in DocumentLoadListener if available, rather than waiting for it to reach nsDocShell. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D81947
2020-07-06 04:29:33 +00:00
Matt Woodrow
d234fdfda8 Bug 1649879 - Remove URIFixupChild. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D81946
2020-07-06 04:29:16 +00:00
Dorel Luca
1e4fff31e4 Backed out changeset 2c46bcd325bb (bug 1633710) for Browser-chrome failures in extensions/test/xpinstall/browser_datauri.js. CLOSED TREE 2020-07-01 18:12:19 +03:00
Sebastian Streich
51a16a3ad7 Bug 1633710 - Move js uri.host to principal r=ckerschb,preferences-reviewers,ntim
Differential Revision: https://phabricator.services.mozilla.com/D73242
2020-07-01 12:21:22 +00:00
Drew Willcoxon
8cf8a6212d Bug 1646086 - Improve UrlbarProviderSearchTips's impact on ts_paint. r=mak
ts_paint depends on the first MozAfterPaint in the content window, not in the
browser as I had thought. After MozAfterPaint, it pings the parent process and
waits for a response (see `TalosPowers.loadPromise`), and then it ends. It will
wait up to 500ms for the response before timing out. Source:
https://dxr.mozilla.org/mozilla-central/source/testing/talos/talos/startup_test/tspaint_test.html

At first I modified UrlbarProviderSearchTips to wait on
`browser-delayed-startup-finished`, but the jsm kept appearing in ts_paint
profiles, and that's how I found out the above. So that's not sufficient.

There's already a promise in browser.js for waiting on the first paint in the
first content window, but it's "private." I added a public getter for it and
changed the name so it's clearer that it's related to the first content window,
not the browser window.

I also added a 500ms timeout just like the worst case in ts_paint.

Both checks (paint and the timeout) are done for a particular browser window
only the first time UrlbarProviderSearchTips sees it.

Finally, UrlbarProviderSearchTips can avoid importing BrowserWindowTracker
during startup by having browser.js pass the window to its `onLocationChange`. I
saw the BrowserWindowTracker.jsm import in some profiles while working on this.

With these changes, UrlbarProviderSearchTips no longer appears in ts_paint
profiles when I run it locally -- except when it is imported by
UrlbarProvidersManager, which ultimately happens due to setting the placeholder
text in the urlbar input. But even that doesn't appear in every profile.

I've also included the reordering of checks from a previous version of this
patch. That's still worth doing in general even if it's no longer relevant to
ts_paint.

Differential Revision: https://phabricator.services.mozilla.com/D80799
2020-06-29 21:28:07 +00:00
Gijs Kruitbosch
fca766666b Bug 1646780 - use a template to wrap the identity popup while it's not needed, r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D78894
2020-06-23 14:04:49 +00:00
Dorel Luca
d4c820fa0f Backed out changeset 3671a57712e4 (bug 1646780) for Browser-chrome failures in webrtc/browser_devices_get_user_media_tear_off_tab.js 2020-06-19 04:22:23 +03:00
Gijs Kruitbosch
f457ccd655 Bug 1646780 - use a template to wrap the identity popup while it's not needed, r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D78894
2020-06-19 00:02:11 +00:00
Kris Maglione
3bda67deab Bug 1638153: Part 2 - Fix uses of .rootTreeItem to get top browser window. r=geckoview-reviewers,nika,snorp
Differential Revision: https://phabricator.services.mozilla.com/D75429
2020-06-17 17:17:16 +00:00
Dave Townsend
e07f989e6c Bug 1620358: Gather telemetry on toolbar state. r=Gijs,zombie
Differential Revision: https://phabricator.services.mozilla.com/D78393
2020-06-16 21:06:15 +00:00
Nika Layzell
cde53b3bec Bug 1508306 - Part 1: Migate the Large-Allocation handler to DocumentLoadListener, r=mattwoodrow,necko-reviewers,geckoview-reviewers,agi,valentin
This removes the diagnostic warnings which used to be logged when the
Large-Allocation header was present, but failed to switch into a
Large-Allocation process. Due to the low adoption of the header, this shouldn't
be too large of a problem, but we can look into re-adding the diagnostics if
needed in the future.

The new codepath no longer performs multiple network requests for
Large-Allocation resources, and now relies on the battle-tested
DocumentLoadListener codepath for process switching.

Differential Revision: https://phabricator.services.mozilla.com/D78998
2020-06-15 23:24:07 +00:00
Nika Layzell
c867d0930c Bug 1640019 - Part 7: Remove the unused 'navigateAndRestoreByIndex' method, r=Gijs
This method was used by GroupedSHistory for prerendering, and was missed when we
ripped out the incomplete code.

Differential Revision: https://phabricator.services.mozilla.com/D78975
2020-06-15 23:24:02 +00:00