Commit Graph

58 Commits

Author SHA1 Message Date
Gijs Kruitbosch
d10e66f2d7 Bug 1663173 - disable commands that don't need to be enabled in customize mode, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D89289
2020-09-11 20:40:28 +00:00
Razvan Maries
0b36c3342a Backed out changeset ffe1c9f9f9df (bug 1663173) for multiple bc perma failures. CLOSED TREE 2020-09-10 01:46:46 +03:00
Gijs Kruitbosch
7259b3e087 Bug 1663173 - disable commands that don't need to be enabled in customize mode, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D89289
2020-09-09 20:02:22 +00:00
Dão Gottwald
8ecbcda93d Bug 1610475 - Move URLBarSetURI to UrlbarInput. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D65535
2020-03-06 16:27:16 +00:00
Dão Gottwald
75152b0a25 Bug 1586889 - Stop re-initializing the urlbar when exiting customize mode. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D49405
2019-10-17 09:03:12 +00:00
Dão Gottwald
0de1028cb3 Bug 1580248 - Fix urlbar height and vertical alignment in compact mode. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D45555
2019-09-11 22:44:41 +00:00
Victor Porof
a3641f184a Bug 1561435 - Format browser/base/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36041
2019-07-05 09:48:57 +02:00
Drew Willcoxon
09c4757673 Bug 1545742 - Quantumbar: Remove the proper nsIController on uninit and customize start so that left/right arrow and home/end keys work after exiting customize mode. r=mak
When UrlbarInput.uninit is called after customize mode ends, uninit calls this.inputField.controllers.removeControllerAt(0), which is supposed to remove the input's CopyCutController inserted in the constructor. But the controller at index 0 at that point is not the CopyCutController. Instead it's some built-in controller that supports these commands (at least these): cmd_charPrevious, cmd_charPrevious, cmd_beginLine, cmd_endLine. (Verified by adding logging to nsXULControllers::GetControllerForCommand.) That's why arrow left/right and home/end don't work after ending customize mode.

The problem is that this.inputField.controllers in the constructor and this.inputField.controllers in uninit (when customize mode ends) are not the same. I wasn't able to track down why, but I'm guessing that the textbox or something in its state is being reset or cloned when customized mode ends or maybe right after it starts. The CopyCutController isn't in the controllers array at all on uninit. (Verified by adding support for cmd_adw and iterating through the controllers array, looking for a controller supporting cmd_adw.)

Note that urlbarBindings.xml has a try-catch around removeController(), I'm guessing for what turns out to be this reason: https://searchfox.org/mozilla-central/rev/7944190ad1668a94223b950a19f1fffe8662d6b8/browser/base/content/urlbarBindings.xml#190

However, CopyCutController *is* in the controllers array when customize mode starts. So I added a new gURLBarHandler.customizeStart method that calls a new UrlbarInput.removeCopyCutController method.

Other things I tried or thought of doing:

Call gURLBarHandler._reset on customize start instead of end. Problem with that is that the UrlbarInput ends up getting immediately recreated because some other parts of the browser access gURLBar at that time. (Of course I replaced the `gURLBar = this.urlbar` assignment in _reset with another lazy getter definition.)

Just don't worry about removing CopyCutController at all. That seems bad because then we'd leak it, unless the controller is removed or the controllers array is emptied at some point by XUL, and I'm not at all certain about that. (Although I guess this is effectively what awesomebar does, given the link above!)

Differential Revision: https://phabricator.services.mozilla.com/D29613
2019-05-03 16:03:00 +00:00
Marco Bonardo
32fff4fe37 Bug 1523332 - Allow to instant switch on and off the Quantum Bar. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D20534
2019-03-01 14:52:17 +00:00
Gijs Kruitbosch
51f90d5665 Bug 1499236 - remove customizableui menubar binding, r=Felipe
Differential Revision: https://phabricator.services.mozilla.com/D8901
2018-10-17 22:50:40 +00:00
Dão Gottwald
b9220c5005 Bug 1496718 - Stop clobbering gURLBar when exiting customize mode. r=gijs 2018-10-05 18:35:46 +02:00
Mark Banner
462116b7f9 Bug 1486739 - Add missing dangling commas in browser/, services/, taskcluster/ and toolkit/. r=mossop
Automatic changes by ESLint, except for manual corrections for .xml files.

Differential Revision: https://phabricator.services.mozilla.com/D4439
2018-08-31 05:59:17 +00:00
Brian Grinstead
1c86f46ecd Bug 1479125 - Migrate calls that expect an element to be returned to use element variation firstChild etc to firstElementChild etc;r=Paolo
This allows the JS to work in HTML documents, where whitespace is preserved. In XUL
documents, whitespace is ignored when parsing so text nodes are generally not returned.

The following changes were made, with manual cleanups as necessary (i.e. when firstChild actually
refers to a text node, or when firstChild is used in a loop to empty out an element):

  firstChild->firstElementChild
  lastChild->lastElementChild
  nextSibling->nextElementSibling
  previousSibling->previousElementSibling
  childNodes->children

MozReview-Commit-ID: 95NQ8syBhYw
2018-08-08 15:22:53 -07:00
Axel Hecht
28138483f9 Bug 721211: consolidate home page retrieval code, make it support non-localized prefs, r=jaws
Also changes the tooltip on the home button to be independent of the URLs
it opens, per dolske.

Some tests explicitly set browser.startup.homepage, but only through
SpecialPowers.putPrefEnv. That's a good compromise, given the extra
functionality there.

MozReview-Commit-ID: FPLxzi3jQAP
2018-05-28 12:38:01 +02:00
Dan Banner
5af4450327 Bug 1408777 - Automatically fix instances of missing semicolons in the tree. r=Standard8
MozReview-Commit-ID: Jm8BRgt6mIv
2017-10-15 20:50:39 +01:00
Gijs Kruitbosch
d48e2eaf65 Bug 1397447 - make downloads button autohide by default, r=mak
MozReview-Commit-ID: E9izQpa4fFZ
2017-09-08 14:16:36 +01:00
Jared Wein
630ee48676 Bug 1391146 - Don't run uninit/init on CombinedStopReload when entering/exiting customize mode since we don't have the joined stop/reload and location bar anymore. r=Felipe
MozReview-Commit-ID: 9JjMEcVkGvo
2017-08-17 15:14:12 -04:00
Dão Gottwald
4507460c0a Bug 1387084 - Use instant scroll behavior when doing pixel scrolling. r=Gijs
Touchmove and wheel events are sent frequently enough that smooth scroll behavior
prevents the expected pixel distance from being reached before the next event.

Also replace aSmoothScroll parameters with aInstant to better reflect how this
works: its purpose is to force instant scrolling, whereas omitting it falls back
to "auto" (which may mean instant or smooth depending on different factors).

The ensureElementIsVisible call from browser-customization.js can go away as
customize mode doesn't add padding around the window anymore.

Finally, remove the unused scrollPosition and scrollPaddingRect properties.

MozReview-Commit-ID: 3Ac7g6zZ0hW
2017-08-05 10:12:38 +02:00
Gijs Kruitbosch
d485cb5fac Bug 1354117 - remove wrap handling for the bookmarks toolbar button and tests verifying it, r=johannh
MozReview-Commit-ID: CeSGIQrDPpw
2017-07-31 21:52:06 +01:00
Dão Gottwald
01ddaaba1d Bug 1386594 - Remove XULBrowserWindow.init. r=johannh
MozReview-Commit-ID: 6uWcb9FMdNE
2017-08-02 13:57:18 +02:00
Florian Quèze
441e30cff4 Bug 1381853 - lazy load browser-customization.js into the browser window, r=mconley. 2017-07-23 00:17:57 +02:00
Jared Wein
e3149c378f Bug 1325464 - Enable object-shorthand rule and run 'mach eslint --fix' with the rule enabled. r=MattN
MozReview-Commit-ID: 7E7LPorrEje
2016-12-29 18:34:54 -05:00
Wes Kocher
2d7553dcfd Backed out 3 changesets (bug 1325464) for xpcshell failures a=backout
Backed out changeset 562ddc32cc21 (bug 1325464)
Backed out changeset cd10db6087dd (bug 1325464)
Backed out changeset 4079437c4648 (bug 1325464)
2016-12-29 14:05:44 -08:00
Jared Wein
34e228f767 Bug 1325464 - Enable object-shorthand rule and run 'mach eslint --fix' with the rule enabled. r=MattN
MozReview-Commit-ID: 8WoGr8i6oCR
2016-12-29 15:20:47 -05:00
Jared Wein
4518d81cb5 Bug 1292042 - Enable the keyword-spacing rule for eslint. Most of this patch was autogenerated by 'eslint --fix'. Files with .xml extension needed to be changed by hand due to limitations of custom plugin. r=markh
MozReview-Commit-ID: EMjJ3yWt9Wt
2016-08-04 03:28:58 -04:00
malayaleecoder
638ea233f5 Bug 1254496 - Remove gURLBar null-checks. r=dao 2016-03-10 23:15:49 +05:30
Felipe Gomes
ea7486e94e Bug 1228655 - Remove ifdefs for gEditUIVisible. r=Gijs 2015-12-01 20:05:36 -02:00
Felipe Gomes
e5ea10c3ed Bug 1228627 - Remove #includes from browser.js. r=Gijs 2015-11-30 12:13:57 -02:00
Paolo Amadini
b2ccf64558 Bug 1206244 - Replace globe with the "i" icon, keep separate lock for secure pages. r=past 2015-11-11 15:52:56 +00:00
Shu-yu Guo
37989840cd Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00
Dão Gottwald
541187e3b5 Bug 1182102 - Stop setting the bookmark-item class on the home button or the bookmarks button when moving them to the bookmarks toolbar. r=gijs 2015-08-17 15:51:22 +02:00
Jim Blandy
39dc0c6097 Bug 914753: Make Emacs file variable header lines correct, or at least consistent. DONTBUILD r=ehsan
The -*- file variable lines -*- establish per-file settings that Emacs will
pick up. This patch makes the following changes to those lines (and touches
nothing else):

 - Never set the buffer's mode.

   Years ago, Emacs did not have a good JavaScript mode, so it made sense
   to use Java or C++ mode in .js files. However, Emacs has had js-mode for
   years now; it's perfectly serviceable, and is available and enabled by
   default in all major Emacs packagings.

   Selecting a mode in the -*- file variable line -*- is almost always the
   wrong thing to do anyway. It overrides Emacs's default choice, which is
   (now) reasonable; and even worse, it overrides settings the user might
   have made in their '.emacs' file for that file extension. It's only
   useful when there's something specific about that particular file that
   makes a particular mode appropriate.

 - Correctly propagate settings that establish the correct indentation
   level for this file: c-basic-offset and js2-basic-offset should be
   js-indent-level. Whatever value they're given should be preserved;
   different parts of our tree use different indentation styles.

 - We don't use tabs in Mozilla JS code. Always set indent-tabs-mode: nil.
   Remove tab-width: settings, at least in files that don't contain tab
   characters.

 - Remove js2-mode settings that belong in the user's .emacs file, like
   js2-skip-preprocessor-directives.
2014-06-24 22:12:07 -07:00
Dão Gottwald
507a3f67a2 Bug 997131 - Simplify conditional forward button CSS by making the forward button a direct sibling of the location bar. r=mdeboer 2014-04-23 19:26:32 +02:00
Gijs Kruitbosch
796f06e74b Bug 969780 - Australis - places controller gets lost if bookmarks button is moved to overflow or moved outside of customize mode, r=mak 2014-02-18 18:29:51 +00:00
Gijs Kruitbosch
5e297d91b6 Bug 964217 - fix search item insertion in Australis customization mode, r=Unfocused 2014-02-03 10:48:21 +00:00
Gijs Kruitbosch
f7951ba858 Bug 964887 - fix menu in Australis to say 'Edit this bookmark' for pages which have already been bookmarked, r=mak 2014-01-31 23:21:41 +00:00
Gijs Kruitbosch
259849e60c Bug 944947 - update bookmarks toolbar button styling some more for Australis, r=jaws 2014-01-18 01:43:21 +01:00
Marco Bonardo
e828c75ed3 Bug 958413 - [Australis] Bookmarks menu button dropdown icon has the wrong aspect ratio when placed in the Bookmarks Toolbar. r=Gijs 2014-01-22 10:42:51 +01:00
Gijs Kruitbosch
35ced8e81d Bug 889120 - Australis' customize tab gets mixed up with other tab, r=jaws 2014-01-10 15:54:48 +00:00
Carsten "Tomcat" Book
4f7991fb32 Backed out changeset d614fa6b53b2 (bug 889120) [australis] for suspicion of pgo perma-orange 2014-01-16 09:44:49 +01:00
Gijs Kruitbosch
8aab6b455c Bug 889120 - Australis' customize tab gets mixed up with other tab, r=jaws 2014-01-10 15:54:48 +00:00
Jared Wein
1e36e2765a Bug 940052 - [Australis] Customize tab gets truncated after entering customization mode. r=mconley 2013-12-21 01:17:02 -05:00
Gijs Kruitbosch
e78c82df06 Bug 700363 - [Australis] Hide conditional forward button permanently when not in use to prevent accidental glitches. r=Unfocused,jaws 2013-12-17 13:43:50 -05:00
Matthew Noorenberghe
0b9dc83cc5 Merge mozilla-central to UX 2013-09-06 17:54:20 -07:00
Dão Gottwald
9bab1d59b7 Bug 899587 - "Remove the now-unneeded setUrlAndSearchBarWidthForConditionalForwardButton hack" r=jaws 2013-07-30 08:09:00 +02:00
Gijs Kruitbosch
d62b69a3c9 Backed out changeset 25c0cb82cae3 for getting the email address wrong 2013-07-30 17:36:51 +02:00
Dão Gottwald
9ee4c199a6 Bug 899587 - "Remove the now-unneeded setUrlAndSearchBarWidthForConditionalForwardButton hack" r=jaws 2013-07-30 08:09:00 +02:00
Mike de Boer
c2b421b059 Bug 755598: Merge Back/ Forward/ URLBar/ Stop/ Reload/ Go buttons into 1 toolbaritem. r=dao 2013-07-18 18:46:28 +02:00
Jared Wein
d0ddf1edd1 Bug 888571 - Don't load CustomizeMode.jsm upon startup. r=MattN,dao 2013-06-29 04:25:56 -04:00
Jared Wein
4dbd787205 Backed out changeset ee81f5bac27a (bug 888571) 2013-06-30 08:36:00 -04:00