Skip to content

Commit

Permalink
restored old context menus, updated 7 style and old about:config
Browse files Browse the repository at this point in the history
  • Loading branch information
Erizur committed Nov 17, 2024
1 parent 91bc0ff commit 159cc4d
Show file tree
Hide file tree
Showing 33 changed files with 1,154 additions and 2,472 deletions.
2 changes: 2 additions & 0 deletions browser/base/content/aboutDialog.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
rel="stylesheet"
href="chrome://branding/content/aboutDialog.css"
/>
<html:link rel="ee-prefetch" href="chrome://branding/content/rihito-marble.png">
<html:link rel="ee-prefetch2x" href="chrome://branding/content/[email protected]">

<html:link rel="localization" href="branding/brand.ftl"/>
<html:link rel="localization" href="browser/aboutDialog.ftl"/>
Expand Down
4 changes: 4 additions & 0 deletions browser/base/content/browser-context.inc
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@
hidden="true"
/>
<menuseparator id="passwordmgr-items-separator"/>
<menuseparator id="context-sep-viewbgimage"/>
<menuitem id="context-viewbgimage"
data-l10n-id="main-context-menu-image-view-background"
oncommand="gContextMenu.viewMedia(event);"/>
<menuitem id="context-undo"
data-l10n-id="text-action-undo"
command="cmd_undo"/>
Expand Down
1 change: 1 addition & 0 deletions browser/base/content/browser.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
scrolling="false"
persist="screenX screenY width height sizemode"
data-l10n-sync="true">
firefoxviewhidden="true">
<head>
<!-- The "global.css" stylesheet is imported first to allow other stylesheets to
override rules using selectors with the same specificity. This applies to
Expand Down
31 changes: 27 additions & 4 deletions browser/base/content/nsContextMenu.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,33 @@ export class nsContextMenu {
!this.onAudio &&
!this.onLink &&
!this.onTextInput;
this.showItem("context-viewimage", showViewImage || showBGImage);
this.showItem("context-viewimage", showViewImage);

var shouldShow = !(
this.isContentSelected ||
this.onImage ||
this.onCanvas ||
this.onVideo ||
this.onAudio ||
this.onLink ||
this.onTextInput
);

this.showItem(
"context-viewbgimage",
shouldShow &&
!this.hasMultipleBGImages &&
!this.inSyntheticDoc &&
!this.inPDFViewer
);
this.showItem(
"context-sep-viewbgimage",
shouldShow &&
!this.hasMultipleBGImages &&
!this.inSyntheticDoc &&
!this.inPDFViewer
);
document.getElementById("context-viewbgimage").disabled = !this.hasBGImage;

// Save image depends on having loaded its content.
this.showItem(
Expand Down Expand Up @@ -1720,9 +1746,6 @@ export class nsContextMenu {
// Change current window to the URL of the image, video, or audio.
viewMedia(e) {
let where = lazy.BrowserUtils.whereToOpenLink(e, false, false);
if (where == "current") {
where = "tab";
}
let referrerInfo = this.contentData.referrerInfo;
let systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
if (this.onCanvas) {
Expand Down
2 changes: 1 addition & 1 deletion browser/config/version_display.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
132.0.3b1
132.0.3b2
8 changes: 6 additions & 2 deletions browser/locales/en-US/browser/browserContext.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,15 @@ main-context-menu-image-reload =
.accesskey = R
main-context-menu-image-view-new-tab =
.label = Open Image in New Tab
.label = View Image
.accesskey = I
main-context-menu-image-view-background =
.label = View Background Image
.accesskey = w
main-context-menu-video-view-new-tab =
.label = Open Video in New Tab
.label = View Video
.accesskey = i
main-context-menu-image-copy =
Expand Down
6 changes: 3 additions & 3 deletions browser/themes/windows/browser-aero.css
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@

/* The borders on the glass frame are ours, and inside #browser, and on
* win7 we want to make sure they are "glassy", so we can't use #browser
* as the exclude-glass container. We use #appcontent instead. */
#appcontent {
* as the exclude-glass container. We use #tabbrowser-tabbox instead. */
#tabbrowser-tabbox {
appearance: auto;
-moz-default-appearance: -moz-win-exclude-glass;
}
Expand Down Expand Up @@ -295,7 +295,7 @@
color: white;
}

#appcontent:not([lwtheme]) {
#tabbrowser-tabbox:not([lwtheme]) {
background-color: -moz-dialog;
}

Expand Down
2 changes: 1 addition & 1 deletion docshell/base/nsAboutRedirector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static const RedirEntry kRedirMap[] = {
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::ALLOW_SCRIPT},
#ifndef MOZ_WIDGET_ANDROID
{"config", "chrome://global/content/aboutconfig/aboutconfig.html",
{"config", "chrome://global/content/config.xhtml",
nsIAboutModule::IS_SECURE_CHROME_UI},
#else
{"config", "chrome://geckoview/content/config.xhtml",
Expand Down
Loading

0 comments on commit 159cc4d

Please sign in to comment.