Commit Graph

777 Commits

Author SHA1 Message Date
Neil Deakin
21426e24f4 Bug 1776879, replace text/unicode for clipboard and drag and drop and use text/plain directly, r=edgar,mak,stransky,geckoview-reviewers,extension-reviewers,zombie,m_kato
Most usage is a straight replacement but gtk needs extra changes as it transfers plain text in UTF8 natively and needs to be converted into UTF16, and Windows uses single-byte characters for RTF and CF_HTML formats so we preserve this.

Differential Revision: https://phabricator.services.mozilla.com/D158587
2023-02-01 23:30:55 +00:00
Marco Bonardo
febc0037be Bug 1813484 - Use new URI <-> URL conversion in Places. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D168253
2023-01-31 17:36:22 +00:00
Jonathan Sudiaman
8d20bcc639 Bug 1801871 - Update Bookmark Star panel to use editBookmark.js r=mak,Standard8
Enable delayed apply logic for the star panel. Refactor some existing code using async/await rather than `catch()` everywhere.

https://treeherder.mozilla.org/jobs?revision=fb6ba9ef08f132c72b6c2918067fc3db54a94650&repo=try

Differential Revision: https://phabricator.services.mozilla.com/D166237
2023-01-30 20:10:46 +00:00
Marco Bonardo
3b8f1a3fd8 Bug 1457131 - Remove itemId (aka parentId) from PlacesInsertionPoint. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D165767
2023-01-04 13:16:08 +00:00
Mark Banner
34d6fb8d94 Bug 1806503 - Automatically replace Cu.reportError with console.error (browser/actors, browser/base). r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D165068
2022-12-27 10:08:58 +00:00
Marco Bonardo
e7cd35a78d Bug 1805889 - Stop abusing the options object in the Panel View. r=Gijs
Make Places views constructors arguments more coherent, passing the root
and view elements up to the super class explicitly.
Remove the options argument, that was not strictly necessary, the same info can
be obtained directly.
Rename the "builder" attribute to "afterplacescontent" to clarify what it is
and make panel use it, instead of passing an insertionPoint option.

Additional cleanups:
Make chevron and BMB menus use coherent popupshowing observers.
Remove useless .viewElt accessor, .associatedElement can be used instead.
Avoid an access to the private _rootElt property from the controller.

Differential Revision: https://phabricator.services.mozilla.com/D164827
2022-12-19 10:18:22 +00:00
Gijs Kruitbosch
689dd56c27 Bug 1805678 - ensure bookmark menu button submenus don't reuse root/view element references, r=mak
Only the bookmarks menu button is doing this peculiar re-using of
options.

I tried various fixes: keeping the inheritance but replacing only the
rootElt/viewElt (and using Object.assign to clone the options so modifications
don't 'transmit' to the ancestor menus) but it was messy and net code increase
for a pretty crufty UI surface. I also wasn't sure if that would end up
negatively influencing (now or in the future) e.g. menus shown from the main
bookmarks toolbar view (which would show up as a 'parent' view for the menus
we open from there), and thought that reusing the options was likely to cause
further confusion in future as well, should we add more, uh, options, to them.

So in the end I stuck with Keeping It Simple - I just repeat the one-off
repeating entry class. I'm not even sure how needed this is - in particular,
I wonder why we don't need it for other submenus for 'real' bookmark folders!
But I didn't investigate this too much. If you're sure that we can get rid of
some more of it, happy to do that in a followup.

Note that the addition of _init() was not ultimmately needed to fix this bug
(I think), but it brought the initialization sequence and when we set
`_placesView` more in line with what we did before and what I already did for
`PlacesToolbar`, so that seemed like a good thing to avoid further/other issues.

Differential Revision: https://phabricator.services.mozilla.com/D164756
2022-12-16 08:06:07 +00:00
Gijs Kruitbosch
e46dfda0f5 Bug 1803800 - load browserPlacesViews.js only once and immediately from browser scripts, r=mak,florian,Standard8
Unfortunately lazy script getters load the file once for each accessed symbol, which
redeclares "let" and "const" and "class" variables, which was a problem here. But also,
loading the file multiple times is bad for performance (it is not a module so we
actually reload it) and the "lazy" variables get dereferenced immediately from
markup that is present both in browser.xhtml and the hidden window on macOS, so I
doubt lazy loading was getting us anything performance-wise.

This patch simplifies things by 'just' loading the file from the markup.

Differential Revision: https://phabricator.services.mozilla.com/D163934
2022-12-12 17:44:15 +00:00
Gijs Kruitbosch
824e80be7f Bug 1803800, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D163933
2022-12-12 17:44:14 +00:00
Gijs Kruitbosch
965c6e86fc Bug 1803158 - convert session restore consumers to reference the sys.mjs files instead, r=webdriver-reviewers,perftest-reviewers,extension-reviewers,credential-management-reviewers,Standard8,sgalich,whimboo,sparky,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D163350
2022-12-06 16:02:03 +00:00
Francesco Lodolo (:flod)
083fc7f23f Bug 1801915 - Migrate confirmation hints to Fluent, r=eemeli,credential-management-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D162746
2022-11-22 20:12:55 +00:00
Itiel
3d0bd22bd1 Bug 1796940 - Unify bookmark-related popups r=emilio,mak,mkaply
Differential Revision: https://phabricator.services.mozilla.com/D158460
2022-11-17 22:58:04 +00:00
Cosmin Sabou
bb17ead141 Backed out changeset 99db9921183c (bug 1796940) for bc failures on browser_parsable_css.js. CLOSED TREE 2022-11-18 00:08:28 +02:00
Itiel
b1e0feab9a Bug 1796940 - Unify bookmark-related popups r=emilio,mak,mkaply
Differential Revision: https://phabricator.services.mozilla.com/D158460
2022-11-17 20:34:58 +00:00
Emilio Cobos Álvarez
5ba5d0e694 Bug 1800168 - Handle removal correctly in _updateImportButton. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D161882
2022-11-11 19:05:07 +00:00
Emilio Cobos Álvarez
6429faaecd Bug 1796941 - Simplify toolbar button styling in the personal (bookmarks) toolbar. r=dao
It was rather complicated because we want the import button to behave
as a bookmark item when in there, but as a regular icon otherwise.

We can achieve that more simply by actually toggling its styling. This
allows us to have less special-cases in toolbarbuttons.css

Differential Revision: https://phabricator.services.mozilla.com/D160045
2022-11-10 12:27:06 +00:00
Mike Conley
c759904dae Bug 1797836 - Part 2: Update CUI to have a general TYPE_PANEL instead of TYPE_MENU_PANEL. r=desktop-theme-reviewers,dao,sclements
Long ago, the menu panel in was a customizable area that users could drag things into.

That changed back around 2017 in bug 1354117 when the Photon redesign was built. The
menu panel become a static menu, but we also made it possible to permanently move things
to the overflow panel of the nav-bar.

It looks like we never updated the area type constant from referring to the old menu panel
though, so it's "TYPE_MENU_PANEL", and registering a node for it happens with
registerMenuPanel. This patch changes to constant to TYPE_PANEL and updates the registration
method to registerPanelNode.

I a check around the codebase as well as GitHub looking to see if there were any
system add-ons or experimental WebExtensions that rely on TYPE_MENU_PANEL / registerMenuPanel,
but I couldn't find any.

Differential Revision: https://phabricator.services.mozilla.com/D161078
2022-11-08 14:51:40 +00:00
Andrew McCreight
670df172aa Bug 1792457 - Revert workarounds for weak references to XPCWJS crashes. r=Gijs
I have fixed the underlying XPConnect issue, so these workarounds should
no longer be needed.

There are also two more in browser/base/content/browser-siteProtections.js
that I have not fixed.

Differential Revision: https://phabricator.services.mozilla.com/D158158
2022-09-29 11:40:19 +00:00
Emilio Cobos Álvarez
abab9b2db7 Bug 1788273 - Tweak popup alignment so that it looks good on mirrored wayland popups. r=dao,mak
When these panels had arrows, I guess the bottomcenter topleft alignment
made sense so that you could precisely align the arrow, but that's not
what we do now.

Don't use bottomcenter / leftcenter / rightcenter, since we really want
the sides to align.

This shouldn't change behavior on any platform except Linux + Wayland,
where the alignment looks good now in the case of bug 1784876.

Differential Revision: https://phabricator.services.mozilla.com/D156099
2022-09-02 20:26:29 +00:00
Butkovits Atila
e4a4a23311 Backed out changeset 368a7ce1b104 (bug 1788273) for causing failures at browser_recently_closed_tabs.js. CLOSED TREE 2022-09-02 16:35:55 +03:00
Emilio Cobos Álvarez
72c00adfaa Bug 1788273 - Tweak popup alignment so that it looks good on mirrored wayland popups. r=dao,mak
When these panels had arrows, I guess the bottomcenter topleft alignment
made sense so that you could precisely align the arrow, but that's not
what we do now.

Don't use bottomcenter / leftcenter / rightcenter, since we really want
the sides to align.

This shouldn't change behavior on any platform except Linux + Wayland,
where the alignment looks good now in the case of bug 1784876.

Differential Revision: https://phabricator.services.mozilla.com/D156099
2022-09-02 11:18:54 +00:00
Shane Hughes
509e6cf163 Bug 1783207 - Add ellipsis to some menu label strings. r=flod
The copy guidance recommends adding an ellipsis to the end of labels for
controls that require an additional step to complete the action
specified by the label. We have some menuitems and panel buttons that
open a bookmark dialog or the edit bookmark panel that don't have an
ellipsis, so add that. Also, the form "Bookmark this x" has been changed
to "Bookmark x" in menuitems. Also, there's a "Print Selection" menuitem
that needed an ellipsis. Thanks for the review!

Differential Revision: https://phabricator.services.mozilla.com/D154320
2022-08-11 17:48:11 +00:00
James Teow
d99404900f Bug 1760637 - Upgrade initPanel in instantEditBookmark.js to async r=mak
In addition to adding async/await, I also added early return statements
when we know initialization is occuring again, or if there is evidence
that it has been uninitialized.

A concrete example of this would be from the Library, where clicking on
on a folder/category on the left will run initPanel at the same time as
the highlighted folder/bookmark on the right changes (also runs initPanel).

Differential Revision: https://phabricator.services.mozilla.com/D141800
2022-05-17 00:32:48 +00:00
Emilio Cobos Álvarez
9052d4d000 Bug 1768004 - Remove some leftover usage I missed and ESLint caught.
MANUAL PUSH: ESLint fix CLOSED TREE
2022-05-05 18:58:48 +02:00
a153
659d613873 Bug 1763262 - Remove unused toggleMenuButtonInToolbar r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D143108
2022-04-07 22:39:57 +00:00
Neil Deakin
1deffdd939 Bug 1748345, if deleting the default bookmark folder, reset the preference so that it is valid for later use, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D136199
2022-01-20 12:21:51 +00:00
Daisuke Akatsuka
67c9be2077 Bug 1701871: Handle bookmark telemetry in browser-places instead of listener had used for only the telemetry. r=mak
Depends on D131108

Differential Revision: https://phabricator.services.mozilla.com/D131109
2021-12-23 22:34:56 +00:00
Daisuke Akatsuka
940d1ac1c4 Bug 1733854: Remove unused onItemMoved function. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D131108
2021-12-19 23:09:43 +00:00
Michael Kohler
87790d1825 Bug 1672486 - Remove browser.toolbars.bookmarks.2h2020 pref from browser/customizableui/places r=mak
Differential Revision: https://phabricator.services.mozilla.com/D127588
2021-10-14 07:51:14 +00:00
Kagami Sascha Rosylight
4e97df82b2 Bug 1733511 - Set currentDropTarget in PMDH_onDragOver r=mak
PMDH_onDragEnter sets it but it can be immediately nullified by a dragleave listener of a menu popup. Having null ultimately triggers closeParentMenus() by closeMenuTimer, and setting the proper drop target in dragover prevents that.

Running closeMenuTimer immediately after openen a popup sounds weird but that's an existing behavior and is out of scope of this patch.

Differential Revision: https://phabricator.services.mozilla.com/D127971
2021-10-11 15:12:53 +00:00
Daisuke Akatsuka
48273c63f4 Bug 1678624: Apply bookmark-url-changed event. r=mak
Depends on D103883

Differential Revision: https://phabricator.services.mozilla.com/D103884
2021-10-05 00:53:45 +00:00
Gijs Kruitbosch
c9462bba8a Bug 1730040 - drop PLACES_BOOKMARKS_TOOLBAR_RENDER_DELAY_MS probe, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D126904
2021-10-01 11:12:23 +00:00
Butkovits Atila
91d0db9a30 Backed out 3 changesets (bug 1719939, bug 1726437, bug 1730262) for causing failures on test_browserGlue_migration_ctrltab_recently_used_order.js.
Backed out changeset ea1653e9644f (bug 1719939)
Backed out changeset 01f90db715a7 (bug 1726437)
Backed out changeset c0e23b2acfbb (bug 1730262)
2021-09-21 05:15:31 +03:00
Junjie Ying
11151d13b2 Bug 1719939 - Remove last fragments of code manually checking the browser.proton.enabled pref. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D125345
2021-09-21 00:03:49 +00:00
Andrei Oprea
14419b8a91 Bug 1725131 - Remove messaging system code related to the Bookmark panel r=pdahiya,Mardak,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D122342
2021-08-19 13:17:13 +00:00
Mike Conley
3272561afd Bug 1721454 - Insert bookmarks before bottom Manage Bookmarks in Bookmarks Menu button. r=NeilDeakin
The CSS class panel-subview-footer-button was removed from the BMB_bookmarksShowAll
element in the Bookmarks Menu toolbar button, but this class is used by browser-places.js
to know where to insert the user's bookmarks in the structure of the menu.

Since this is the only menu that attachPlacesView attaches to, we can supply
the ID of the bottom Manage Bookmarks element, which will cause browserPlacesView.js
to insert the user's bookmarks above it.

Differential Revision: https://phabricator.services.mozilla.com/D121759
2021-08-04 18:53:45 +00:00
Nicholas Fason
f0a8082876 Bug 1702708 - Hyphenate places context menu attributes r=mak
Differential Revision: https://phabricator.services.mozilla.com/D121583
2021-08-03 14:03:03 +00:00
Neil Deakin
1e496a13ff Bug 1721047, fix tooltip not appearing on bookmarks sidebar, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D120271
2021-07-20 17:54:45 +00:00
Neil Deakin
b239aadf74 Bug 1717680, use popup.triggerNode instead of document.triggerNode when determining bookmarks tooltips, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D118521
2021-07-09 11:51:14 +00:00
Mike Conley
71051840e9 Bug 1700198 - Remove subviewbutton-iconic class from Bookmarks panel. r=mak
Depends on D118621

Differential Revision: https://phabricator.services.mozilla.com/D118622
2021-06-24 20:27:47 +00:00
Gijs Kruitbosch
d2f652ce40 Bug 1711519 - remove trivial gProton and gProtonDoorhangers checks, r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D116630
2021-06-03 11:41:54 +00:00
Neil Deakin
a3ff4212dd Bug 1696214, use moveToAnchor to position the tab and places tooltips so that the close and mute button tooltips appear correctly, r=jaws
This involves changing moveToAnchor to be allowed while the popup is showing. This change allows the buttons within the tab to use the normal algorithm for determining the tooltip position. This also fixes bug 1695900 so that tooltips for items in bookmarks menus also appear offset as well. Only the main tab and bookmarks on the toolbar appear aligned with the button's bottom edge.

Differential Revision: https://phabricator.services.mozilla.com/D115558
2021-05-31 13:07:35 +00:00
Harry Twyford
9753dc1d02 Bug 1706479 - Part 2 - Stop overriding tooltiptext on bookmark icon. r=adw
This resolves a failure in browser/base/content/test/pageActions-proton/browser_PageActions_bookmark.js. That test checks the tooltiptext on the bookmark button hbox. Before part 1 of this patch, the hbox always had one of the generic tooltiptexts "Bookmark Current Tab"/"Edit This Bookmark". This tooltiptext was set in updateBookmarkPageMenuItem. Then, in __updateStar, we set the tooltiptext on the <image> contained in the hbox to be "Bookmark this page ([shortcut])"/"Edit this bookmark ([shortcut])". Since the <image> filled the entire hbox, the tooltiptext on the hbox underneath was never seen. Since Part 1 of this patch moved the semantic meaning of the page action buttons from the <image> to the hbox, the tooltiptext containing the shortcut was also moved to the hbox. However, updateBookmarkPageMenuItem was overriding the shortcut tooltiptext with the generic text and thus browser_PageActions_bookmark.js was failing intermittently. The timing of when the tooltiptext was overridden was variable.

This patch stops setting the generic tooltiptext on the hbox altogether. I'm splitting this out into its own patch since I think it needs its own review. With Part 1 applied, when actually using the browser, the hbox had the tooltiptext with the shortcut. I'm not totally clear on why that was working despite updateBookmarkPageMenuItem overriding it, so I'd like to make sure this change is okay.

Depends on D114131

Differential Revision: https://phabricator.services.mozilla.com/D115485
2021-05-19 20:37:19 +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
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
Mark Banner
e6c0c15f14 Bug 1695011 - Wait for star ui initialisation to complete before continuing with tests to avoid intermittents. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D114734
2021-05-11 15:16:48 +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