The owner: "ensure that all software patent and trademark licenses in the repo are being respected". A read-only audit of what the packages carry found no blocker and these gaps, all closed here (the record is impl-review-findings-6.md, "Licensing audit"): - NOTICE names the runtime the engine ships with: glibc 2.23 as crosstool-NG modifies it (LGPL-2.1), the GCC 9.4.0 runtime (GPL-3.0 with the Runtime Library Exception), and the eight Debian jessie libraries, with the FreeType disclaimer, Lato, the hyphenation patterns, and where the corresponding source is. licenses/ gains LGPL-2.1, GPL-3.0 and the GCC exception from the pinned tarballs and Debian's copyright files from the sysroot; every package ships all of licenses/ and CREDITS.md, checked in the payload preflight. - NOTICE names the modified engine's source (the fork, branch, pinned commit, base release, the patches), as MPL-2.0 3.2 asks. - README and LICENSE no longer call the packages Apache-2.0 and MPL-2.0 only; the dead licensing.shtml reference is replaced by the UXP LICENSE and TRADEMARK files and Moonchild's legal and redist pages. - Apache-2.0 4(b) change notices on the 29 HP-derived files changed since import. - A drawn magnifier is the DuckDuckGo engines' icon; Google's logo is Google's only; the unused Bing logo is gone. - The engine's services-sync.js defaults pointed at Moonchild's Sync, key server and add-on host: blanked at bundle time, checked. - The "Blazer" keyword, the Goanna-mark tagline, a stray screenshot and a .bak dropped; the HP SDK's terms stated where it is downloaded; CREDITS records the logo's origin and the screenshot strip's licence. Deferred to the next engine build: about:credits' URL and --disable-ffmpeg (the system-libavcodec path is dead on the device). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XM9EDSp83ZFRhggY4RCT9X
105 lines
3.6 KiB
JavaScript
105 lines
3.6 KiB
JavaScript
// Copyright 2012 Hewlett-Packard Development Company, L.P.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
// Modified by the Jihad Browser project (2026), per Apache-2.0 section 4(b): this file differs from
|
|
// HP's isis-browser original. The changes are this repository's git history for this file.
|
|
|
|
enyo.kind({
|
|
name: "BrowserContextMenu",
|
|
kind: "PopupSelect",
|
|
published: {
|
|
view: ""
|
|
},
|
|
events: {
|
|
onItemClick: ""
|
|
},
|
|
tapInfo: {link: true, image: true},
|
|
linkItems: [
|
|
{caption: $L("Open In New Card"), value:"newCardClick"},
|
|
{caption: $L("Share Link"), value:"shareLinkClick"},
|
|
{caption: $L("Copy URL"), value:"copyLinkClick"}
|
|
],
|
|
imageItems: [
|
|
{caption: $L("Copy To Photos"), value: "copyToPhotosClick"},
|
|
{caption: $L("Share Image"), value: "shareImageClick"},
|
|
{caption: $L("Set Wallpaper"), value: "setWallpaperClick"}
|
|
],
|
|
openAtTap: function(inEvent, inTapInfo) {
|
|
this.tapPosition = {left: inEvent.pageX, top: inEvent.pageY};
|
|
this.tapInfo = inTapInfo;
|
|
if (!this.view) {
|
|
return;
|
|
}
|
|
var items = this.makeItems();
|
|
if (items) {
|
|
this.setItems(items);
|
|
this.openNear(this.tapPosition);
|
|
}
|
|
},
|
|
//* The long-press menu on anything that is not a link or an image: what a desktop browser
|
|
//* offers on a right-click. `inState` is what the engine found under the finger —
|
|
//* {editable, selected} — plus what this card knows: {canGoBack, canGoForward}.
|
|
//* The values are method names on the Browser kind, as for links and images.
|
|
openForPage: function(inPosition, inState) {
|
|
var s = inState || {}, items = [];
|
|
if (s.editable) {
|
|
// A field that takes no edits (read-only, disabled) is for copying only.
|
|
if (!s.readOnly) {
|
|
items.push({caption: $L("Paste"), value: "pagePasteClick"});
|
|
}
|
|
if (s.selected) {
|
|
items.push({caption: $L("Copy"), value: "pageCopyClick"});
|
|
if (!s.readOnly) {
|
|
items.push({caption: $L("Cut"), value: "pageCutClick"});
|
|
}
|
|
}
|
|
items.push({caption: $L("Select All"), value: "pageSelectAllClick"});
|
|
} else {
|
|
if (s.selected) {
|
|
items.push({caption: $L("Copy"), value: "pageCopyClick"});
|
|
}
|
|
items.push({caption: $L("Select All"), value: "pageSelectAllClick"});
|
|
if (s.canGoBack) {
|
|
items.push({caption: $L("Back"), value: "goBack"});
|
|
}
|
|
if (s.canGoForward) {
|
|
items.push({caption: $L("Forward"), value: "goForward"});
|
|
}
|
|
items.push({caption: $L("Reload"), value: "reloadClick"});
|
|
items.push({caption: $L("Add Bookmark"), value: "pageBookmarkClick"});
|
|
items.push({caption: $L("Find on Page"), value: "showFind"});
|
|
}
|
|
this.tapPosition = inPosition;
|
|
this.tapInfo = {};
|
|
this.setItems(items);
|
|
this.openNear(this.tapPosition);
|
|
},
|
|
makeItems: function() {
|
|
var items;
|
|
if (this.tapInfo.isLink) {
|
|
var uri = enyo.uri.parseUri(this.tapInfo.linkUrl);
|
|
if (uri.scheme && enyo.uri.isValidScheme(uri)) {
|
|
items = [].concat(this.linkItems);
|
|
}
|
|
}
|
|
if (this.tapInfo.isImage) {
|
|
items = (items || []).concat(this.imageItems);
|
|
}
|
|
return items;
|
|
},
|
|
menuItemClick: function(inSender) {
|
|
this.doItemClick(inSender.getValue(), this.tapInfo, this.tapPosition);
|
|
this.close();
|
|
}
|
|
});
|