Release Vulpes OS 2.7 Preview 25 for Desktop, Android and Pixel 3a

This commit is contained in:
OverSu 2026-11-28 12:20:19 +01:00
commit 3a1fba4efe
2 changed files with 1301 additions and 196 deletions

View file

@ -3,7 +3,11 @@ import {frameUnobscured} from 'resource://vulpes/services/view-visibility.mjs';
import {requestMediaPermission} from 'resource://vulpes/services/media-permission.mjs';
export class VulpesChild extends JSWindowActorChild {
handleEvent(event) {
if(['focusin','pointerdown','click'].includes(event.type)) {
if (event.type === 'vulpes-address-focus' &&
(this.browsingContext.parent || this.document.location.origin !== 'http://system.localhost:8765' ||
this.document.hidden || event.target !== this.document.activeElement ||
!event.target.matches?.('#rocketbar.active #rocketbar-input'))) return;
if(['focusin','pointerdown','click','vulpes-address-focus'].includes(event.type)) {
if(this._editor?.editing) return;
if(!Services.cpmm.sharedData.get('vulpes:native-input')) return;
let element=event.target;

View file

@ -3,9 +3,25 @@ import {InputEditor} from 'resource://vulpes/services/input-editor.mjs';
// Web pages may edit their focused field, but receive no Gaia service bridge.
export class WebInputChild extends JSWindowActorChild {
handleEvent(event) {
if (!Services.cpmm.sharedData.get('vulpes:native-input') || this.editor?.editing) return;
if (this.editor?.editing) return;
const contexts = Services.cpmm.sharedData.get('vulpes:host-contexts') || [];
if (!contexts.includes(this.browsingContext.top.id)) return;
// The standalone host has no Firefox tab strip for target=_blank. Use
// the current web view so Gecko retains its normal link security checks.
if (event.type === 'click' && event.isTrusted && this.browsingContext === this.browsingContext.top) {
const link = event.composedPath().find(node => node.localName === 'a' && node.href);
const target = link?.getAttribute('target') ?? this.document.querySelector('base[target]')?.target;
if (link && target?.toLowerCase() === '_blank' && /^https?:/.test(link.href) && !link.hasAttribute('download')) {
const original = link.getAttribute('target');
link.target = '_self';
this.contentWindow.setTimeout(() => {
if (link.target !== '_self') return;
if (original === null) link.removeAttribute('target');
else link.target = original;
}, 0);
}
}
if (!Services.cpmm.sharedData.get('vulpes:native-input')) return;
// Standalone web views have no Firefox tabbrowser to focus their embedder.
// Keep Gecko's picker focus checks intact by activating only a touched view.
if (event.isTrusted && ['pointerdown','mousedown','click'].includes(event.type))