Commit e37b97e4 authored by Igor Oliveira's avatar Igor Oliveira Committed by Arthur Edelstein
Browse files

Bug 26100: Update about:tor code after changes in the resource and js

code

- Move all the resource files to the same directory and change the chrome.manifest
file to allow them to be accessible by the chrome.[1]

- jsversion.h was removed, we don't need to specify the JS version anymore.[2]

- Since Torbutton has now logic to load the default preferences and we don't
know when a string is a complex data, for the sake of simplicity, we are
now retiring non-localized.properties and hard coding the about:tor in the
preferences file.

- Use tabbrowser-initialBrowser instead of content

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=863246
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1440043
parent 5905b318
......@@ -6,6 +6,7 @@ overlay chrome://messenger/content/messengercompose/messengercompose.xul chrome:
overlay about:addons chrome://torbutton/content/torbutton-extensions.xul
overlay chrome://mozapps/content/extensions/extensions.xul chrome://torbutton/content/torbutton-extensions.xul
resource torbutton ./
resource torbutton-assets resource://torbutton/chrome/skin/ contentaccessible=yes
# browser branding
override chrome://branding/locale/brand.dtd chrome://torbutton/locale/brand.dtd
......
......@@ -20,8 +20,8 @@
<head>
<title>&aboutTor.title;</title>
<link rel="stylesheet" type="text/css" media="all"
href="resource://torbutton/chrome/skin/aboutTor.css"/>
<script type="text/javascript;version=1.7">
href="resource://torbutton-assets/aboutTor.css"/>
<script type="text/javascript">
<![CDATA[
window.addEventListener("pageshow", function() {
let evt = new CustomEvent("AboutTorLoad", { bubbles: true });
......
# This file must be located in a subdirectory named "locale" so that
# about:config will display the correct value for browser.startup.homepage.
# See fetchPref() inside toolkit/components/viewconfig/content/config.js
# Default home page
browser.startup.homepage=about:tor
......@@ -664,7 +664,7 @@ function torbutton_get_toolbarbutton_xpos() {
let tbItem = torbutton_get_toolbutton();
if (tbItem) {
let tbItemRect = tbItem.getBoundingClientRect();
let contentElem = document.getElementById("content");
let contentElem = document.getElementById("tabbrowser-initialBrowser");
let contentRect = contentElem.getBoundingClientRect();
if (tbItemRect.top < contentRect.top) {
tbXpos = tbItemRect.left + (tbItemRect.width / 2.0) - contentRect.left;
......
......@@ -59,7 +59,7 @@ body:not([initialized]) {
}
body[toron] #torstatus-image {
background-image: url('chrome://torbutton/content/aboutTor/tor-on.png');
background-image: url('chrome://torbutton/skin/tor-on.png');
}
#torstatus-image {
......@@ -68,7 +68,7 @@ body[toron] #torstatus-image {
left: 85px;
height: 128px;
width: 128px;
background-image: url('chrome://torbutton/content/aboutTor/tor-off.png');
background-image: url('chrome://torbutton/skin/tor-off.png');
background-repeat: no-repeat;
background-position: center;
z-index: -1;
......@@ -84,23 +84,23 @@ body[toron] #torstatus-image {
top: 4px;
width: 30px;
height: 36px;
background-image: url('chrome://torbutton/content/aboutTor/onionArrow-short.png');
background-image: url('chrome://torbutton/skin/onionArrow-short.png');
}
#toolbarIconArrowVertExtension, #toolbarIconArrowHorzExtension {
width: 11px;
height: 11px;
background-image: url('chrome://torbutton/content/aboutTor/onionArrow-extension.png');
background-image: url('chrome://torbutton/skin/onionArrow-extension.png');
}
#toolbarIconArrowBend {
width: 22px;
height: 22px;
background-image: url('chrome://torbutton/content/aboutTor/onionArrow-leftBend.png');
background-image: url('chrome://torbutton/skin/onionArrow-leftBend.png');
}
#toolbarIconArrowBend[pos="right"] {
background-image: url('chrome://torbutton/content/aboutTor/onionArrow-rightBend.png');
background-image: url('chrome://torbutton/skin/onionArrow-rightBend.png');
}
a {
......@@ -288,7 +288,7 @@ body .top div.hideIfTorIsUpToDate h1 {
height: 34px;
width: 33px;
border: 0;
background: url('chrome://torbutton/content/aboutTor/search.png') no-repeat top left;
background: url('chrome://torbutton/skin/search.png') no-repeat top left;
cursor: pointer;
}
......
......@@ -53,7 +53,7 @@ pref("extensions.torbutton.confirm_plugins", true);
pref("extensions.torbutton.confirm_newnym", true);
// Browser home page:
pref("browser.startup.homepage", "chrome://torbutton/content/locale/non-localized.properties");
pref("browser.startup.homepage", "about:tor");
// This pref specifies an ad-hoc "version" for various pref update hacks we need to do
pref("extensions.torbutton.pref_fixup_version", 0);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment