Commit Graph

3025 Commits

Author SHA1 Message Date
Emilio Cobos Alvarez
c946015d10 Bug 1708735 - Make the arrowpanel code more generic. r=dao,zombie
Share the concept of a panel content with all other menupopups / panels.

This avoids importing global.css in the shadow tree, and renames the
arrowcontent part to just "content", since we want to introduce a
"content" part for other panels.

This shouldn't change behavior but makes bug 1708136 a matter of
tweaking a couple CSS rules and fixing up test failures.

Differential Revision: https://phabricator.services.mozilla.com/D113990
2021-05-30 12:31:49 +00:00
Butkovits Atila
0cd2df1600 Backed out changeset 229e905d571e (bug 1708735) for multiple regressions. CLOSED TREE 2021-05-30 14:27:20 +03:00
Emilio Cobos Alvarez
33b5b3ec17 Bug 1708735 - Make the arrowpanel code more generic. r=dao,zombie
Share the concept of a panel content with all other menupopups / panels.

This avoids importing global.css in the shadow tree, and renames the
arrowcontent part to just "content", since we want to introduce a
"content" part for other panels.

This shouldn't change behavior but makes bug 1708136 a matter of
tweaking a couple CSS rules and fixing up test failures.

Differential Revision: https://phabricator.services.mozilla.com/D113990
2021-05-28 11:56:07 +00:00
Rob Wu
00721b4297 Bug 1713120 - Fix TypeError: n.getAttribute is not a function in ext-pageAction.js r=rpl
The reported error happens because `.parentNode` can be a document,
which doesn't implement the Element interface. Using `.parentElement`
solves this issue.

And while I'm fixing this: move the logic behind the menu ID check, so
that the logic is not unnecessarily run for non-pageAction contextmenus.

Differential Revision: https://phabricator.services.mozilla.com/D116138
2021-05-27 17:30:03 +00:00
Gijs Kruitbosch
38c437fc9a Bug 1712141 - fix intermittent browser_ext_menus.js test failures caused by bookmarks toolbar race, r=rpl
This is a bit peculiar. When we show the bookmarks toolbar, we create its children. When it then
gets hidden, they do not get removed. When we then re-enable the bookmarks toolbar, we call
`rebuild` on the next tick (because of the `await` in `init` in PlacesToolbarHelper), which
synchronously removes all the children of the toolbar, and then rebuilds the places node. It
does that async because it avoids doing synchronous layout flushes.

This breaks in the test - and the closer you put the "show the bookmarks toolbar" code to
the code that tries to open the context menu, the more reliably it breaks, because we try
to show the context menu right after we synchronously remove everything, and before we've
(asynchronously) put content back.

To avoid the raciness here, we wait for the custom event in the places toolbar to indicate
we're done building it.

Differential Revision: https://phabricator.services.mozilla.com/D116118
2021-05-27 15:48:31 +00:00
Christoph Kerschbaumer
772a3b602d Bug 1711422: Update PBM tests within browser/base to work with https-first-mode enabled r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D116014
2021-05-27 14:16:15 +00:00
Michelle Goossens
e79b25342d Bug 1711500 - Remove checks for gProton and gProtonDoorhangers smart pref getters from tests r=Gijs,robwu
Differential Revision: https://phabricator.services.mozilla.com/D115748
2021-05-24 13:46:39 +00:00
Michelle Goossens
6cb6ba7640 Bug 1711498 - Remove checks for protonAppMenuEnabled or protonToolbarEnabled smart pref getters from tests r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D115651
2021-05-21 15:51:13 +00:00
Michelle Goossens
692ff0bb41 Bug 1711497 - Remove browser.proton.enabled checks/setters from tests r=Gijs,marionette-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D115539
2021-05-20 13:03:51 +00:00
Harry Twyford
f6588ee7ec Bug 1706479 - Wrap page action icons in an hbox. r=morgan,adw
To resolve this bug, we need page action icons and semantic page action nodes to be separate. That way, we can apply filters to the icons without also filtering the nodes' outlines. This means the semantic meaning of the page action button must move up a level, to the enclosing hbox. This means reverting bug 1482025, so I'd like a11y review on this patch.

Differential Revision: https://phabricator.services.mozilla.com/D114131
2021-05-19 20:37:19 +00:00
Nicolas Chevobbe
80e9065cbe Bug 1711895 - Remove unnecessary call to _updateLastExpressionResult in ParentDevToolsInspectorSidebar#close. r=rpl.
Differential Revision: https://phabricator.services.mozilla.com/D115488
2021-05-19 16:58:05 +00:00
lyavor
5bc97c4832 Bug 1711697 Update PBM tests within browser/components/extensions/test/browser/browser_ext_incognito_popup.js to work with https-first-mode enabled r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D115373
2021-05-19 12:16:57 +00:00
lyavor
a915b43566 Bug 1711714 Update PBM tests within browser/components/extensions/test/browser/browser_ext_tabs_zoom to work with https-first-mode enabled. r=kmag,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D115378
2021-05-19 12:13:36 +00:00
Csoregi Natalia
103b1ef19e Backed out changeset e90263d64998 (bug 1706479) for failures on browser_parsable_css.js. CLOSED TREE 2021-05-18 18:21:47 +03:00
Harry Twyford
db22da1a9c Bug 1706479 - Wrap page action icons in an hbox. r=morgan,adw
To resolve this bug, we need page action icons and semantic page action nodes to be separate. That way, we can apply filters to the icons without also filtering the nodes' outlines. This means the semantic meaning of the page action button must move up a level, to the enclosing hbox. This means reverting bug 1482025, so I'd like a11y review on this patch.

Differential Revision: https://phabricator.services.mozilla.com/D114131
2021-05-18 13:33:06 +00:00
lyavor
7982d41ee5 Bug 1711455 Update URL in test cases of browser/components/extensions/test/browser/browser_ext_incognito_views.js. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D115210
2021-05-17 17:32:44 +00:00
Silke Hofmann
ee069252cb Bug 1710273 - Stop using ChromeUtils.import(..., null) for importing EnterprisePolicies.jsm. r=nhnt11,extension-reviewers,preferences-reviewers,zombie
Differential Revision: https://phabricator.services.mozilla.com/D115024
2021-05-12 23:16:33 +00:00
Daisuke Akatsuka
e17f7bc3a8 Bug 1511062: Remove onItemMoved from nsINavBookmarkObserver. r=mak
Depends on D102574

Differential Revision: https://phabricator.services.mozilla.com/D102575
2021-05-06 04:24:35 +00:00
Daisuke Akatsuka
9dd25c8501 Bug 1511062: Apply bookmark-moved event. r=mak
Depends on D102573

Differential Revision: https://phabricator.services.mozilla.com/D102574
2021-05-06 04:24:35 +00:00
Daisuke Akatsuka
d117f59c8f Bug 1511062: Remove old/new parent id from onItemMoved in nsINavBookmarkObserver. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D102572
2021-05-06 04:24:34 +00:00
Csoregi Natalia
ce52bc5e1a Backed out 4 changesets (bug 1511062) for causing bustage on nsNavHistoryResult.cpp. CLOSED TREE
Backed out changeset ed9ac8c3097b (bug 1511062)
Backed out changeset dc8c9488cf1a (bug 1511062)
Backed out changeset 2cf6fca33bf3 (bug 1511062)
Backed out changeset 87b0bbbcb0e6 (bug 1511062)
2021-05-06 05:53:12 +03:00
Daisuke Akatsuka
28b00086fd Bug 1511062: Remove onItemMoved from nsINavBookmarkObserver. r=mak
Depends on D102574

Differential Revision: https://phabricator.services.mozilla.com/D102575
2021-05-06 02:29:44 +00:00
Daisuke Akatsuka
cf9542ed5b Bug 1511062: Apply bookmark-moved event. r=mak
Depends on D102573

Differential Revision: https://phabricator.services.mozilla.com/D102574
2021-05-06 02:29:44 +00:00
Daisuke Akatsuka
43e96443cc Bug 1511062: Remove old/new parent id from onItemMoved in nsINavBookmarkObserver. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D102572
2021-05-06 02:29:43 +00:00
Harry Twyford
8eb47475e0 Bug 1708788 - Update remaining extension icons. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D114008
2021-05-01 13:03:47 +00:00
Shane Caraveo
0e77195c13 Bug 1697059 require favicon to be in the extension xpi r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D108270
2021-04-30 20:31:41 +00:00
Shane Caraveo
ed4d02e2ae Bug 1687762 fix deprecated extension api use r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D111966
2021-04-30 20:31:40 +00:00
Luca Greco
cf6f98e6d8 Bug 1707214 - Ensure we don't cache dataTransfer.files when accessed by expanded principals. r=mixedpuppy,nika
This doesn't seem a recent regression, the underlying issue is that we don't account for
the Extensions content scripts (and user scripts) as other principals that may be able
to intercept a drop event and then try to access the dataTransfer.files property before
the webpage does.

As the big inline comment inside DataTransferItemList::Files does explain, keeping a copy
of the FileList when accessed from a webpage principal is necessary for spec compliance,
while we don't cache it when it is being accessed by system principal code.
(see https://searchfox.org/mozilla-central/rev/6cbe34b441f7c7c29cd1e5f0e19c7000142f1423/dom/events/DataTransferItemList.cpp#200-242)

The changes in this patch are preventing us from caching the file list also when accessed
by expanded principals (which are never going to be used for any web page, but they are used
by both Extensions content scripts and Extensions user scripts), along with adding a new.
regression test to prevent it from regressing without being noticed.

Without this patch, when an extension content script or user script does intercept the
drop event and access the dataTransfer.files property, we cache the FileList created
for the ExpandedPrincipal associated to the Extension script and after that if the page
try to access it we do return null because the webpage principal doesn't subsume the
expanded principal (which is also why the issue isn't triggered if the webpage does
access it first). In debug build we crash because we hit the assertion in
DataTransferItemList::Files right before the earlier nullptr return we hit on release.

Differential Revision: https://phabricator.services.mozilla.com/D113555
2021-04-30 19:48:41 +00:00
Richa Sharma
8d273ad8f9 Bug 1706617 - Enabled "privacy.userContext.enabled" pref to fix containerIsolation test failures on beta. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D113305
2021-04-28 23:10:24 +00:00
Gijs Kruitbosch
49c72ce0fd Bug 1705084 - remove icons from builtin items in the sidebar selector dropdown, and stop using checkbox items in it altogether, r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D113652
2021-04-28 21:45:06 +00:00
Nicolas Chevobbe
a713fefe3c Bug 1706098 - [devtools] Cleanup browser_ext_devtools_inspectedWindow_reload.js. r=extension-reviewers,rpl.
Remove unused assignment in test.

Depends on D112980

Differential Revision: https://phabricator.services.mozilla.com/D113339
2021-04-26 13:35:14 +00:00
Nicolas Chevobbe
1152c3dfe9 Bug 1706098 - [devtools] Make inspectedWindow.reload with userAgent implementation match Chrome's one and add support for Fission. r=ochameau,rpl,devtools-backward-compat-reviewers.
Our implementation was setting a custom user agent on the document
before reloading it, and then resetting it as soon as the document
was loaded.
In Chrome, once the webextension sets the user agent, it persists
across reload and navigations, and is reset only when the toolbox
is closed.
This patch is adding similar behaviour to our implementation.

We also set the currentUserAgent flag on the browsing context from
the parent process instead of content. This is re-using the
targetConfigurationCommand, which also handle for us resetting the
user agent when the toolbox closes.

The existing test is expanded so it includes a remote iframe to ensure
the feature is supported on Fission. It also check the value of the user
agent through navigator.userAgent, and not only through the request header.

Differential Revision: https://phabricator.services.mozilla.com/D112980
2021-04-26 12:22:45 +00:00
Alexandru Michis
b431633a7f Backed out changeset 20d89921f646 (bug 1706098) for causing bc failures in browser_ext_devtools_inspectedWindow_reload.js
CLOSED TREE
2021-04-26 12:39:07 +03:00
Nicolas Chevobbe
3ef843193a Bug 1706098 - [devtools] Make inspectedWindow.reload with userAgent implementation match Chrome's one and add support for Fission. r=ochameau,rpl,devtools-backward-compat-reviewers.
Our implementation was setting a custom user agent on the document
before reloading it, and then resetting it as soon as the document
was loaded.
In Chrome, once the webextension sets the user agent, it persists
across reload and navigations, and is reset only when the toolbox
is closed.
This patch is adding similar behaviour to our implementation.

We also set the currentUserAgent flag on the browsing context from
the parent process instead of content. This is re-using the
targetConfigurationCommand, which also handle for us resetting the
user agent when the toolbox closes.

The existing test is expanded so it includes a remote iframe to ensure
the feature is supported on Fission. It also check the value of the user
agent through navigator.userAgent, and not only through the request header.

Differential Revision: https://phabricator.services.mozilla.com/D112980
2021-04-26 08:19:40 +00:00
Joel Maher
5a5bc0c176 Bug 1706716 green up mda, xpcshell, browser-chrome, reftest for apple silicon. r=necko-reviewers,extension-reviewers,preferences-reviewers,application-update-reviewers,zombie,ahal,bytesized
Differential Revision: https://phabricator.services.mozilla.com/D113001
2021-04-22 18:39:40 +00:00
Shane Caraveo
1034bc2ebf Bug 1705835 remove unused engineAdded extension setting r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D112432
2021-04-22 15:33:51 +00:00
Markus Stange
bb773bed9c Bug 1704879 - Use activateItem in browser/components/extensions/test/browser/head.js even if a button is used. r=robwu
Depends on D111979

Differential Revision: https://phabricator.services.mozilla.com/D111980
2021-04-20 22:13:25 +00:00
Markus Stange
9590831a70 Bug 1704948 - Forward mouse button to menuitem command event. r=smaug,robwu
Differential Revision: https://phabricator.services.mozilla.com/D111956
2021-04-20 17:44:16 +00:00
Richa Sharma
e6f660a9d0 Bug 1690736 - Change webnavigation API internal to support container access. r=rpl,robwu
Differential Revision: https://phabricator.services.mozilla.com/D104355
2021-04-20 12:59:26 +00:00
Richa Sharma
dec5980775 Bug 1683058 - Remove unused isPrivate from ext-browser.js. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D104055
2021-04-20 12:59:26 +00:00
Richa Sharma
9eed107905 Bug 1683058 - Change tabs API internals to support container access. r=robwu,rpl
Differential Revision: https://phabricator.services.mozilla.com/D100232
2021-04-20 12:59:26 +00:00
Florian Quèze
5f252c4411 Bug 1703583 - fix tests that keep waitForEvent or topicObserved promises pending, r=Gijs,zombie.
Differential Revision: https://phabricator.services.mozilla.com/D111116
2021-04-19 21:56:05 +00:00
Mark Striemer
f7abc5c252 Bug 1701691 - -moz-toolbar-prefers-color-scheme for dark theme detection r=desktop-theme-reviewers,emilio,harry
This adds a new @media query -moz-toolbar-prefers-color-scheme which works like
prefers-color-scheme but is set based on the browser theme rather than the OS
theme. The background colour of the toolbar is used to determine the theme
dark/light preference. This will be used for in-content common.css pages and
other UI elements that include that stylesheet in the browser-chrome through
shadow DOM.

The end result is that about: pages, infobars, and modals will now "match" the
browser theme (just light/dark mode, not LWT theming support).

Differential Revision: https://phabricator.services.mozilla.com/D111486
2021-04-18 22:22:49 +00:00
Emilio Cobos Álvarez
0e55bca38f Bug 1705757 - Move FrameLoader.print to BrowsingContext.print. r=nika,remote-protocol-reviewers,marionette-reviewers,extension-reviewers,zombie
This makes it trivial to choose the right BrowserParent to print a
browsing context, by removing the OuterWindowID / FrameLoader
indirections.

Differential Revision: https://phabricator.services.mozilla.com/D112412
2021-04-17 18:41:11 +00:00
Tomislav Jovanovic
9feb88f6ce Bug 1704772 - Fix extension context menu checkbox items and vertical alignment r=Gijs
1) Stop setting the image attribute for extension menu checkbox items.  They
don't work with the new custom chekbox appearance CSS, and not shown anyway.

2) When gutter is visible, stop padding menu items with an icon outside of it,
and use the gutter as a place for said icons.

3) Adjust margin for menu items with icons to align the text with the rest of
the menu items when the gutter is visible.

Differential Revision: https://phabricator.services.mozilla.com/D112267
2021-04-16 21:05:53 +00:00
Noemi Erli
069b9f637c Backed out changeset 1c9943dacbdb (bug 1701691) for causing failures in browser_toolbar_prefers_color_scheme.js CLOSED TREE 2021-04-16 05:29:10 +03:00
Mark Striemer
b41b10a8db Bug 1701691 - -moz-toolbar-prefers-color-scheme for dark theme detection r=desktop-theme-reviewers,emilio,harry
This adds a new @media query -moz-toolbar-prefers-color-scheme which works like
prefers-color-scheme but is set based on the browser theme rather than the OS
theme. The background colour of the toolbar is used to determine the theme
dark/light preference. This will be used for in-content common.css pages and
other UI elements that include that stylesheet in the browser-chrome through
shadow DOM.

The end result is that about: pages, infobars, and modals will now "match" the
browser theme (just light/dark mode, not LWT theming support).

Differential Revision: https://phabricator.services.mozilla.com/D111486
2021-04-16 00:43:46 +00:00
Csoregi Natalia
e7c2f99111 Backed out changeset 79c1392f7c43 (bug 1701691) for failures on browser_toolbar_prefers_color_scheme.js. CLOSED TREE 2021-04-15 22:18:09 +03:00
Mark Striemer
3c9f5fb249 Bug 1701691 - -moz-toolbar-prefers-color-scheme for dark theme detection r=desktop-theme-reviewers,emilio,harry
This adds a new @media query -moz-toolbar-prefers-color-scheme which works like
prefers-color-scheme but is set based on the browser theme rather than the OS
theme. The background colour of the toolbar is used to determine the theme
dark/light preference. This will be used for in-content common.css pages and
other UI elements that include that stylesheet in the browser-chrome through
shadow DOM.

The end result is that about: pages, infobars, and modals will now "match" the
browser theme (just light/dark mode, not LWT theming support).

Differential Revision: https://phabricator.services.mozilla.com/D111486
2021-04-15 18:17:07 +00:00
Mark Banner
c9be59b5ad Bug 1702454 - Re-enabling an add-on that overrides search engine parameters shouldn't cause a prompt. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D110562
2021-04-15 15:57:41 +00:00