Commit Graph

3866 Commits

Author SHA1 Message Date
Rob Wu
8127bd5824 Bug 1888866 - Improve dark theme support in options_ui r=willdurand,desktop-theme-reviewers,emilio
This patch changes the behavior for extensions with an embedded
options_ui page (open_in_tab not false), that have specified the
"dark" value in the "color-scheme" meta tag or CSS property, AND
with the user having indicated the preference for dark theme support.
There are no changes when any of these conditions have not been met.

The "color-scheme" CSS property is the standard way for extensions (web
pages in general) to opt in to automatic dark theme support, e.g. by
changing the foreground color to white. Prior this patch, the
background was unconditionally white, which resulted in unreadable text
when the dark theme is enabled. This patch changes the default
background color to "Canvas", which is a special keyword that is dark
theme-aware (almost black - `rgb(28, 27, 34)` by default).

When `browser_style:true` is used (which is the default in MV2),
extension.css is activated, which unconditionally specifies a black
foreground color. To avoid a poor contrast with the new theme-dependent
background color, the color is now white when the dark theme is enabled.

This patch includes comprehensive test coverage, but the only tests
whose behavior changed by this patch are:
- options_ui_dark (background changed)
- options_ui_browser_style_true_dark (color, background changed)

Differential Revision: https://phabricator.services.mozilla.com/D207540
2024-04-17 16:28:44 +00:00
Rob Wu
d3a8ef9d57 Bug 1847216 - Ensure that tab.isArticle is true before toggleReaderMode r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D207707
2024-04-17 16:24:33 +00:00
Rob Wu
a8ab849a6f Bug 1891954 - Fix intermittent failure in browser_ext_menus_targetElement.js r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D207703
2024-04-17 16:24:30 +00:00
William Durand
a3e269ecdd Bug 1797811 - Fallback to _execute_browser_action on MV3. r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D207454
2024-04-17 12:21:17 +00:00
Yi Xiong Wong
03a2372d77 Bug 1880914 - Move BrowserOpenAddonsMgr. r=Gijs,extension-reviewers,settings-reviewers,firefox-desktop-core-reviewers ,home-newtab-reviewers,robwu,thecount
Differential Revision: https://phabricator.services.mozilla.com/D207110
2024-04-15 10:22:46 +00:00
William Durand
82a3893343 Bug 1787379 - Add origin to runtime.MessageSender. r=robwu,zombie,geckoview-reviewers
Note that we intentionally return "null" for null principals *and* file
scheme, which is - at the time of writing - different than Chromium.

Differential Revision: https://phabricator.services.mozilla.com/D206989
2024-04-10 21:48:40 +00:00
William Durand
416ec07269 Bug 1784920 - Add activeTab as permission for tabs.captureVisibleTab API. r=robwu,geckoview-reviewers,amejiamarmol
Differential Revision: https://phabricator.services.mozilla.com/D206882
2024-04-10 14:15:23 +00:00
Gijs Kruitbosch
e6dd680afd Bug 1887717 - remove prompts.windowPromptSubDialog pref, r=mtigley,extension-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D206685
2024-04-09 18:28:44 +00:00
William Durand
596cecbf3d Bug 1843866 - Add tab parameter to commands.onCommand. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D206880
2024-04-08 13:45:06 +00:00
Tomislav Jovanovic
2c32b89754 Bug 1880162 - Decouple ExtensionChild namespace, rename BrowserExtensionContent, r=robwu
And export public classes from ExtensionChild.sys.mjs directly.

Differential Revision: https://phabricator.services.mozilla.com/D206235
2024-04-06 09:47:03 +00:00
Luca Greco
409c09490f Bug 1816960 - Add support for options_page as an alias for options_ui.page. r=robwu,amejiamarmol,geckoview-reviewers,extension-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D206429
2024-04-04 19:13:27 +00:00
Joel Maher
a1c9f109b8 Bug 1889412 - skip 25+ minute manifests on asan/tsan. r=aryx,extension-reviewers,settings-reviewers,robwu
Differential Revision: https://phabricator.services.mozilla.com/D206512
2024-04-03 17:46:29 +00:00
Yi Xiong Wong
3df27d805a Bug 1880914 - Move BrowserOpenTab. r=Gijs,webdriver-reviewers,perftest-reviewers,extension-reviewers,sessionstore-reviewers,tabbrowser-reviewers,home-newtab-reviewers,thecount,whimboo,dao,afinder,omc-reviewers,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D205529
2024-04-03 10:32:27 +00:00
Irene Ni
ea6c87d4f9 Bug 1876432 - Added support for custom themes as its own menu in Reader View. r=reader-mode-reviewers,fluent-reviewers,desktop-theme-reviewers,hjones,accessibility-frontend-reviewers,bolsson,devtools-reviewers,sfoster,cmkm,jules,ayeddi
Differential Revision: https://phabricator.services.mozilla.com/D204519
2024-04-02 00:08:46 +00:00
Yi Xiong Wong
9457049851 Bug 1880914 - Move BrowserHome. r=Gijs,extension-reviewers,sessionstore-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D205528
2024-03-28 17:05:02 +00:00
Luca Greco
d8453fa6cc Bug 1881820 - Tweak browser_ext_sidebarAction to cover the fix with a regression test. r=willdurand
Depends on D205440

Differential Revision: https://phabricator.services.mozilla.com/D205753
2024-03-27 13:18:34 +00:00
Anna Yeddi
a9b2a6e034 Bug 1886925 - Add an exception from a11y_checks for a click on a non-interactive content in Webextensions. r=rpl
We intentionally turn off this a11y check, because the following click is purposefully targeting a non-interactive content of the page to move cursor to the center of the entire browser UI to avoid issues with other focus/hover checks. We do this to avoid intermittent test failure.

Differential Revision: https://phabricator.services.mozilla.com/D205407
2024-03-22 21:02:51 +00:00
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