Commit Graph

3849 Commits

Author SHA1 Message Date
Mark Banner
ffb4b2b3fc Bug 1885723 - Fix more jsm references in browser/. r=Gijs,credential-management-reviewers,omc-reviewers,aminomancer,mtigley
Differential Revision: https://phabricator.services.mozilla.com/D204843
2024-03-19 22:08:29 +00:00
Emilio Cobos Álvarez
1c20c25eda Bug 232598 - Return null for unset attributes in XUL. r=smaug,devtools-reviewers,omc-reviewers,zombie,nchevobbe,settings-reviewers,application-update-reviewers,credential-management-reviewers,mossop,aminomancer,bytesized,issammani,sessionstore-reviewers,dao
I just got bit by this in bug 1873833, let's just fix it. There isn't
all that much stuff depending on it anymore.

Differential Revision: https://phabricator.services.mozilla.com/D204496
2024-03-18 09:15:07 +00:00
Mark Banner
d534b7b6ee Bug 1885041 - Expand disallowing JSM based imports via ESLint to everything except for devtools. r=arai,omc-reviewers,aminomancer,zombie
Differential Revision: https://phabricator.services.mozilla.com/D204441
2024-03-13 17:38:28 +00:00
Mark Banner
f65518c3c0 Bug 1882577 - Make nsISearchEngine.getIconURL an async function. r=search-reviewers,extension-reviewers,settings-reviewers,robwu,mcheang,mak
Differential Revision: https://phabricator.services.mozilla.com/D203026
2024-03-13 14:51:06 +00:00
mcheang
e86c953b7b Bug 1870685 - Ensure mochi browser chrome tests pass with search-config-v2 enabled. r=Standard8
Depends on D202637

Differential Revision: https://phabricator.services.mozilla.com/D204133
2024-03-11 17:07:13 +00:00
mcheang
3ccb2b1975 Bug 1870685 - Ensure tests outside of search pass with the new search configuration enabled. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D202637
2024-03-11 17:07:12 +00:00
Dave Townsend
8ca92a1c30 Bug 1864896: Autofix unused function arguments (webextensions). r=extension-reviewers,zombie
Differential Revision: https://phabricator.services.mozilla.com/D202999
2024-03-05 14:21:14 +00:00
Luca Greco
27c3c699df Bug 1881055 - Remove use of PromptParent.openContentPrompt for handling prompts originated from extensions options page embedded in about:addons. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D202237
2024-03-05 10:51:22 +00:00
Joel Maher
3125839a90 Bug 1881925 - standardize on more manifest conditions. r=aryx,credential-management-reviewers,devtools-reviewers,dom-storage-reviewers,omc-reviewers,nchevobbe,janv,issammani
Differential Revision: https://phabricator.services.mozilla.com/D202663
2024-03-05 02:14:17 +00:00
Sandor Molnar
844d642130 Backed out 2 changesets (bug 1881055) for causing bc failures @ toolkit/mozapps/extensions/test/browser/browser_html_options_ui.js CLOSED TREE
Backed out changeset 34d8664ec96a (bug 1881055)
Backed out changeset bdd79dc5ecab (bug 1881055)
2024-03-04 18:15:32 +02:00
Luca Greco
b8bb74b055 Bug 1881055 - Remove use of PromptParent.openContentPrompt for handling prompts originated from extensions options page embedded in about:addons. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D202237
2024-03-04 15:03:35 +00:00
Cristian Tuns
7a00471ac3 Backed out changeset 4099afcff2be (bug 1881925) for causing gecko decision task failures in browser.toml CLOSED TREE 2024-02-29 16:49:46 -05:00
Joel Maher
e325923409 Bug 1881925 - standardize on more manifest conditions. r=aryx,credential-management-reviewers,devtools-reviewers,dom-storage-reviewers,omc-reviewers,nchevobbe,janv,issammani
Differential Revision: https://phabricator.services.mozilla.com/D202663
2024-02-29 21:25:17 +00:00
Gregory Pappas
9bd4fc9c87 Bug 1878401 - part 7 - Pass BrowsingContext to nsIFilePicker::Init in tests r=extension-reviewers,settings-reviewers,credential-management-reviewers,anti-tracking-reviewers,devtools-reviewers,sgalich,pbz,nchevobbe,zombie,migration-reviewers,mconley
Depends on D200551

Differential Revision: https://phabricator.services.mozilla.com/D200552
2024-02-28 21:29:39 +00:00
Gregory Pappas
c1ec40f95a Bug 1878401 - part 2 - Update nsIFilePicker users in browser/ to pass BrowsingContext to init r=extension-reviewers,settings-reviewers,credential-management-reviewers,Gijs,sgalich,migration-reviewers,mconley,robwu
Depends on D200546

Differential Revision: https://phabricator.services.mozilla.com/D200547
2024-02-28 21:29:37 +00:00
Sandor Molnar
c853f2f3e9 Backed out 8 changesets (bug 1878401, bug 1879041) for causing build bustages on widget/nsBaseFilePicker.cpp CLOSED TREE
Backed out changeset 2e2b8df3bdd6 (bug 1879041)
Backed out changeset 6d6952f9df2c (bug 1878401)
Backed out changeset 30b5bb590d3e (bug 1878401)
Backed out changeset 9a4b830334b9 (bug 1878401)
Backed out changeset 3c3d67f1fcb7 (bug 1878401)
Backed out changeset c83ba4026822 (bug 1878401)
Backed out changeset 6bcb670ce475 (bug 1878401)
Backed out changeset f263b196df96 (bug 1878401)
2024-02-28 17:56:48 +02:00
Gregory Pappas
55e30a8b92 Bug 1878401 - part 7 - Pass BrowsingContext to nsIFilePicker::Init in tests r=extension-reviewers,settings-reviewers,credential-management-reviewers,anti-tracking-reviewers,devtools-reviewers,sgalich,pbz,nchevobbe,zombie,migration-reviewers,mconley
Depends on D200551

Differential Revision: https://phabricator.services.mozilla.com/D200552
2024-02-28 15:07:46 +00:00
Gregory Pappas
0428704119 Bug 1878401 - part 2 - Update nsIFilePicker users in browser/ to pass BrowsingContext to init r=extension-reviewers,settings-reviewers,credential-management-reviewers,Gijs,sgalich,migration-reviewers,mconley,robwu
Depends on D200546

Differential Revision: https://phabricator.services.mozilla.com/D200547
2024-02-28 15:07:44 +00:00
mcheang
e5231f8e93 Bug 1870684 - Ensure test that are using custom engine configs and manifest data from data directory are passing for search-config-v2. r=Standard8,extension-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D201938
2024-02-23 01:38:28 +00:00
Karandeep
a8d7931353 Bug 1878264 - Remove ext-urlbar.js once condprof profiles are regenerated. r=mak,extension-reviewers,robwu
Differential Revision: https://phabricator.services.mozilla.com/D200443
2024-02-13 16:44:12 +00:00
Emilio Cobos Álvarez
5a714b595c Bug 1875100 - Propagate top level activeness automatically to top descendants. r=nika,tabbrowser-reviewers,mconley,extension-reviewers,robwu,geckoview-reviewers,owlish,kaya
For that, opt in tabbrowser and the shopping sidebar to manual
activeness management.

Differential Revision: https://phabricator.services.mozilla.com/D198942
2024-02-07 10:58:15 +00:00
Cristian Tuns
77579088f3 Backed out changeset ecd780688279 (bug 1875100) for causing mochitest failures in test_suspend_media_by_inactive_docshell.html 2024-02-07 01:25:21 -05:00
Emilio Cobos Álvarez
a6a14d3ed6 Bug 1875100 - Propagate top level activeness automatically to top descendants. r=nika,tabbrowser-reviewers,mconley,extension-reviewers,robwu,geckoview-reviewers,owlish
For that, opt in tabbrowser and the shopping sidebar to manual
activeness management.

Differential Revision: https://phabricator.services.mozilla.com/D198942
2024-02-06 21:47:37 +00:00
Karandeep
c394e93376 Bug 1855958 - Remove the experimental urlbar API (first patch). r=mak,extension-reviewers,desktop-theme-reviewers,robwu
ext-urlbar.js is unused but will be removed in a separate
patch to avoid test failures in condprof tests. Condprof tests may use
an outdated profile directory that still references ext-urlbar.js in
startupcache files, which triggers a test-only test failure in
mozilla::net::CheckForBrokenChromeURL.

Differential Revision: https://phabricator.services.mozilla.com/D199769
2024-02-05 17:04:37 +00:00
Tomislav Jovanovic
fa3ce61585 Bug 1878081 - Drop per-file license header comments from schema files, r=willdurand,geckoview-reviewers,extension-reviewers,m_kato
* Make schema files directly parsable as valid JSON, consumable by JSONSchema
  tools (like addons-linter).
* Clarify, simplify and unify licensing information across all repositories
  and places we use the schemas.

Differential Revision: https://phabricator.services.mozilla.com/D200357
2024-02-02 15:28:20 +00:00
Mike Conley
c32f498889 Bug 1876104 - Convert ShortURL.jsm to an ESM. r=amy,rpl
Differential Revision: https://phabricator.services.mozilla.com/D199420
2024-02-02 00:53:19 +00:00
Dave Vandyke
bea6e1365e Bug 1861445 - Add the runtime.onPerformanceWarning WebExtension event r=zombie,robwu
When an extension's content script is very slow and causes a webpage
to hang noticeably, a warning banner is displayed to the user. It
would be useful to also notify the extension developer when that
happens, so that they can address the issue.

Let's add a new event runtime.onPerformanceWarning that can be
dispatched when the browser needs to warn an extension of runtime
performance issues. For now, let's just dispatch that event when the
slow extension warning banner is displayed to the user.

See also https://github.com/w3c/webextensions/issues/456

Differential Revision: https://phabricator.services.mozilla.com/D194708
2024-01-29 10:32:09 +00:00
Joel Maher
3662d84cd4 Bug 1873732 - remove outdated manifest conditions and use consistent conditions. r=aryx,necko-reviewers,jgilbert,settings-reviewers,credential-management-reviewers,devtools-reviewers,sessionstore-reviewers,dom-storage-reviewers,sgalich,kershaw,nchevobbe,janv,dao
Differential Revision: https://phabricator.services.mozilla.com/D198082
2024-01-25 00:27:05 +00:00
Stanca Serban
71d0d5cf96 Backed out changeset 54462970f797 (bug 1873732) for causing web platform tests failures. 2024-01-24 21:08:19 +02:00
Gijs Kruitbosch
532c3bc439 Bug 1780071 - autofix browser/ violations of no-comparison-or-assignment-inside-ok, r=Standard8,webcompat-reviewers,extension-reviewers,settings-reviewers,credential-management-reviewers,fxview-reviewers,sessionstore-reviewers,places-reviewers,sgalich,dao,twisniewski,mconley,sclements
Differential Revision: https://phabricator.services.mozilla.com/D198974
2024-01-24 17:03:13 +00:00
Joel Maher
04ec786571 Bug 1873732 - remove outdated manifest conditions and use consistent conditions. r=aryx,necko-reviewers,jgilbert,settings-reviewers,credential-management-reviewers,devtools-reviewers,sessionstore-reviewers,dom-storage-reviewers,sgalich,kershaw,nchevobbe,janv,dao
Differential Revision: https://phabricator.services.mozilla.com/D198082
2024-01-24 16:35:54 +00:00
Masayuki Nakano
a8de59b6d4 Bug 1864654 - Make PresShell flush pending synthetic mousemove before dispatching mousedown or mouseup r=smaug,dom-core,extension-reviewers,edgar,robwu
`inert-iframe-hittest.html` expects that `:hover` state should be updated
immediately after a pointer down.  The state is updated by
`EventStateManager::NotifyMouseOver` [1] when we received a real or synthetic
`eMouseMove`.  Therefore, the hover state may have not set yet if no refresh
occurs between the pointer down and checking the result.

Additionally, some WPT for UI Events and Pointer Events expect that `mouseover`
or `mouseout` should be fired before `mouseup`/`pointerup` if a preceding
`mousedown` or `pointerdown` event listener removes the target.  So, this
patch may fix intermittent failures of them if there are.

Therefore, we should flush pending synthetic `mousemove` event for keeping the
event order as same as they happen.  However, simply flushing it causes
unexpected pointer capture state change because
`PointerEventHandler::ProcessPointerCaptureForMouse` handles synthetic
`mousemove` but it should not cause pointer boundary events at the moment (the
pointer boundary events should be fired when the pointer is actually moved, note
that this is different rule from the rules of mouse boundary events).
Therefore, this patch changes
`PointerEventHandler::ShouldGeneratePointerEventFromMouse`.

However, this blocks `lostpointercatpure` event when the capturing content has
already been removed from the DOM tree.  The path is,
`EventHandler::HandleEventWithPointerCapturingContentWithoutItsFrame` stops
dispatching `pointerup` nor `pointercancel` in this case, but
`EventStateManager::PostHandleEvent` is the only handler of implicit pointer
capture release.  Therefore, we need to make it dispatch lostpointercatpure`
event if the canceling event caused `ePointerUp` or `ePointerCancel`.

Finally, this patch fixes a bug of `browser_ext_browserAction_popup_preload.js`.
It tests the pre-loading which starts when `mouseover` before `mousedown` on a
widget.  However, it does not correctly emulate the user input.
* Synthesizing only `mouseover` does not update the internal pointer info and
does not cause dispatching related events.
* Synthesizing `mousedown` without `mousemove` cause `mouseover` before
`mouseup` because at dispatching `mousedown`, `PresShell` stores the cursor [2]
and the mouse boundary events will be dispatched before `mouseup`.

`ext-browserAction.js` assumes the events are fired as this order,
`mouseover` -> `mousedown` -> `mouseup`, but this would not work if the
preceding `mousemove` of `mousedown` is not correctly fired.  I'm not sure
whether `mousemove` is always fired before `mousedown` on any environments,
but it should be rare and it affects only this kind of tricky code.  For now,
fixing this in the test side must be enough.

1. https://searchfox.org/mozilla-central/rev/9a5bf21ea2dd04946734658f67f83f62ca76b0fa/dom/events/EventStateManager.cpp#4874,4913-4914
2. https://searchfox.org/mozilla-central/rev/9a5bf21ea2dd04946734658f67f83f62ca76b0fa/layout/base/PresShell.cpp#6756

Differential Revision: https://phabricator.services.mozilla.com/D193870
2024-01-24 11:07:34 +00:00
Rob Wu
ac7632657a Bug 1874232 - Simplify platform-conditional extension css r=rpl,desktop-theme-reviewers,emilio
Merge (browser_style) extension-mac.css with extension.css and use
-moz-platform media query for conditional CSS.

Replace extension-{mac,linux,win}-panel.css with one CSS file, without
platform-specific conditions since their content were already identical.

Simplified JS code referencing these CSS files: Instead of lazy getters
("extensionStylesheets") exported and imported across modules, use plain
string constants for simplicity. The extension.css file is not expected
to be used in new code since it is a deprecated feature, and the string
is sufficiently unique to be easily findable through code search.

Differential Revision: https://phabricator.services.mozilla.com/D198312
2024-01-22 17:19:51 +00:00
Rob Wu
3b4a42c169 Bug 1873024 - Move browser_style sheets to layered author sheet r=rpl,desktop-theme-reviewers,emilio
The `browser.display.document_color_use` is an a11y feature to allow
users to override colors. This feature does not work for UA stylesheets
and results in the reported bug.

To resolve the bug, this patch changes browser_style to be added as an
AUTHOR_SHEET instead of AGENT_SHEET. To avoid backwards-compatibility
issues, the patch also wraps the stylesheet content in a @layer to
ensure that all rules have a lower precedence than any (unlayered)
extension stylesheet.

The `browser.display.document_color_use` pref is also controlled
through the `browserSettings.overrideDocumentColors` extension API.
For extra test coverage, this patch sets the pref with that API
instead of setting the prefs directly.

Differential Revision: https://phabricator.services.mozilla.com/D198117
2024-01-22 17:19:51 +00:00
Erik Nordin
5bb63471e3 Bug 1875090 - Rename BrowserTestUtils.is_visible() to isVisible() r=Gijs,settings-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,translations-reviewers,sgalich,bytesized,sfoster
Renames all instances of the snake_case identifier to
camelCase to match more closely to idiomatic JavaScript
and to existing conventions throughout the code base.

Differential Revision: https://phabricator.services.mozilla.com/D198826
2024-01-19 02:15:33 +00:00
Erik Nordin
857bffe429 Bug 1875090 - Rename BrowserTestUtils.is_hidden() to isHidden() r=Gijs,settings-reviewers,pip-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,translations-reviewers,sgalich,mhowell
Renames all instances of the snake_case identifier to
camelCase to match more closely to idiomatic JavaScript
and to existing conventions throughout the code base.

Differential Revision: https://phabricator.services.mozilla.com/D198825
2024-01-19 02:15:33 +00:00
mcheang
4ffcfc6cbc Bug 1667639 - Make keyword at the start of the string take precedence over restrict symbols at the end of the string. r=mak
This patch modifies PlacesUtils to cache the keywords and adds functionality to
find a keyword. The Tokenizer calls PlacesUtils to know if the first word
is a keyword and if the first word is a keyword, then the rest of the search
string will be treated as text and Tokenizer won't filter any other restrict
symbols.

Differential Revision: https://phabricator.services.mozilla.com/D198208
2024-01-19 01:13:39 +00:00
Mark Banner
b350124d0a Bug 1873158 - Update ESLint related modules to their latest versions. r=mossop,aminomancer,devtools-reviewers,reusable-components-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D197765
2024-01-05 19:52:08 +00:00
Mark Banner
a03d040295 Bug 1864821 - Replace PromiseUtils.defer() with Promise.withResolvers() in extension code. r=extension-reviewers,geckoview-reviewers,rpl,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D197488
2024-01-05 09:22:34 +00:00
Mark Banner
82e3203f19 Bug 1864821 - Replace PromiseUtils.defer() with Promise.withResolvers() in browser window scopes. r=Gijs,extension-reviewers,application-update-reviewers,rpl,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D197486
2024-01-05 09:22:33 +00:00
Natalia Csoregi
7e50020a7c Backed out changeset 199b3c24b8b4 (bug 1861445) for causing failures on browser_ext_slow_script.js CLOSED TREE 2024-01-04 07:53:21 +02:00
Dave Vandyke
7d758be5d2 Bug 1861445 - Add the runtime.onPerformanceWarning WebExtension event r=zombie
When an extension's content script is very slow and causes a webpage
to hang noticeably, a warning banner is displayed to the user. It
would be useful to also notify the extension developer when that
happens, so that they can address the issue.

Let's add a new event runtime.onPerformanceWarning that can be
dispatched when the browser needs to warn an extension of runtime
performance issues. For now, let's just dispatch that event when the
slow extension warning banner is displayed to the user.

See also https://github.com/w3c/webextensions/issues/456

Differential Revision: https://phabricator.services.mozilla.com/D194708
2024-01-04 04:18:27 +00:00
Emilio Cobos Álvarez
e18e50f76f Bug 1871023 - Trivially fix some orange.
MANUAL PUSH: Trivial orange fix CLOSED TREE
2023-12-21 11:16:20 +01:00
Mark Banner
0d18781645 Bug 1870644 - Remove nsISearchEngine.iconURI and replace by the new getIconURL function. r=search-reviewers,extension-reviewers,settings-reviewers,mconley,mcheang,robwu
Differential Revision: https://phabricator.services.mozilla.com/D196734
2023-12-20 13:28:24 +00:00
Mark Banner
742520b2f6 Bug 1870644 - Pass a preferred width rather than width and height when getting search engine icon urls. r=search-reviewers,mcheang
This also renames the function, in preparation for iconURI being merged into it.

Differential Revision: https://phabricator.services.mozilla.com/D196733
2023-12-20 13:28:24 +00:00
Mark Banner
6b3f126991 Bug 1870644 - Remove nsISearchEngine.getIcons as it is only used by tests and not necessary. r=search-reviewers,mcheang
The tests are able to use getting the icon by size for their own checks.

Differential Revision: https://phabricator.services.mozilla.com/D196732
2023-12-20 13:28:24 +00:00
Emilio Cobos Álvarez
b4cd91ba9a Bug 1870803 - Fix theme tests to ignore a potentially ongoing transition. r=desktop-theme-reviewers,extension-reviewers,dao,rpl
Depends on D196861

Differential Revision: https://phabricator.services.mozilla.com/D196865
2023-12-19 20:18:39 +00:00
Emilio Cobos Álvarez
df2c70f3e6 Bug 1870803 - Remove backgroundColorSetOnRoot from theming tests. r=desktop-theme-reviewers,dao
Win7/8 isn't supported anymore.

Differential Revision: https://phabricator.services.mozilla.com/D196861
2023-12-19 17:42:48 +00:00
DJ
666a6f0a08 Bug 1869385 - open windows synchronously in extension tests to prevent race. r=extension-reviewers,mconley,rpl
Differential Revision: https://phabricator.services.mozilla.com/D196600
2023-12-18 17:46:47 +00:00
Mark Banner
9591aa584c Bug 1868114 - Drop schema support for chrome_settings_overrides.searchProvider.params in Manifest v3. r=extension-reviewers,robwu
Differential Revision: https://phabricator.services.mozilla.com/D195775
2023-12-07 21:12:22 +00:00