girst [Sat, 19 Oct 2019 17:33:08 +0000 (19:33 +0200)]
fix 'eb' for fx71
browser.xhtml was restructured between firefox 69 and 71, and hints were
not displaying any more (they still worked, adding to the confusion). It
turns out that moving the hints-containert before #navigator-toolbox is
sufficient. But insertBefore()ing that element breaks Waterfox 56, as
this element does not exist there (which is a bit strange, as the docs
say, insertBefore should degrade gracefully to appendChild in such a
case). However, we can just insert it as the first element below
the #main-window element, which works a treat.
girst [Sat, 24 Aug 2019 00:55:41 +0000 (02:55 +0200)]
experimental custom-element support
Web Components / HTML5 Custom Elements were previously inaccessible to
VimFx. Examples of heavy users of this technology is about:logins
(Firefox 70) and bugs.chromium.org. Elements within the shadow DOM were
unable to be selected with hints mode.
VimFx' non-XUL DOM traversal routine was extended to not only search the
(regular) DOM, but also check each element if it contains an open shadow
DOM, and traverse it too. Interestingly, getElementsByTagName is not
defined by the DocumentOrShadowRoot class, only querySelectorAll.
Further, it appears that the native C++ function VimFx uses to send key
events to clickable elements is unable to be used inside the shadow DOM,
resulting in the error message below.
NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIDOMWindowUtils.dispatchDOMEventViaPresShell] utils.js:291
NOTE: This regression has made it obvious that VimFx uses isXULDocument
to make assumptions about the document it is looking at that no longer
hold when WebComponents are involved. More might be unearthed in the
future.
NOTE: the URL for an entry in about:logins is not clickable, as it is a
read-only text input with an onclick handler, instead of a link. That
edge case is not handled by utils.isTypingElement().
girst [Tue, 20 Aug 2019 17:38:10 +0000 (19:38 +0200)]
fix hints mode on about:addons and about:preferences in nightly 70
In Bug 1550801, all XUL documents were loaded as HTMLDocuments, which
caused the isXULDocument test to fail. The new test is modeled after a
snippet from devtools/.
This change caused hints mode to break in about:preferences and
about:addons, since (some of?) the de-XBL'd custom elements' <label>s
return the id (as string) when reading theLabelElement.control on a
label instead of an HTMLElement. VimFx passes this value to a function
that assumes the value has a .getClientRects() method.
Only these two pages were affected, since these are the only in-content
pages (other than about:downloads) in Firefox 70 that still have a .xul
document at the root.
girst [Thu, 15 Aug 2019 10:07:01 +0000 (12:07 +0200)]
Taking over maintainership
There's a new maintainer in town. While new features won't be developed,
VimFx will continue to work on Firefox Quantum and its derivatives for
the forseeable future.
girst [Mon, 5 Aug 2019 01:25:43 +0000 (03:25 +0200)]
Port settings page to a modern format
Inline-settings have been dropped in http://bugzil.la/1414406. At the
same time, the <setting> XBL binding has been removed. Here, we recreate
the settings page using (X)HTML opening in a new tab.
The XBL converter (bgrins/xbl-analysis@564f6e402a) was helpful in
reconstructing the <setting> element and the new aboutconfig.js has a
good observer example at the end (-> central@4d5f1517ef85).
girst [Thu, 1 Aug 2019 09:42:02 +0000 (11:42 +0200)]
fix hints mode and help popups
entering any of these modes adds an overlay above the <browser> element.
In mozilla69 the style property 'display: -moz-box' was removed from '*'
in minimal-xul.css. When the overlay was displayed without this
property, the <browser> would be resized to 25x25px to make room for the
overlay instead of displaying them on top of each other.
girst [Thu, 1 Aug 2019 09:06:27 +0000 (11:06 +0200)]
replace custom status panel with default one
In Mozilla's efforts to get rid of XBL[1] they changed the way the
status panel works. Up to Firefox 68, the changes meant that the panel
just didn't show up, but with Firefox 69 and onwards, it broke the
display of the browser. This change replaces the custom (secondary)
status bar and uses the main one for displaying infos and errors.
See also: bug[2] and changeset[3] of the removal of <statusbar>
When hitting esc a TypeError was shown in the browser console
(Ctrl-Shift-J), except when an element is fullscreened. The location of
the error (i.e. commands-frame.js:621) is only shown on special pages
(like about:* or chrome://), making the problem harder to locate.
see also: functionality introduced in commit ab17744
> TypeError: The expression cannot be converted to return the specified type. commands-frame.js:621
Remove dependency on non-standard Array.some() and Array.filter()
Also replaces the deprecated DOMQuad.bounds.
Firefox 70 will remove[1] non-standard Array generics[2][3]. These were
identified using the following shell pipeline:
cd VimFx/extension
grep -rn 'Array\.' | grep -v '\.isArray\|\.of\|\.from\|\.prototype'
girst [Sun, 12 May 2019 13:15:30 +0000 (15:15 +0200)]
fix hintsmode clicking in ff56, squash some exceptions
Some uses of the deprecated Array.func() syntax are, despite the browser
console telling us, not replacable by Array.prototype.func(). Also
silenced some exceptions that are expected.
girst [Sun, 12 May 2019 12:35:27 +0000 (14:35 +0200)]
partial fix for `eb'
the vbox#browser-panel element was removed and its children
(#navigator-toolbox, #content-deck, ...) are now direct descendants of
the <window> element.
This fix allows selecting and clicking on an item in the toolbar, but
any drop down menus that then appear aren't clickable.
依云 [Sun, 19 Nov 2017 16:16:56 +0000 (00:16 +0800)]
support for nsPrefBranch::{get,set}StringPref() (#901)
Firefox commit:
--8<--
Bug 1414096 (attempt 2) - Remove support for nsISupportsString values in nsPrefBranch::{get,set}ComplexValue(). r=florian.
Bug 1345294 introduced nsPrefBranch::{get,set}StringPref(), which allowed the
getting of utf8 strings from prefs, which previously required using
nsISupportsString with {get,set}ComplexValue. That bug also converted most
uses.
This patch finishes the job.
- It removes the nsISupportsString support.
- It converts existing code that relied on the nsISupportsString.
- It removes the lint that was set up to detect such uses of nsISupportsString.
Simon Lydell [Tue, 10 Jan 2017 06:53:00 +0000 (07:53 +0100)]
Scroll closest scrollable parent
If you click a tweet on Twitter, a modal with the tweet as well as
responses to it pop up. That modal can be scrollable if there are enough
responses. The container for the main tweet is focused. It feels very
natural that the _modal_ should scroll when using VimFx commands, not
the page behind it. That used not to be the case, but now is. This was
implemented by not just checking if the active element _itself_ is
scrollable, but also whether one of its _parents_ are scrollable, and
using the closest scrollable parent (if any).