Merge mozilla-central and mozilla-inbound

This commit is contained in:
Marco Bonardo 2011-07-22 15:31:14 +02:00
Родитель 9fb9c81afb afaec7fef5
Коммит 5856c10225
18 изменённых файлов: 442 добавлений и 145 удалений

Просмотреть файл

@ -330,6 +330,7 @@
</popupset>
<textbox id="scratchpad-textbox"
class="monospace"
multiline="true"
flex="1"
context="scratchpad-text-popup"

Просмотреть файл

@ -260,6 +260,9 @@ _BROWSER_FILES = \
browser_addon_bar_shortcut.js \
browser_addon_bar_aomlistener.js \
test_bug628179.html \
browser_wyciwyg_urlbarCopying.js \
test_wyciwyg_copying.html \
authenticate.sjs \
browser_minimize.js \
$(NULL)

Просмотреть файл

@ -0,0 +1,205 @@
function handleRequest(request, response)
{
try {
reallyHandleRequest(request, response);
} catch (e) {
response.setStatusLine("1.0", 200, "AlmostOK");
response.write("Error handling request: " + e);
}
}
function reallyHandleRequest(request, response) {
var match;
var requestAuth = true, requestProxyAuth = true;
// Allow the caller to drive how authentication is processed via the query.
// Eg, http://localhost:8888/authenticate.sjs?user=foo&realm=bar
var query = request.queryString;
var expected_user = "", expected_pass = "", realm = "mochitest";
var proxy_expected_user = "", proxy_expected_pass = "", proxy_realm = "mochi-proxy";
var huge = false, plugin = false;
var authHeaderCount = 1;
// user=xxx
match = /user=([^&]*)/.exec(query);
if (match)
expected_user = match[1];
// pass=xxx
match = /pass=([^&]*)/.exec(query);
if (match)
expected_pass = match[1];
// realm=xxx
match = /realm=([^&]*)/.exec(query);
if (match)
realm = match[1];
// proxy_user=xxx
match = /proxy_user=([^&]*)/.exec(query);
if (match)
proxy_expected_user = match[1];
// proxy_pass=xxx
match = /proxy_pass=([^&]*)/.exec(query);
if (match)
proxy_expected_pass = match[1];
// proxy_realm=xxx
match = /proxy_realm=([^&]*)/.exec(query);
if (match)
proxy_realm = match[1];
// huge=1
match = /huge=1/.exec(query);
if (match)
huge = true;
// plugin=1
match = /plugin=1/.exec(query);
if (match)
plugin = true;
// multiple=1
match = /multiple=([^&]*)/.exec(query);
if (match)
authHeaderCount = match[1]+0;
// Look for an authentication header, if any, in the request.
//
// EG: Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
//
// This test only supports Basic auth. The value sent by the client is
// "username:password", obscured with base64 encoding.
var actual_user = "", actual_pass = "", authHeader;
if (request.hasHeader("Authorization")) {
authHeader = request.getHeader("Authorization");
match = /Basic (.+)/.exec(authHeader);
if (match.length != 2)
throw "Couldn't parse auth header: " + authHeader;
var userpass = base64ToString(match[1]); // no atob() :-(
match = /(.*):(.*)/.exec(userpass);
if (match.length != 3)
throw "Couldn't decode auth header: " + userpass;
actual_user = match[1];
actual_pass = match[2];
}
var proxy_actual_user = "", proxy_actual_pass = "";
if (request.hasHeader("Proxy-Authorization")) {
authHeader = request.getHeader("Proxy-Authorization");
match = /Basic (.+)/.exec(authHeader);
if (match.length != 2)
throw "Couldn't parse auth header: " + authHeader;
var userpass = base64ToString(match[1]); // no atob() :-(
match = /(.*):(.*)/.exec(userpass);
if (match.length != 3)
throw "Couldn't decode auth header: " + userpass;
proxy_actual_user = match[1];
proxy_actual_pass = match[2];
}
// Don't request authentication if the credentials we got were what we
// expected.
if (expected_user == actual_user &&
expected_pass == actual_pass) {
requestAuth = false;
}
if (proxy_expected_user == proxy_actual_user &&
proxy_expected_pass == proxy_actual_pass) {
requestProxyAuth = false;
}
if (requestProxyAuth) {
response.setStatusLine("1.0", 407, "Proxy authentication required");
for (i = 0; i < authHeaderCount; ++i)
response.setHeader("Proxy-Authenticate", "basic realm=\"" + proxy_realm + "\"", true);
} else if (requestAuth) {
response.setStatusLine("1.0", 401, "Authentication required");
for (i = 0; i < authHeaderCount; ++i)
response.setHeader("WWW-Authenticate", "basic realm=\"" + realm + "\"", true);
} else {
response.setStatusLine("1.0", 200, "OK");
}
response.setHeader("Content-Type", "application/xhtml+xml", false);
response.write("<html xmlns='http://www.w3.org/1999/xhtml'>");
response.write("<p>Login: <span id='ok'>" + (requestAuth ? "FAIL" : "PASS") + "</span></p>\n");
response.write("<p>Proxy: <span id='proxy'>" + (requestProxyAuth ? "FAIL" : "PASS") + "</span></p>\n");
response.write("<p>Auth: <span id='auth'>" + authHeader + "</span></p>\n");
response.write("<p>User: <span id='user'>" + actual_user + "</span></p>\n");
response.write("<p>Pass: <span id='pass'>" + actual_pass + "</span></p>\n");
if (huge) {
response.write("<div style='display: none'>");
for (i = 0; i < 100000; i++) {
response.write("123456789\n");
}
response.write("</div>");
response.write("<span id='footnote'>This is a footnote after the huge content fill</span>");
}
if (plugin) {
response.write("<embed id='embedtest' style='width: 400px; height: 100px;' " +
"type='application/x-test'></embed>\n");
}
response.write("</html>");
}
// base64 decoder
//
// Yoinked from extensions/xml-rpc/src/nsXmlRpcClient.js because btoa()
// doesn't seem to exist. :-(
/* Convert Base64 data to a string */
const toBinaryTable = [
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1, 0,-1,-1,
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,
15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1,
-1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
];
const base64Pad = '=';
function base64ToString(data) {
var result = '';
var leftbits = 0; // number of bits decoded, but yet to be appended
var leftdata = 0; // bits decoded, but yet to be appended
// Convert one by one.
for (var i = 0; i < data.length; i++) {
var c = toBinaryTable[data.charCodeAt(i) & 0x7f];
var padding = (data[i] == base64Pad);
// Skip illegal characters and whitespace
if (c == -1) continue;
// Collect data into leftdata, update bitcount
leftdata = (leftdata << 6) | c;
leftbits += 6;
// If we have 8 or more bits, append 8 bits to the result
if (leftbits >= 8) {
leftbits -= 8;
// Append if not padding.
if (!padding)
result += String.fromCharCode((leftdata >> leftbits) & 0xff);
leftdata &= (1 << leftbits) - 1;
}
}
// If there are any bits left, the base64 string was corrupted
if (leftbits)
throw Components.Exception('Corrupted base64 string');
return result;
}

Просмотреть файл

@ -2,18 +2,21 @@
http://creativecommons.org/publicdomain/zero/1.0/ */
const trimPref = "browser.urlbar.trimURLs";
const phishyUserPassPref = "network.http.phishy-userpass-length";
function test() {
gBrowser.selectedTab = gBrowser.addTab();
let tab = gBrowser.selectedTab = gBrowser.addTab();
registerCleanupFunction(function () {
gBrowser.removeCurrentTab();
gBrowser.removeTab(tab);
Services.prefs.clearUserPref(trimPref);
Services.prefs.clearUserPref(phishyUserPassPref);
URLBarSetURI();
});
Services.prefs.setBoolPref(trimPref, true);
Services.prefs.setIntPref(phishyUserPassPref, 32); // avoid prompting about phishing
waitForExplicitFinish();
@ -32,7 +35,6 @@ var tests = [
copyExpected: "e"
},
// pageproxystate="valid" from this point on (due to the load)
{
loadURL: "http://example.com/",
@ -52,6 +54,13 @@ var tests = [
copyExpected: "http://e"
},
// Test that userPass is stripped out
{
loadURL: "http://user:pass@mochi.test:8888/browser/browser/base/content/test/authenticate.sjs?user=user&pass=pass",
expectedURL: "mochi.test:8888/browser/browser/base/content/test/authenticate.sjs?user=user&pass=pass",
copyExpected: "http://mochi.test:8888/browser/browser/base/content/test/authenticate.sjs?user=user&pass=pass"
},
// Test escaping
{
loadURL: "http://example.com/()%C3%A9",

Просмотреть файл

@ -0,0 +1,39 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
function test() {
waitForExplicitFinish();
let url = "http://mochi.test:8888/browser/browser/base/content/test/test_wyciwyg_copying.html";
let tab = gBrowser.selectedTab = gBrowser.addTab(url);
tab.linkedBrowser.addEventListener("pageshow", function () {
let btn = content.document.getElementById("btn");
executeSoon(function () {
EventUtils.synthesizeMouseAtCenter(btn, {}, content);
let currentURL = gBrowser.currentURI.spec;
ok(/^wyciwyg:\/\//i.test(currentURL), currentURL + " is a wyciwyg URI");
executeSoon(function () {
testURLBarCopy(url, endTest);
});
});
}, false);
function endTest() {
while (gBrowser.tabs.length > 1)
gBrowser.removeCurrentTab();
finish();
}
function testURLBarCopy(targetValue, cb) {
info("Expecting copy of: " + targetValue);
waitForClipboard(targetValue, function () {
gURLBar.focus();
gURLBar.select();
goDoCommand("cmd_copy");
}, cb, cb);
}
}

Просмотреть файл

@ -0,0 +1,13 @@
<html>
<body>
<script>
function go() {
var w = window.open();
w.document.open();
w.document.write("<html><body>test document</body></html>");
w.document.close();
}
</script>
<button id="btn" onclick="go();">test</button>
</body>
</html>

Просмотреть файл

@ -510,6 +510,10 @@
return selectedVal;
let uri = gBrowser.currentURI;
// Only copy exposable URIs
try {
uri = Cc["@mozilla.org/docshell/urifixup;1"].getService(Ci.nsIURIFixup).createExposableURI(uri);
} catch (ex) {}
// If the entire URL is selected, just use the actual loaded URI.
if (inputVal == selectedVal) {

Двоичные данные
browser/themes/winstripe/browser/Toolbar-inverted.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 5.0 KiB

Просмотреть файл

@ -13,9 +13,9 @@
#appmenu-button {
border-width: 2px;
-moz-border-left-colors: rgba(255,255,255,.5) rgba(83,42,6,.9);
-moz-border-bottom-colors: rgba(255,255,255,.5) rgba(83,42,6,.9);
-moz-border-right-colors: rgba(255,255,255,.5) rgba(83,42,6,.9);
-moz-border-left-colors: @appMenuButtonBorderColor@;
-moz-border-bottom-colors: @appMenuButtonBorderColor@;
-moz-border-right-colors: @appMenuButtonBorderColor@;
margin-bottom: 1px; /* compensate white outer border */
box-shadow: 0 1px 0 rgba(255,255,255,.25) inset,
0 0 2px 1px rgba(255,255,255,.25) inset;
@ -138,6 +138,13 @@
border-right-style: none !important;
}
#toolbar-menubar :-moz-any(@primaryToolbarButtons@):not(#alltabs-button):not(#tabview-button):not(#new-tab-button) > .toolbarbutton-icon:not(:-moz-lwtheme),
#TabsToolbar[tabsontop=true] :-moz-any(@primaryToolbarButtons@):not(#alltabs-button):not(#tabview-button):not(#new-tab-button) > .toolbarbutton-icon:not(:-moz-lwtheme),
#navigator-toolbox[tabsontop=false] > #nav-bar :-moz-any(@primaryToolbarButtons@):not(#alltabs-button):not(#tabview-button):not(#new-tab-button) > .toolbarbutton-icon:not(:-moz-lwtheme),
#nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child :-moz-any(@primaryToolbarButtons@):not(#alltabs-button):not(#tabview-button):not(#new-tab-button) > .toolbarbutton-icon:not(:-moz-lwtheme) {
list-style-image: url("chrome://browser/skin/Toolbar-inverted.png");
}
/* Vertical toolbar border */
#main-window[sizemode=normal] #navigator-toolbox::after,
#main-window[sizemode=normal] #navigator-toolbox[tabsontop=true] > toolbar:not(#toolbar-menubar):not(#TabsToolbar),

Просмотреть файл

@ -57,6 +57,17 @@
%define bgTabTexture -moz-linear-gradient(transparent, hsla(0,0%,45%,.1) 1px, hsla(0,0%,32%,.2) 80%, hsla(0,0%,0%,.2))
%define bgTabTextureHover -moz-linear-gradient(hsla(0,0%,100%,.3) 1px, hsla(0,0%,75%,.2) 80%, hsla(0,0%,60%,.2))
%define navbarTextboxCustomBorder border-color: rgba(0,0,0,.32);
%define navbarLargeIcons #navigator-toolbox[iconsize=large][mode=icons] > #nav-bar
%ifdef MOZ_OFFICIAL_BRANDING
%define appMenuButtonBorderColor rgba(255,255,255,.5) rgba(83,42,6,.9)
%else
%if MOZ_UPDATE_CHANNEL == aurora
%define appMenuButtonBorderColor hsla(0,0%,100%,.5) hsla(214,89%,21%,.9)
%else
%define appMenuButtonBorderColor hsla(0,0%,100%,.5) hsla(210,59%,13%,.9)
%endif
%endif
#menubar-items {
-moz-box-orient: vertical; /* for flex hack */
@ -133,13 +144,10 @@
#appmenu-button {
-moz-appearance: none;
background: -moz-linear-gradient(rgb(247,182,82), rgb(215,98,10) 95%);
background-clip: padding-box;
border-radius: 0 0 4px 4px;
border: 1px solid rgba(83,42,6,.9);
border: 1px solid;
border-top: none;
box-shadow: 0 1px 0 rgba(255,255,255,.25) inset,
0 0 0 1px rgba(255,255,255,.25) inset;
color: white;
text-shadow: 0 0 1px rgba(0,0,0,.7),
0 1px 1.5px rgba(0,0,0,.5);
@ -162,20 +170,85 @@
}
%endif
#main-window[privatebrowsingmode=temporary] #appmenu-button {
background-image: -moz-linear-gradient(rgb(153,38,211), rgb(105,19,163) 95%);
border-color: rgba(43,8,65,.9);
#appmenu-button:hover:active,
#appmenu-button[open] {
border-radius: 0;
}
%ifdef MOZ_OFFICIAL_BRANDING
#appmenu-button {
background-image: -moz-linear-gradient(rgb(247,182,82), rgb(215,98,10) 95%);
border-color: rgba(83,42,6,.9);
box-shadow: 0 1px 0 rgba(255,255,255,.25) inset,
0 0 0 1px rgba(255,255,255,.25) inset;
}
#appmenu-button:hover:not(:active):not([open]) {
background-image: -moz-radial-gradient(center bottom, farthest-side, rgba(252,240,89,.5) 10%, rgba(252,240,89,0) 70%),
-moz-radial-gradient(center bottom, farthest-side, rgb(236,133,0), rgba(255,229,172,0)),
-moz-linear-gradient(rgb(246,170,69), rgb(209,74,0) 95%);
border-color: rgba(83,42,6,.9);
box-shadow: 0 1px 0 rgba(255,255,255,.1) inset,
0 0 1.5px 1px rgba(250,234,169,.7) inset,
0 0 2px 1px rgba(250,234,169,.7) inset,
0 -1px 0 rgba(250,234,169,.5) inset;
}
#appmenu-button:hover:active,
#appmenu-button[open] {
background-image: -moz-linear-gradient(rgb(246,170,69), rgb(209,74,0) 95%);
box-shadow: 0 2px 3px rgba(0,0,0,.4) inset,
0 1px 1px rgba(0,0,0,.2) inset;
}
%else
%if MOZ_UPDATE_CHANNEL == aurora
#appmenu-button {
background-image: -moz-linear-gradient(hsl(208,99%,37%), hsl(214,90%,23%) 95%);
border-color: hsla(214,89%,21%,.9);
box-shadow: 0 1px 0 hsla(205,100%,72%,.2) inset,
0 0 2px 1px hsla(205,100%,72%,.25) inset;
}
#appmenu-button:hover:not(:active):not([open]) {
background-image: -moz-radial-gradient(center bottom, farthest-side, hsla(202,100%,85%,.5) 10%, hsla(202,100%,85%,0) 70%),
-moz-radial-gradient(center bottom, farthest-side, hsla(205,100%,72%,.7), hsla(205,100%,72%,0)),
-moz-linear-gradient(hsl(208,98%,34%), hsl(213,87%,20%) 95%);
border-color: hsla(214,89%,21%,.9);
box-shadow: 0 1px 0 hsla(205,100%,72%,.15) inset,
0 0 2px 1px hsla(205,100%,72%,.5) inset,
0 -1px 0 hsla(205,100%,72%,.2) inset;
}
#appmenu-button:hover:active,
#appmenu-button[open] {
background-image: -moz-linear-gradient(hsl(208,95%,30%), hsl(214,85%,17%) 95%);
box-shadow: 0 2px 3px rgba(0,0,0,.4) inset,
0 1px 1px rgba(0,0,0,.2) inset;
}
%else
#appmenu-button {
background-image: -moz-linear-gradient(hsl(211,33%,32%), hsl(209,53%,10%) 95%);
border-color: hsla(210,59%,13%,.9);
box-shadow: 0 1px 0 hsla(210,48%,90%,.15) inset,
0 0 2px 1px hsla(211,65%,85%,.15) inset;
}
#appmenu-button:hover:not(:active):not([open]) {
background-image: -moz-radial-gradient(center bottom, farthest-side, hsla(210,48%,90%,.5) 10%, hsla(210,48%,90%,0) 70%),
-moz-radial-gradient(center bottom, farthest-side, hsla(211,70%,83%,.5), hsla(211,70%,83%,0)),
-moz-linear-gradient(hsl(211,33%,32%), hsl(209,53%,10%) 95%);
border-color: hsla(210,59%,13%,.9);
box-shadow: 0 1px 0 hsla(210,48%,90%,.15) inset,
0 0 2px 1px hsla(210,48%,90%,.4) inset,
0 -1px 0 hsla(210,48%,90%,.2) inset;
}
#appmenu-button:hover:active,
#appmenu-button[open] {
background-image: -moz-linear-gradient(hsl(211,33%,26%), hsl(209,53%,6%) 95%);
box-shadow: 0 2px 3px rgba(0,0,0,.4) inset,
0 1px 1px rgba(0,0,0,.2) inset;
}
%endif
%endif
#main-window[privatebrowsingmode=temporary] #appmenu-button {
background-image: -moz-linear-gradient(rgb(153,38,211), rgb(105,19,163) 95%);
border-color: rgba(43,8,65,.9);
}
#main-window[privatebrowsingmode=temporary] #appmenu-button:hover:not(:active):not([open]) {
background-image: -moz-radial-gradient(center bottom, farthest-side, rgba(240,193,255,.5) 10%, rgba(240,193,255,0) 70%),
@ -187,14 +260,6 @@
0 -1px 0 rgba(240,193,255,.5) inset;
}
#appmenu-button:hover:active,
#appmenu-button[open] {
background-image: -moz-linear-gradient(rgb(246,170,69), rgb(209,74,0) 95%);
border-radius: 0;
box-shadow: 0 2px 3px rgba(0,0,0,.4) inset,
0 1px 1px rgba(0,0,0,.2) inset;
}
#main-window[privatebrowsingmode=temporary] #appmenu-button:hover:active,
#main-window[privatebrowsingmode=temporary] #appmenu-button[open] {
background-image: -moz-linear-gradient(rgb(144,20,207), rgb(95,0,158) 95%);
@ -582,6 +647,10 @@ menuitem.bookmark-item {
list-style-image: url("chrome://browser/skin/Toolbar.png");
}
.toolbarbutton-1:-moz-lwtheme-brighttext {
list-style-image: url("chrome://browser/skin/Toolbar-inverted.png");
}
.toolbarbutton-1:not([type="menu-button"]) {
-moz-box-orient: vertical;
}
@ -596,19 +665,18 @@ menuitem.bookmark-item {
counter-reset: smallicons;
}
#navigator-toolbox[iconsize=small] > #nav-bar {
padding-top: 1px;
padding-bottom: 1px;
}
#navigator-toolbox[iconsize=large][mode=icons] > #nav-bar {
@navbarLargeIcons@ {
-moz-padding-start: 0;
-moz-padding-end: 2px;
}
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button,
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker,
#nav-bar .toolbarbutton-1 {
@navbarLargeIcons@ :-moz-any(@primaryToolbarButtons@):not(#alltabs-button):not(#tabview-button):not(#new-tab-button) > .toolbarbutton-icon {
list-style-image: url("chrome://browser/skin/Toolbar.png") !important;
}
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button,
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker,
@navbarLargeIcons@ .toolbarbutton-1 {
-moz-appearance: none;
padding: 1px 5px;
background: rgba(151,152,153,.05)
@ -624,14 +692,12 @@ menuitem.bookmark-item {
text-shadow: 0 0 2px white;
}
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker,
#navigator-toolbox[iconsize="small"][mode="icons"] > #nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button,
#navigator-toolbox[iconsize="small"][mode="icons"] > #nav-bar .toolbarbutton-1 {
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
padding-left: 3px;
padding-right: 3px;
}
#nav-bar .toolbarbutton-1[type="menu-button"] {
@navbarLargeIcons@ .toolbarbutton-1[type="menu-button"] {
-moz-appearance: none;
padding: 0;
background: none !important;
@ -639,44 +705,39 @@ menuitem.bookmark-item {
box-shadow: none !important;
}
#nav-bar .toolbarbutton-1 {
@navbarLargeIcons@ .toolbarbutton-1 {
margin: 1px 3px;
}
#navigator-toolbox[iconsize="small"][mode="icons"] > #nav-bar .toolbarbutton-1 {
margin-left: 2px;
margin-right: 2px;
}
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
-moz-border-start-style: none;
}
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(ltr),
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(rtl) {
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(ltr),
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(rtl) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(rtl),
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(ltr) {
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(rtl),
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(ltr) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
#nav-bar .toolbarbutton-1[disabled="true"] {
@navbarLargeIcons@ .toolbarbutton-1[disabled="true"] {
opacity: .4;
}
#nav-bar .toolbarbutton-1[disabled="true"] > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
#nav-bar .toolbarbutton-1[disabled="true"] > .toolbarbutton-icon {
@navbarLargeIcons@ .toolbarbutton-1[disabled="true"] > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
@navbarLargeIcons@ .toolbarbutton-1[disabled="true"] > .toolbarbutton-icon {
opacity: 1;
}
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled="true"]):not(:active):hover,
#nav-bar .toolbarbutton-1:not([open="true"]):not(:active):hover > .toolbarbutton-menubutton-dropmarker:not([disabled="true"]),
#nav-bar .toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):not([checked="true"]):not([open="true"]):not(:active):hover,
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:not([disabled="true"]):not([open]):not(:active):hover > .toolbarbutton-icon {
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled="true"]):not(:active):hover,
@navbarLargeIcons@ .toolbarbutton-1:not([open="true"]):not(:active):hover > .toolbarbutton-menubutton-dropmarker:not([disabled="true"]),
@navbarLargeIcons@ .toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):not([checked="true"]):not([open="true"]):not(:active):hover,
@navbarLargeIcons@ #back-button:not([disabled="true"]):not([open]):not(:active):hover > .toolbarbutton-icon {
background-color: hsla(190,60%,70%,.5);
border-color: hsla(190,50%,65%,.8) hsla(190,50%,50%,.8) hsla(190,50%,40%,.8);
box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset,
@ -687,12 +748,12 @@ menuitem.bookmark-item {
box-shadow .3s ease-in;
}
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled="true"]):hover:active,
#nav-bar .toolbarbutton-1:hover:active > .toolbarbutton-menubutton-dropmarker:not([disabled="true"]),
#nav-bar .toolbarbutton-1[open="true"] > .toolbarbutton-menubutton-dropmarker,
#nav-bar .toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):hover:active,
#nav-bar .toolbarbutton-1:not([type="menu-button"])[checked="true"],
#nav-bar .toolbarbutton-1[open="true"] {
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled="true"]):hover:active,
@navbarLargeIcons@ .toolbarbutton-1:hover:active > .toolbarbutton-menubutton-dropmarker:not([disabled="true"]),
@navbarLargeIcons@ .toolbarbutton-1[open="true"] > .toolbarbutton-menubutton-dropmarker,
@navbarLargeIcons@ .toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):hover:active,
@navbarLargeIcons@ .toolbarbutton-1:not([type="menu-button"])[checked="true"],
@navbarLargeIcons@ .toolbarbutton-1[open="true"] {
background-color: transparent;
border-color: rgba(0,0,0,.65) rgba(0,0,0,.55) rgba(0,0,0,.5);
box-shadow: 0 0 6.5px rgba(0,0,0,.4) inset,
@ -701,7 +762,7 @@ menuitem.bookmark-item {
text-shadow: none;
}
#nav-bar .toolbarbutton-1[checked="true"]:not(:active):hover {
@navbarLargeIcons@ .toolbarbutton-1[checked="true"]:not(:active):hover {
background-color: rgba(90%,90%,90%,.4);
-moz-transition: background-color .4s;
}
@ -711,8 +772,8 @@ menuitem.bookmark-item {
-moz-margin-end: 0;
}
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
#nav-bar .toolbarbutton-1:not(:-moz-any(@primaryToolbarButtons@)) > .toolbarbutton-icon {
@navbarLargeIcons@ .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
@navbarLargeIcons@ .toolbarbutton-1:not(:-moz-any(@primaryToolbarButtons@)) > .toolbarbutton-icon {
margin: 1px;
}
@ -764,37 +825,31 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
-moz-image-region: rect(0, 36px, 18px, 18px);
}
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button {
-moz-image-region: rect(18px, 20px, 38px, 0);
}
#back-button:-moz-locale-dir(rtl) > .toolbarbutton-icon,
#forward-button:-moz-locale-dir(rtl),
#forward-button:-moz-locale-dir(rtl) > .toolbarbutton-text {
-moz-transform: scaleX(-1);
}
#nav-bar #back-button {
-moz-margin-end: 0 !important;
}
#nav-bar #forward-button {
@navbarLargeIcons@ #forward-button {
border-left-style: none;
-moz-margin-start: 0 !important;
}
#nav-bar #back-button:-moz-locale-dir(ltr) {
@navbarLargeIcons@ #back-button:-moz-locale-dir(ltr) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
#nav-bar #back-button:-moz-locale-dir(rtl),
#nav-bar #forward-button {
@navbarLargeIcons@ #back-button:-moz-locale-dir(rtl),
@navbarLargeIcons@ #forward-button {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button {
@navbarLargeIcons@ #back-button {
-moz-image-region: rect(18px, 20px, 38px, 0);
-moz-margin-end: 0 !important;
margin: -5px 0;
padding-top: 0;
padding-bottom: 0;
@ -808,11 +863,11 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
box-shadow: none;
}
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:-moz-locale-dir(rtl) {
@navbarLargeIcons@ #back-button:-moz-locale-dir(rtl) {
border-radius: 10000px 0 0 10000px;
}
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button > .toolbarbutton-icon {
@navbarLargeIcons@ #back-button > .toolbarbutton-icon {
border-radius: 10000px;
padding: 5px;
border: none;
@ -825,7 +880,7 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
0 1px 1px rgba(0,0,0,.3);
}
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:not([disabled="true"]):not([open="true"]):not(:active):hover > .toolbarbutton-icon {
@navbarLargeIcons@ #back-button:not([disabled="true"]):not([open="true"]):not(:active):hover > .toolbarbutton-icon {
box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset,
0 0 0 2px rgba(255,255,255,.1) inset,
0 0 0 1px hsla(190,50%,40%,.3),
@ -834,16 +889,16 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
0 0 5px 1px hsl(190,90%,80%);
}
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:not([disabled="true"]):hover:active > .toolbarbutton-icon,
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button[open="true"] > .toolbarbutton-icon {
@navbarLargeIcons@ #back-button:not([disabled="true"]):hover:active > .toolbarbutton-icon,
@navbarLargeIcons@ #back-button[open="true"] > .toolbarbutton-icon {
box-shadow: 0 0 6.5px rgba(0,0,0,.4) inset,
0 0 2px rgba(0,0,0,.4) inset,
0 0 0 1px rgba(0,0,0,.65),
0 2px 0 rgba(255,255,255,.4);
}
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar[currentset*="unified-back-forward-button"],
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar:not([currentset]) {
@navbarLargeIcons@[currentset*="unified-back-forward-button"],
@navbarLargeIcons@:not([currentset]) {
padding-top: 3px;
padding-bottom: 5px;
}
@ -853,7 +908,7 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
padding-top: 5px;
}
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #forward-button {
@navbarLargeIcons@ #forward-button {
/*mask: url(keyhole-forward-mask.svg#mask); XXX: this regresses twinopen */
mask: url(chrome://browser/content/browser.xul#winstripe-keyhole-forward-mask);
-moz-margin-start: -6px !important;
@ -861,7 +916,7 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
padding-right: 3px;
}
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #forward-button:not([disabled="true"]):not(:active):hover {
@navbarLargeIcons@ #forward-button:not([disabled="true"]):not(:active):hover {
/*mask: url(keyhole-forward-mask.svg#mask-hover);*/
mask: url(chrome://browser/content/browser.xul#winstripe-keyhole-forward-mask-hover);
/* Don't animate the box shadow, as the blur and spread radii affect the mask. */
@ -895,6 +950,9 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
#home-button.bookmark-item {
list-style-image: url("chrome://browser/skin/Toolbar.png");
}
#home-button.bookmark-item:-moz-lwtheme-brighttext {
list-style-image: url("chrome://browser/skin/Toolbar-inverted.png");
}
#home-button {
-moz-image-region: rect(0, 90px, 18px, 72px);
}
@ -969,6 +1027,10 @@ toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
list-style-image: url("chrome://browser/skin/Toolbar.png");
}
#bookmarks-menu-button.bookmark-item:-moz-lwtheme-brighttext {
list-style-image: url("chrome://browser/skin/Toolbar-inverted.png");
}
#bookmarks-menu-button.toolbarbutton-1 {
-moz-box-orient: horizontal;
}

Просмотреть файл

@ -35,6 +35,7 @@ browser.jar:
skin/classic/browser/reload-stop-go.png
skin/classic/browser/Secure24.png (Secure24.png)
skin/classic/browser/Toolbar.png (Toolbar.png)
skin/classic/browser/Toolbar-inverted.png
skin/classic/browser/Go-arrow.png (Go-arrow.png)
* skin/classic/browser/searchbar.css (searchbar.css)
skin/classic/browser/section_collapsed.png
@ -148,6 +149,7 @@ browser.jar:
skin/classic/aero/browser/reload-stop-go.png
skin/classic/aero/browser/Secure24.png (Secure24-aero.png)
skin/classic/aero/browser/Toolbar.png
skin/classic/aero/browser/Toolbar-inverted.png
skin/classic/aero/browser/Go-arrow.png (Go-arrow-aero.png)
* skin/classic/aero/browser/searchbar.css (searchbar.css)
skin/classic/aero/browser/section_collapsed.png

Просмотреть файл

@ -3324,41 +3324,6 @@ nsScriptSecurityManager::Observe(nsISupports* aObject, const char* aTopic,
return rv;
}
///////////////////////////////////
// Default ObjectPrincipalFinder //
///////////////////////////////////
// The default JSSecurityCallbacks::findObjectPrincipals is necessary since
// scripts run (and ask for object principals) during startup before
// nsJSRuntime::Init() has been called (which resets findObjectPrincipals).
// Defined NS_EXPORT for linkage with debug-only assert in xpcshell
NS_EXPORT JSPrincipals *
NS_DefaultObjectPrincipalFinder(JSContext *cx, JSObject *obj)
{
nsScriptSecurityManager *ssm = nsScriptSecurityManager::GetScriptSecurityManager();
if (!ssm) {
return nsnull;
}
nsCOMPtr<nsIPrincipal> principal;
nsresult rv = ssm->GetObjectPrincipal(cx, obj, getter_AddRefs(principal));
if (NS_FAILED(rv) || !principal) {
return nsnull;
}
JSPrincipals *jsPrincipals = nsnull;
principal->GetJSPrincipals(cx, &jsPrincipals);
// nsIPrincipal::GetJSPrincipals() returns a strong reference to the
// JS principals, but the caller of this function expects a weak
// reference. So we need to release here.
JSPRINCIPALS_DROP(cx, jsPrincipals);
return jsPrincipals;
}
/////////////////////////////////////////////
// Constructor, Destructor, Initialization //
/////////////////////////////////////////////
@ -3431,7 +3396,7 @@ nsresult nsScriptSecurityManager::Init()
static JSSecurityCallbacks securityCallbacks = {
CheckObjectAccess,
NULL,
NS_DefaultObjectPrincipalFinder,
NULL,
ContentSecurityPolicyPermitsJSAction
};

Просмотреть файл

@ -68,7 +68,6 @@ function ContentSecurityPolicy() {
this._policy._allowInlineScripts = true;
this._policy._allowEval = true;
this._requestHeaders = [];
this._request = "";
this._docRequest = null;
CSPdebug("CSP POLICY INITED TO 'default-src *'");
@ -211,13 +210,6 @@ ContentSecurityPolicy.prototype = {
var reqVersion = internalChannel.getRequestVersion(reqMaj, reqMin);
this._request += " HTTP/" + reqMaj.value + "." + reqMin.value;
}
// grab the request headers
var self = this;
aChannel.visitRequestHeaders({
visitHeader: function(aHeader, aValue) {
self._requestHeaders.push(aHeader + ": " + aValue);
}});
},
/* ........ Methods .............. */
@ -270,21 +262,13 @@ ContentSecurityPolicy.prototype = {
// {
// csp-report: {
// request: "GET /index.html HTTP/1.1",
// request-headers: "Host: example.com
// User-Agent: ...
// ...",
// blocked-uri: "...",
// violated-directive: "..."
// }
// }
var strHeaders = "";
for (let i in this._requestHeaders) {
strHeaders += this._requestHeaders[i] + "\n";
}
var report = {
'csp-report': {
'request': this._request,
'request-headers': strHeaders,
'blocked-uri': (blockedUri instanceof Ci.nsIURI ?
blockedUri.asciiSpec : blockedUri),
'violated-directive': violatedDirective

Просмотреть файл

@ -1628,8 +1628,6 @@ nsFrameLoader::GetWindowDimensions(nsRect& aRect)
nsCOMPtr<nsIDocShellTreeItem> parentAsItem(do_QueryInterface(parentAsWebNav));
NS_ASSERTION(mIsTopLevelContent, "Outer dimensions must be taken only from TopLevel content");
nsCOMPtr<nsIDocShellTreeOwner> parentOwner;
if (NS_FAILED(parentAsItem->GetTreeOwner(getter_AddRefs(parentOwner))) ||
!parentOwner) {

Просмотреть файл

@ -4,7 +4,8 @@
package="@ANDROID_PACKAGE_NAME@"
android:installLocation="auto"
android:versionCode="@ANDROID_VERSION_CODE@"
android:versionName="@MOZ_APP_VERSION@">
android:versionName="@MOZ_APP_VERSION@"
android:sharedUserId="@MOZ_ANDROID_SHARED_ID@">
<uses-sdk android:minSdkVersion="5"
android:targetSdkVersion="5"/>

Просмотреть файл

@ -101,9 +101,17 @@ GARBAGE_DIRS += classes res
ifeq ($(MOZ_APP_NAME),fennec)
ICON_PATH = $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/content/fennec_48x48.png
ICON_PATH_HDPI = $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/content/fennec_72x72.png
ifeq (org.mozilla.fennec_unofficial,$(ANDROID_PACKAGE_NAME))
DEFINES += -DMOZ_ANDROID_SHARED_ID="org.mozilla.fennec_unofficial.sharedID"
else ifeq (,$(MOZ_OFFICIAL_BRANDING))
DEFINES += -DMOZ_ANDROID_SHARED_ID="org.mozilla.fennec.sharedID"
else
DEFINES += -DMOZ_ANDROID_SHARED_ID="org.mozilla.firefox.sharedID"
endif
else
ICON_PATH = $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/content/icon48.png
ICON_PATH_HDPI = $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/content/icon64.png
DEFINES += -DMOZ_ANDROID_SHARED_ID="$(ANDROID_PACKAGE_NAME).sharedID"
endif
RES_LAYOUT = \

Просмотреть файл

@ -1750,10 +1750,6 @@ FindObjectPrincipals(JSContext *cx, JSObject *obj)
return gJSPrincipals;
}
// defined in nsScriptSecurityManager.cpp
NS_IMPORT JSPrincipals *
NS_DefaultObjectPrincipalFinder(JSContext *cx, JSObject *obj);
int
main(int argc, char **argv, char **envp)
{
@ -1922,7 +1918,7 @@ main(int argc, char **argv, char **envp)
JSSecurityCallbacks *cb = JS_GetRuntimeSecurityCallbacks(rt);
NS_ASSERTION(cb, "We are assuming that nsScriptSecurityManager::Init() has been run");
NS_ASSERTION(cb->findObjectPrincipals == NS_DefaultObjectPrincipalFinder, "Your pigeon is in my hole!");
NS_ASSERTION(!cb->findObjectPrincipals, "Your pigeon is in my hole!");
cb->findObjectPrincipals = FindObjectPrincipals;
#ifdef TEST_TranslateThis

Просмотреть файл

@ -184,7 +184,7 @@ GetCharacters(const NSString* aString)
static const char*
GetCharacters(const CFStringRef aString)
{
NSString* str = reinterpret_cast<const NSString*>(aString);
const NSString* str = reinterpret_cast<const NSString*>(aString);
return GetCharacters(str);
}