Commit Graph

3839 Commits

Author SHA1 Message Date
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
Luca Greco
c10a87a13e Bug 1867034 - Fix webNavigation central-as-beta test failure by fixing non-schemeless typed url wrongly detected as schemeless. r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D194926
2023-11-29 14:37:33 +00:00
Luca Greco
5f924c7ac5 Bug 1866565 - Do not open an about:addons tab when opening an abuse report form in a tab from a toolbar button context menu. r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D194648
2023-11-27 22:03:16 +00:00
Luca Greco
2eb71c93af Bug 1863307 - Adapt mochitest-browser tests covering the report context menu item to run with amoFormEnabled true/false. r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D194707
2023-11-27 11:20:09 +00:00
Jonathan Watt
61ff6ba12e Bug 1866011 p2. Rename nsIDocShell.contentViewer. r=emilio,credential-management-reviewers,devtools-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D194370
2023-11-24 09:10:52 +00:00
Joel Maher
33fa84a382 Bug 1859869 - batch 12 - browser/* xpcshell .ini manifests to .toml. r=aryx,extension-reviewers,credential-management-reviewers,search-reviewers,sessionstore-reviewers,places-reviewers,issammani,Standard8,robwu,sclements
Differential Revision: https://phabricator.services.mozilla.com/D193996
2023-11-21 17:35:23 +00:00
Brad Werth
8916e8c46d Bug 1854820 Part 2: Update an extension window test to check window sizes. r=extension-reviewers,robwu
Differential Revision: https://phabricator.services.mozilla.com/D192980
2023-11-18 00:30:52 +00:00
Brad Werth
f934e9176d Bug 1854820: Make the transition to window normal state work the same on extension windows as it does elsewhere. r=extension-reviewers,robwu
Calling window.restore will return the window to its previous
dimensions. Prior to this patch, extension windows transitioning to
normal state would add a second step where they would forcibly resize
the window to content. The motivating reason for this additional step is
some kind of difficulty with macOS windows restoring from other states.
Those issues were handled comprehensively in Bug 1631735, and now the
extra step is unnecessary and surprising to users. Since the call was
being made potentially during a deminimization native transition, the
window is at a very small size and expanding it to fit the content is
resizing it to a strange small size. Window.restore will do the right
thing, so this patch stops calling sizeToContent.

Differential Revision: https://phabricator.services.mozilla.com/D189972
2023-11-18 00:30:52 +00:00
Anna Yeddi
f1f09e1bcd Bug 1864221 - Pt.2 Add exceptions from a11y_checks for 2 tests purposefully clicking on container elements in Webextensions. r=rpl
There are 2 failing test cases in `browser/components/extensions/test/browser/browser_ext_browserAction_popup_preload.js` for the `html:body` that are sending clicks to a `<body>` element to dismiss the pending popup using an alternative way of the popup dismissal, where the other way like `Esc` key is available, therefore these two test clicks can be excluded from the a11y_checks.

Another test cases are in `browser/components/extensions/test/browser/browser_ext_menus_capture_secondary_click.js` that are clicking on the `<menu>` parent container to confirm the click event is not going to be triggered for the attached menu items, thus these clicks are also excluded from the a11y_checks.

These actions are not expected or do not have to be done by a user of an assistive technology and we do not have to confirm the accessibility of these elements.

Thus, we are excluding these click events from accessibility checks.

Differential Revision: https://phabricator.services.mozilla.com/D193574
2023-11-15 17:25:35 +00:00
Anna Yeddi
977bf41d1c Bug 1864221 - Pt.1 Add exceptions from a11y_checks for 3 tests clicking on disabled controls in Webextensions. r=Jamie,extension-reviewers,rpl
We intentionally turn off a11y_checks for these click events, because the clicks in the patch are targeting disabled controls to confirm the click events won't come through. These clicks are not meant to be interactive and are not expected to be accessible.

Thus, we are excluding this click event from accessibility checks and removing the fail-if annotation that was added by bug 1854460 before the investigation in the meta bug 1854461.

Differential Revision: https://phabricator.services.mozilla.com/D193329
2023-11-15 17:25:35 +00:00
Rob Wu
db01c3ea59 Bug 1859490 - Ignore tab events when isAdoptingTab r=zombie
While a tab is being adopted, it may trigger tab events. This currently
triggers errors in the console becausetabManager.getWrapper returns null
in this situation, and the next line dereferences the return value
without null-checking.

To prevent this error from happening, exit early in this situation. This
avoids logspam whenever swapBrowsersAndCloseOther is called before
_clearTabToAdopt, at https://searchfox.org/mozilla-central/rev/76b13c585e575cf273fd05ab3b48a1532c1d1faa/browser/base/content/browser.js#1766-1772

Once `_clearTabToAdopt` is called, `isAdoptingTab()` becomes false.

Differential Revision: https://phabricator.services.mozilla.com/D193254
2023-11-14 16:39:46 +00:00