mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
Merge mozilla-central to mozilla-inbound
This commit is contained in:
commit
f6b14235f4
7
b2g/chrome/content/blank.css
Normal file
7
b2g/chrome/content/blank.css
Normal file
@ -0,0 +1,7 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
body {
|
||||
background: black;
|
||||
}
|
10
b2g/chrome/content/blank.html
Normal file
10
b2g/chrome/content/blank.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="blank.css" type="text/css" media="all" />
|
||||
</head>
|
||||
</html>
|
@ -9,10 +9,20 @@ html {
|
||||
height: 100%;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
iframe {
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
border: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
@ -311,8 +311,7 @@ var shell = {
|
||||
systemAppFrame.setAttribute('mozbrowser', 'true');
|
||||
systemAppFrame.setAttribute('mozapp', manifestURL);
|
||||
systemAppFrame.setAttribute('allowfullscreen', 'true');
|
||||
systemAppFrame.setAttribute('style', "overflow: hidden; height: 100%; width: 100%; border: none; position: absolute; left: 0; top: 0; right: 0; bottom: 0;");
|
||||
systemAppFrame.setAttribute('src', "data:text/html;charset=utf-8,%3C!DOCTYPE html>%3Cbody style='background:black;");
|
||||
systemAppFrame.setAttribute('src', 'blank.html');
|
||||
let container = document.getElementById('container');
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
// See shell.html
|
||||
|
@ -13,6 +13,8 @@ chrome.jar:
|
||||
* content/shell.html (content/shell.html)
|
||||
* content/shell.js (content/shell.js)
|
||||
content/shell.css (content/shell.css)
|
||||
content/blank.html (content/blank.html)
|
||||
content/blank.css (content/blank.css)
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
content/devtools/adb.js (content/devtools/adb.js)
|
||||
#endif
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="ef937d1aca7c4cf89ecb5cc43ae8c21c2000a9db">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a6881205deae450757a8d1e1ed65e5e5be0ec633"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="288bf1c58ef9ccecd68508978a0141ee71974681"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3905180d9e2dbe03d7ce3b3a6debe4d4adc938d1"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="a6881205deae450757a8d1e1ed65e5e5be0ec633"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="288bf1c58ef9ccecd68508978a0141ee71974681"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3905180d9e2dbe03d7ce3b3a6debe4d4adc938d1"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="93f9ba577f68d772093987c2f1c0a4ae293e1802"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a6881205deae450757a8d1e1ed65e5e5be0ec633"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="288bf1c58ef9ccecd68508978a0141ee71974681"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3905180d9e2dbe03d7ce3b3a6debe4d4adc938d1"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="c42985975f2bbc42859b9136ed348186d989b93d"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a1ddea3133e0807350326cee5dcf0d06fad00c08"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="ef937d1aca7c4cf89ecb5cc43ae8c21c2000a9db">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a6881205deae450757a8d1e1ed65e5e5be0ec633"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="288bf1c58ef9ccecd68508978a0141ee71974681"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3905180d9e2dbe03d7ce3b3a6debe4d4adc938d1"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="a6881205deae450757a8d1e1ed65e5e5be0ec633"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="288bf1c58ef9ccecd68508978a0141ee71974681"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3905180d9e2dbe03d7ce3b3a6debe4d4adc938d1"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="93f9ba577f68d772093987c2f1c0a4ae293e1802"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="ef937d1aca7c4cf89ecb5cc43ae8c21c2000a9db">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a6881205deae450757a8d1e1ed65e5e5be0ec633"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="288bf1c58ef9ccecd68508978a0141ee71974681"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3905180d9e2dbe03d7ce3b3a6debe4d4adc938d1"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a6881205deae450757a8d1e1ed65e5e5be0ec633"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="288bf1c58ef9ccecd68508978a0141ee71974681"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3905180d9e2dbe03d7ce3b3a6debe4d4adc938d1"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="c42985975f2bbc42859b9136ed348186d989b93d"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a1ddea3133e0807350326cee5dcf0d06fad00c08"/>
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"git": {
|
||||
"git_revision": "a6881205deae450757a8d1e1ed65e5e5be0ec633",
|
||||
"git_revision": "288bf1c58ef9ccecd68508978a0141ee71974681",
|
||||
"remote": "https://git.mozilla.org/releases/gaia.git",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "1438a6024d8aeb50a5a93a3844127908dc94acef",
|
||||
"revision": "8f31030bb6d1ccddf2fd1d757ffa9e1e47aab4ed",
|
||||
"repo_path": "integration/gaia-central"
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a6881205deae450757a8d1e1ed65e5e5be0ec633"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="288bf1c58ef9ccecd68508978a0141ee71974681"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3905180d9e2dbe03d7ce3b3a6debe4d4adc938d1"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="c42985975f2bbc42859b9136ed348186d989b93d"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a1ddea3133e0807350326cee5dcf0d06fad00c08"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="52775e03a2d8532429dff579cb2cd56718e488c3">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a6881205deae450757a8d1e1ed65e5e5be0ec633"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="288bf1c58ef9ccecd68508978a0141ee71974681"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3905180d9e2dbe03d7ce3b3a6debe4d4adc938d1"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
@ -1513,6 +1513,9 @@ pref("devtools.canvasdebugger.enabled", false);
|
||||
// Enable the Web Audio Editor
|
||||
pref("devtools.webaudioeditor.enabled", false);
|
||||
|
||||
// Web Audio Editor Inspector Width should be a preference
|
||||
pref("devtools.webaudioeditor.inspectorWidth", 300);
|
||||
|
||||
// Default theme ("dark" or "light")
|
||||
#ifdef MOZ_DEV_EDITION
|
||||
pref("devtools.theme", "dark");
|
||||
@ -1870,8 +1873,10 @@ pref("dom.ipc.reportProcessHangs", false);
|
||||
pref("dom.ipc.reportProcessHangs", true);
|
||||
#endif
|
||||
|
||||
#ifndef NIGHTLY_BUILD
|
||||
// Disable reader mode by default.
|
||||
pref("reader.parse-on-load.enabled", false);
|
||||
#endif
|
||||
|
||||
// Disable ReadingList by default.
|
||||
pref("browser.readinglist.enabled", false);
|
||||
|
@ -1,6 +1,7 @@
|
||||
[DEFAULT]
|
||||
subsuite = devtools
|
||||
support-files =
|
||||
doc_raf-begin.html
|
||||
doc_simple-canvas.html
|
||||
doc_simple-canvas-bitmasks.html
|
||||
doc_simple-canvas-deep-stack.html
|
||||
@ -34,6 +35,7 @@ skip-if = e10s # bug 1102301 - leaks while running as a standalone directory in
|
||||
[browser_canvas-frontend-record-01.js]
|
||||
[browser_canvas-frontend-record-02.js]
|
||||
[browser_canvas-frontend-record-03.js]
|
||||
[browser_canvas-frontend-record-04.js]
|
||||
[browser_canvas-frontend-reload-01.js]
|
||||
[browser_canvas-frontend-reload-02.js]
|
||||
[browser_canvas-frontend-slider-01.js]
|
||||
|
@ -22,7 +22,7 @@ function ifTestingSupported() {
|
||||
"A snapshot actor was sent after recording.");
|
||||
|
||||
let animationOverview = yield snapshotActor.getOverview();
|
||||
ok(snapshotActor,
|
||||
ok(animationOverview,
|
||||
"An animation overview could be retrieved after recording.");
|
||||
|
||||
let thumbnails = animationOverview.thumbnails;
|
||||
|
@ -0,0 +1,34 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/**
|
||||
* Bug 1122766
|
||||
* Tests that the canvas actor correctly returns from recordAnimationFrame
|
||||
* in the scenario where a loop starts with rAF and has rAF in the beginning
|
||||
* of its loop, when the recording starts before the rAFs start.
|
||||
*/
|
||||
|
||||
function ifTestingSupported() {
|
||||
let { target, panel } = yield initCanvasDebuggerFrontend(RAF_BEGIN_URL);
|
||||
let { window, EVENTS, gFront, SnapshotsListView } = panel.panelWin;
|
||||
loadFrameScripts();
|
||||
|
||||
yield reload(target);
|
||||
|
||||
let recordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED);
|
||||
SnapshotsListView._onRecordButtonClick();
|
||||
|
||||
// Wait until after the recording started to trigger the content.
|
||||
// Use the gFront method rather than the SNAPSHOT_RECORDING_STARTED event
|
||||
// which triggers before the underlying actor call
|
||||
yield waitUntil(function*() { return !(yield gFront.isRecording()); });
|
||||
|
||||
// Start animation in content
|
||||
evalInDebuggee("start();");
|
||||
|
||||
yield recordingFinished;
|
||||
ok(true, "Finished recording a snapshot of the animation loop.");
|
||||
|
||||
yield removeTab(target.tab);
|
||||
finish();
|
||||
}
|
36
browser/devtools/canvasdebugger/test/doc_raf-begin.html
Normal file
36
browser/devtools/canvasdebugger/test/doc_raf-begin.html
Normal file
@ -0,0 +1,36 @@
|
||||
<!-- Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ -->
|
||||
<!doctype html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Canvas inspector test page</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<canvas width="128" height="128"></canvas>
|
||||
|
||||
<script type="text/javascript;version=1.8">
|
||||
"use strict";
|
||||
|
||||
var ctx = document.querySelector("canvas").getContext("2d");
|
||||
|
||||
function drawRect(fill, size) {
|
||||
ctx.fillStyle = fill;
|
||||
ctx.fillRect(size[0], size[1], size[2], size[3]);
|
||||
}
|
||||
|
||||
function drawScene() {
|
||||
window.requestAnimationFrame(drawScene);
|
||||
ctx.clearRect(0, 0, 128, 128);
|
||||
drawRect("rgb(192, 192, 192)", [0, 0, 128, 128]);
|
||||
drawRect("rgba(0, 0, 192, 0.5)", [30, 30, 55, 50]);
|
||||
drawRect("rgba(192, 0, 0, 0.5)", [10, 10, 55, 50]);
|
||||
}
|
||||
|
||||
function start () { window.requestAnimationFrame(drawScene); }
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -20,6 +20,7 @@ let { DebuggerServer } = Cu.import("resource://gre/modules/devtools/dbg-server.j
|
||||
let { DebuggerClient } = Cu.import("resource://gre/modules/devtools/dbg-client.jsm", {});
|
||||
let { CallWatcherFront } = devtools.require("devtools/server/actors/call-watcher");
|
||||
let { CanvasFront } = devtools.require("devtools/server/actors/canvas");
|
||||
let { setTimeout } = devtools.require("sdk/timers");
|
||||
let TiltGL = devtools.require("devtools/tilt/tilt-gl");
|
||||
let TargetFactory = devtools.TargetFactory;
|
||||
let Toolbox = devtools.Toolbox;
|
||||
@ -33,6 +34,7 @@ const SIMPLE_CANVAS_TRANSPARENT_URL = EXAMPLE_URL + "doc_simple-canvas-transpare
|
||||
const SIMPLE_CANVAS_DEEP_STACK_URL = EXAMPLE_URL + "doc_simple-canvas-deep-stack.html";
|
||||
const WEBGL_ENUM_URL = EXAMPLE_URL + "doc_webgl-enum.html";
|
||||
const WEBGL_BINDINGS_URL = EXAMPLE_URL + "doc_webgl-bindings.html";
|
||||
const RAF_BEGIN_URL = EXAMPLE_URL + "doc_raf-begin.html";
|
||||
|
||||
// All tests are asynchronous.
|
||||
waitForExplicitFinish();
|
||||
@ -275,3 +277,22 @@ function getSourceActor(aSources, aURL) {
|
||||
let item = aSources.getItemForAttachment(a => a.source.url === aURL);
|
||||
return item ? item.value : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Waits until a predicate returns true.
|
||||
*
|
||||
* @param function predicate
|
||||
* Invoked once in a while until it returns true.
|
||||
* @param number interval [optional]
|
||||
* How often the predicate is invoked, in milliseconds.
|
||||
*/
|
||||
function *waitUntil (predicate, interval = 10) {
|
||||
if (yield predicate()) {
|
||||
return Promise.resolve(true);
|
||||
}
|
||||
let deferred = Promise.defer();
|
||||
setTimeout(function() {
|
||||
waitUntil(predicate).then(() => deferred.resolve(true));
|
||||
}, interval);
|
||||
return deferred.promise;
|
||||
}
|
||||
|
@ -2743,21 +2743,22 @@ NetworkDetailsView.prototype = {
|
||||
}
|
||||
|
||||
/**
|
||||
* A helper that sets label text to specified value.
|
||||
* A helper that sets value and tooltiptext attributes of an element to
|
||||
* specified value.
|
||||
*
|
||||
* @param string selector
|
||||
* A selector for the label.
|
||||
* A selector for the element.
|
||||
* @param string value
|
||||
* The value label should have. If this evaluates to false a
|
||||
* placeholder string <Not Available> is used instead.
|
||||
* The value to set. If this evaluates to false a placeholder string
|
||||
* <Not Available> is used instead.
|
||||
*/
|
||||
function setLabel(selector, value) {
|
||||
function setValue(selector, value) {
|
||||
let label = $(selector);
|
||||
if (!value) {
|
||||
label.value = L10N.getStr("netmonitor.security.notAvailable");
|
||||
label.setAttribute("tooltiptext", label.value);
|
||||
label.setAttribute("value", L10N.getStr("netmonitor.security.notAvailable"));
|
||||
label.setAttribute("tooltiptext", label.getAttribute("value"));
|
||||
} else {
|
||||
label.value = value;
|
||||
label.setAttribute("value", value);
|
||||
label.setAttribute("tooltiptext", value);
|
||||
}
|
||||
}
|
||||
@ -2785,43 +2786,43 @@ NetworkDetailsView.prototype = {
|
||||
let disabledLabel = L10N.getStr("netmonitor.security.disabled");
|
||||
|
||||
// Connection parameters
|
||||
setLabel("#security-protocol-version-value", securityInfo.protocolVersion);
|
||||
setLabel("#security-ciphersuite-value", securityInfo.cipherSuite);
|
||||
setValue("#security-protocol-version-value", securityInfo.protocolVersion);
|
||||
setValue("#security-ciphersuite-value", securityInfo.cipherSuite);
|
||||
|
||||
// Host header
|
||||
let domain = NetMonitorView.RequestsMenu._getUriHostPort(url);
|
||||
let hostHeader = L10N.getFormatStr("netmonitor.security.hostHeader", domain);
|
||||
setLabel("#security-info-host-header", hostHeader);
|
||||
setValue("#security-info-host-header", hostHeader);
|
||||
|
||||
// Parameters related to the domain
|
||||
setLabel("#security-http-strict-transport-security-value",
|
||||
setValue("#security-http-strict-transport-security-value",
|
||||
securityInfo.hsts ? enabledLabel : disabledLabel);
|
||||
|
||||
setLabel("#security-public-key-pinning-value",
|
||||
setValue("#security-public-key-pinning-value",
|
||||
securityInfo.hpkp ? enabledLabel : disabledLabel);
|
||||
|
||||
// Certificate parameters
|
||||
let cert = securityInfo.cert;
|
||||
setLabel("#security-cert-subject-cn", cert.subject.commonName);
|
||||
setLabel("#security-cert-subject-o", cert.subject.organization);
|
||||
setLabel("#security-cert-subject-ou", cert.subject.organizationalUnit);
|
||||
setValue("#security-cert-subject-cn", cert.subject.commonName);
|
||||
setValue("#security-cert-subject-o", cert.subject.organization);
|
||||
setValue("#security-cert-subject-ou", cert.subject.organizationalUnit);
|
||||
|
||||
setLabel("#security-cert-issuer-cn", cert.issuer.commonName);
|
||||
setLabel("#security-cert-issuer-o", cert.issuer.organization);
|
||||
setLabel("#security-cert-issuer-ou", cert.issuer.organizationalUnit);
|
||||
setValue("#security-cert-issuer-cn", cert.issuer.commonName);
|
||||
setValue("#security-cert-issuer-o", cert.issuer.organization);
|
||||
setValue("#security-cert-issuer-ou", cert.issuer.organizationalUnit);
|
||||
|
||||
setLabel("#security-cert-validity-begins", cert.validity.start);
|
||||
setLabel("#security-cert-validity-expires", cert.validity.end);
|
||||
setValue("#security-cert-validity-begins", cert.validity.start);
|
||||
setValue("#security-cert-validity-expires", cert.validity.end);
|
||||
|
||||
setLabel("#security-cert-sha1-fingerprint", cert.fingerprint.sha1);
|
||||
setLabel("#security-cert-sha256-fingerprint", cert.fingerprint.sha256);
|
||||
setValue("#security-cert-sha1-fingerprint", cert.fingerprint.sha1);
|
||||
setValue("#security-cert-sha256-fingerprint", cert.fingerprint.sha256);
|
||||
} else {
|
||||
infobox.hidden = true;
|
||||
errorbox.hidden = false;
|
||||
|
||||
// Strip any HTML from the message.
|
||||
let plain = DOMParser.parseFromString(securityInfo.errorMessage, "text/html");
|
||||
$("#security-error-message").textContent = plain.body.textContent;
|
||||
setValue("#security-error-message", plain.body.textContent);
|
||||
}
|
||||
}),
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#headers-summary-url-value .textbox-input {
|
||||
.cropped-textbox .textbox-input {
|
||||
/* workaround for textbox not supporting the @crop attribute */
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
@ -300,7 +300,7 @@
|
||||
<label class="plain tabpanel-summary-label"
|
||||
value="&netmonitorUI.summary.url;"/>
|
||||
<textbox id="headers-summary-url-value"
|
||||
class="plain tabpanel-summary-value devtools-monospace"
|
||||
class="plain tabpanel-summary-value devtools-monospace cropped-textbox"
|
||||
flex="1"
|
||||
readonly="true"/>
|
||||
</hbox>
|
||||
@ -488,7 +488,14 @@
|
||||
flex="1">
|
||||
<label class="plain tabpanel-summary-label"
|
||||
value="&netmonitorUI.security.error;"/>
|
||||
<description id="security-error-message" flex="1"/>
|
||||
<hbox class="security-info-section"
|
||||
flex="1">
|
||||
<textbox id="security-error-message"
|
||||
class="plain"
|
||||
flex="1"
|
||||
multiline="true"
|
||||
readonly="true"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<vbox id="security-information"
|
||||
flex="1">
|
||||
@ -502,10 +509,10 @@
|
||||
align="baseline">
|
||||
<label class="plain tabpanel-summary-label"
|
||||
value="&netmonitorUI.security.protocolVersion;"/>
|
||||
<label id="security-protocol-version-value"
|
||||
class="plain tabpanel-summary-value devtools-monospace"
|
||||
crop="end"
|
||||
flex="1"/>
|
||||
<textbox id="security-protocol-version-value"
|
||||
class="plain tabpanel-summary-value devtools-monospace cropped-textbox"
|
||||
flex="1"
|
||||
readonly="true"/>
|
||||
<image class="security-warning-icon"
|
||||
id="security-warning-sslv3"
|
||||
tooltiptext="&netmonitorUI.security.warning.sslv3;" />
|
||||
@ -515,10 +522,10 @@
|
||||
align="baseline">
|
||||
<label class="plain tabpanel-summary-label"
|
||||
value="&netmonitorUI.security.cipherSuite;"/>
|
||||
<label id="security-ciphersuite-value"
|
||||
class="plain tabpanel-summary-value devtools-monospace"
|
||||
crop="end"
|
||||
flex="1"/>
|
||||
<textbox id="security-ciphersuite-value"
|
||||
class="plain tabpanel-summary-value devtools-monospace cropped-textbox"
|
||||
flex="1"
|
||||
readonly="true"/>
|
||||
<image class="security-warning-icon"
|
||||
id="security-warning-cipher"
|
||||
tooltiptext="&netmonitorUI.security.warning.cipher;" />
|
||||
@ -535,20 +542,20 @@
|
||||
align="baseline">
|
||||
<label class="plain tabpanel-summary-label"
|
||||
value="&netmonitorUI.security.hsts;"/>
|
||||
<label id="security-http-strict-transport-security-value"
|
||||
class="plain tabpanel-summary-value devtools-monospace"
|
||||
crop="end"
|
||||
flex="1"/>
|
||||
<textbox id="security-http-strict-transport-security-value"
|
||||
class="plain tabpanel-summary-value devtools-monospace cropped-textbox"
|
||||
flex="1"
|
||||
readonly="true"/>
|
||||
</hbox>
|
||||
<hbox id="security-public-key-pinning"
|
||||
class="tabpanel-summary-container"
|
||||
align="baseline">
|
||||
<label class="plain tabpanel-summary-label"
|
||||
value="&netmonitorUI.security.hpkp;"/>
|
||||
<label id="security-public-key-pinning-value"
|
||||
class="plain tabpanel-summary-value devtools-monospace"
|
||||
crop="end"
|
||||
flex="1"/>
|
||||
<textbox id="security-public-key-pinning-value"
|
||||
class="plain tabpanel-summary-value devtools-monospace cropped-textbox"
|
||||
flex="1"
|
||||
readonly="true"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
@ -566,28 +573,28 @@
|
||||
align="baseline">
|
||||
<label class="plain tabpanel-summary-label"
|
||||
value="&certmgr.certdetail.cn;:"/>
|
||||
<label id="security-cert-subject-cn"
|
||||
class="plain tabpanel-summary-value devtools-monospace"
|
||||
crop="end"
|
||||
flex="1"/>
|
||||
<textbox id="security-cert-subject-cn"
|
||||
class="plain tabpanel-summary-value devtools-monospace cropped-textbox"
|
||||
flex="1"
|
||||
readonly="true"/>
|
||||
</hbox>
|
||||
<hbox class="tabpanel-summary-container"
|
||||
align="baseline">
|
||||
<label class="plain tabpanel-summary-label"
|
||||
value="&certmgr.certdetail.o;:"/>
|
||||
<label id="security-cert-subject-o"
|
||||
class="plain tabpanel-summary-value devtools-monospace"
|
||||
crop="end"
|
||||
flex="1"/>
|
||||
<textbox id="security-cert-subject-o"
|
||||
class="plain tabpanel-summary-value devtools-monospace cropped-textbox"
|
||||
flex="1"
|
||||
readonly="true"/>
|
||||
</hbox>
|
||||
<hbox class="tabpanel-summary-container"
|
||||
align="baseline">
|
||||
<label class="plain tabpanel-summary-label"
|
||||
value="&certmgr.certdetail.ou;:"/>
|
||||
<label id="security-cert-subject-ou"
|
||||
class="plain tabpanel-summary-value devtools-monospace"
|
||||
crop="end"
|
||||
flex="1"/>
|
||||
<textbox id="security-cert-subject-ou"
|
||||
class="plain tabpanel-summary-value devtools-monospace cropped-textbox"
|
||||
flex="1"
|
||||
readonly="true"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<vbox class="tabpanel-summary-container">
|
||||
@ -599,28 +606,28 @@
|
||||
align="baseline">
|
||||
<label class="plain tabpanel-summary-label"
|
||||
value="&certmgr.certdetail.cn;:"/>
|
||||
<label id="security-cert-issuer-cn"
|
||||
class="plain tabpanel-summary-value devtools-monospace"
|
||||
crop="end"
|
||||
flex="1"/>
|
||||
<textbox id="security-cert-issuer-cn"
|
||||
class="plain tabpanel-summary-value devtools-monospace cropped-textbox"
|
||||
flex="1"
|
||||
readonly="true"/>
|
||||
</hbox>
|
||||
<hbox class="tabpanel-summary-container"
|
||||
align="baseline">
|
||||
<label class="plain tabpanel-summary-label"
|
||||
value="&certmgr.certdetail.o;:"/>
|
||||
<label id="security-cert-issuer-o"
|
||||
class="plain tabpanel-summary-value devtools-monospace"
|
||||
crop="end"
|
||||
flex="1"/>
|
||||
<textbox id="security-cert-issuer-o"
|
||||
class="plain tabpanel-summary-value devtools-monospace cropped-textbox"
|
||||
flex="1"
|
||||
readonly="true"/>
|
||||
</hbox>
|
||||
<hbox class="tabpanel-summary-container"
|
||||
align="baseline">
|
||||
<label class="plain tabpanel-summary-label"
|
||||
value="&certmgr.certdetail.ou;:"/>
|
||||
<label id="security-cert-issuer-ou"
|
||||
class="plain tabpanel-summary-value devtools-monospace"
|
||||
crop="end"
|
||||
flex="1"/>
|
||||
<textbox id="security-cert-issuer-ou"
|
||||
class="plain tabpanel-summary-value devtools-monospace cropped-textbox"
|
||||
flex="1"
|
||||
readonly="true"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<vbox class="tabpanel-summary-container">
|
||||
@ -632,19 +639,19 @@
|
||||
align="baseline">
|
||||
<label class="plain tabpanel-summary-label"
|
||||
value="&certmgr.begins;:"/>
|
||||
<label id="security-cert-validity-begins"
|
||||
class="plain tabpanel-summary-value devtools-monospace"
|
||||
crop="end"
|
||||
flex="1"/>
|
||||
<textbox id="security-cert-validity-begins"
|
||||
class="plain tabpanel-summary-value devtools-monospace cropped-textbox"
|
||||
flex="1"
|
||||
readonly="true"/>
|
||||
</hbox>
|
||||
<hbox class="tabpanel-summary-container"
|
||||
align="baseline">
|
||||
<label class="plain tabpanel-summary-label"
|
||||
value="&certmgr.expires;:"/>
|
||||
<label id="security-cert-validity-expires"
|
||||
class="plain tabpanel-summary-value devtools-monospace"
|
||||
crop="end"
|
||||
flex="1"/>
|
||||
<textbox id="security-cert-validity-expires"
|
||||
class="plain tabpanel-summary-value devtools-monospace cropped-textbox"
|
||||
flex="1"
|
||||
readonly="true"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<vbox class="tabpanel-summary-container">
|
||||
@ -656,19 +663,19 @@
|
||||
align="baseline">
|
||||
<label class="plain tabpanel-summary-label"
|
||||
value="&certmgr.certdetail.sha256fingerprint;:"/>
|
||||
<label id="security-cert-sha256-fingerprint"
|
||||
class="plain tabpanel-summary-value devtools-monospace"
|
||||
crop="end"
|
||||
flex="1"/>
|
||||
<textbox id="security-cert-sha256-fingerprint"
|
||||
class="plain tabpanel-summary-value devtools-monospace cropped-textbox"
|
||||
flex="1"
|
||||
readonly="true"/>
|
||||
</hbox>
|
||||
<hbox class="tabpanel-summary-container"
|
||||
align="baseline">
|
||||
<label class="plain tabpanel-summary-label"
|
||||
value="&certmgr.certdetail.sha1fingerprint;:"/>
|
||||
<label id="security-cert-sha1-fingerprint"
|
||||
class="plain tabpanel-summary-value devtools-monospace"
|
||||
crop="end"
|
||||
flex="1"/>
|
||||
<textbox id="security-cert-sha1-fingerprint"
|
||||
class="plain tabpanel-summary-value devtools-monospace cropped-textbox"
|
||||
flex="1"
|
||||
readonly="true"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
|
@ -37,7 +37,7 @@ add_task(function* () {
|
||||
is(errorbox.hidden, false, "Error box is visble.");
|
||||
is(infobox.hidden, true, "Information box is hidden.");
|
||||
|
||||
isnot(errormsg.textContent, "", "Error message is not empty.");
|
||||
isnot(errormsg.value, "", "Error message is not empty.");
|
||||
|
||||
yield teardown(monitor);
|
||||
|
||||
|
@ -55,6 +55,7 @@ skip-if = true # bug 1092571
|
||||
[browser_wa_graph-zoom.js]
|
||||
[browser_wa_inspector.js]
|
||||
[browser_wa_inspector-toggle.js]
|
||||
[browser_wa_inspector-width.js]
|
||||
[browser_wa_inspector-bypass-01.js]
|
||||
[browser_wa_navigate.js]
|
||||
[browser_wa_properties-view.js]
|
||||
|
@ -0,0 +1,63 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/**
|
||||
* Test that the WebAudioInspector's Width is saved as
|
||||
* a preference
|
||||
*/
|
||||
|
||||
add_task(function*() {
|
||||
let { target, panel } = yield initWebAudioEditor(SIMPLE_CONTEXT_URL);
|
||||
let { panelWin } = panel;
|
||||
let { gFront, $, $$, EVENTS, InspectorView } = panelWin;
|
||||
let gVars = InspectorView._propsView;
|
||||
|
||||
let started = once(gFront, "start-context");
|
||||
|
||||
reload(target);
|
||||
|
||||
let [actors] = yield Promise.all([
|
||||
get3(gFront, "create-node"),
|
||||
waitForGraphRendered(panelWin, 3, 2)
|
||||
]);
|
||||
let nodeIds = actors.map(actor => actor.actorID);
|
||||
|
||||
ok(!InspectorView.isVisible(), "InspectorView hidden on start.");
|
||||
|
||||
// Open inspector pane
|
||||
$("#inspector-pane-toggle").click();
|
||||
yield once(panelWin, EVENTS.UI_INSPECTOR_TOGGLED);
|
||||
|
||||
let newInspectorWidth = 500;
|
||||
|
||||
// Setting width to new_inspector_width
|
||||
$("#web-audio-inspector").setAttribute("width", newInspectorWidth);
|
||||
reload(target);
|
||||
|
||||
//Width should be 500 after reloading
|
||||
[actors] = yield Promise.all([
|
||||
get3(gFront, "create-node"),
|
||||
waitForGraphRendered(panelWin, 3, 2)
|
||||
]);
|
||||
nodeIds = actors.map(actor => actor.actorID);
|
||||
|
||||
// Open inspector pane
|
||||
$("#inspector-pane-toggle").click();
|
||||
yield once(panelWin, EVENTS.UI_INSPECTOR_TOGGLED);
|
||||
|
||||
let nodeSet = Promise.all([
|
||||
once(panelWin, EVENTS.UI_INSPECTOR_NODE_SET),
|
||||
once(panelWin, EVENTS.UI_PROPERTIES_TAB_RENDERED),
|
||||
once(panelWin, EVENTS.UI_AUTOMATION_TAB_RENDERED)
|
||||
]);
|
||||
|
||||
click(panelWin, findGraphNode(panelWin, nodeIds[1]));
|
||||
yield nodeSet;
|
||||
|
||||
// Getting the width of the audio inspector
|
||||
let width = $("#web-audio-inspector").getAttribute("width");
|
||||
|
||||
is(width, newInspectorWidth, "WebAudioEditor's Inspector width should be saved as a preference");
|
||||
|
||||
yield teardown(target);
|
||||
});
|
@ -3,9 +3,7 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
// Store width as a preference rather than hardcode
|
||||
// TODO bug 1009056
|
||||
const INSPECTOR_WIDTH = 300;
|
||||
const MIN_INSPECTOR_WIDTH = 300;
|
||||
|
||||
// Strings for rendering
|
||||
const EXPAND_INSPECTOR_STRING = L10N.getStr("expandInspector");
|
||||
@ -32,7 +30,7 @@ let InspectorView = {
|
||||
// Set up view controller
|
||||
this.el = $("#web-audio-inspector");
|
||||
this.splitter = $("#inspector-splitter");
|
||||
this.el.setAttribute("width", INSPECTOR_WIDTH);
|
||||
this.el.setAttribute("width", Services.prefs.getIntPref("devtools.webaudioeditor.inspectorWidth"));
|
||||
this.button = $("#inspector-pane-toggle");
|
||||
mixin(this, ToggleMixin);
|
||||
this.bindToggle();
|
||||
@ -149,6 +147,10 @@ let InspectorView = {
|
||||
},
|
||||
|
||||
_onResize: function () {
|
||||
if (this.el.getAttribute("width") < MIN_INSPECTOR_WIDTH) {
|
||||
this.el.setAttribute("width", MIN_INSPECTOR_WIDTH);
|
||||
}
|
||||
Services.prefs.setIntPref("devtools.webaudioeditor.inspectorWidth", this.el.getAttribute("width"));
|
||||
window.emit(EVENTS.UI_INSPECTOR_RESIZE);
|
||||
},
|
||||
|
||||
|
@ -838,12 +838,23 @@ just addresses the organization to follow, e.g. "This site is run by " -->
|
||||
<!ENTITY processHang.terminateProcess.label "Kill Web Process">
|
||||
<!ENTITY processHang.terminateProcess.accessKey "K">
|
||||
|
||||
<!ENTITY readingList.label "Reading List">
|
||||
<!ENTITY readingList.sidebar.commandKey "R">
|
||||
<!ENTITY emeLearnMoreContextMenu.label "Learn more about DRM…">
|
||||
<!ENTITY emeLearnMoreContextMenu.accesskey "D">
|
||||
|
||||
<!ENTITY emeNotificationsNotNow.label "Not now">
|
||||
<!ENTITY emeNotificationsNotNow.accesskey "N">
|
||||
<!ENTITY emeNotificationsDontAskAgain.label "Don't ask me again">
|
||||
<!ENTITY emeNotificationsDontAskAgain.accesskey "D">
|
||||
|
||||
<!ENTITY readingList.label "Reading List">
|
||||
<!ENTITY readingList.sidebar.commandKey "R">
|
||||
<!-- Pre-landed string for bug 1124400 -->
|
||||
<!ENTITY readingList.showSidebar.label "Show Reading List Sidebar">
|
||||
<!-- Pre-landed string for bug 1124153 -->
|
||||
<!ENTITY readingList.sidebar.showMore.label "Show more…">
|
||||
<!-- Pre-landed string for bug 1133662 -->
|
||||
<!ENTITY readingList.sidebar.emptyText "Add articles to your Reading List to save them for later and find them easily when you need them.">
|
||||
<!-- Pre-landed string for bug 1123525 -->
|
||||
<!ENTITY readingList.sidebar.delete.tooltip "Remove this from your Reading List">
|
||||
<!-- Pre-landed strings for bug 1123519 -->
|
||||
<!ENTITY readingList.sidebar.add.label "Add to Reading List">
|
||||
<!ENTITY readingList.sidebar.add.tooltip "Add this page to your Reading List">
|
||||
|
@ -651,3 +651,19 @@ appmenu.restartNeeded.description = Restart %S to apply updates
|
||||
appmenu.updateFailed.description = Background update failed, please download update
|
||||
appmenu.restartBrowserButton.label = Restart %S
|
||||
appmenu.downloadUpdateButton.label = Download Update
|
||||
|
||||
# Pre-landed string for bug 1124153
|
||||
# LOCALIZATION NOTE(readingList.sidebar.showMore.tooltip): %S is the number of items that will be added by clicking this button
|
||||
# Semicolon-separated list of plural forms. See:
|
||||
# http://developer.mozilla.org/en/docs/Localization_and_Plurals
|
||||
readingList.sidebar.showMore.tooltip = Show %S more item;Show %S more items
|
||||
# Pre-landed strings for bug 1131457 / bug 1131461
|
||||
readingList.urlbar.add = Add page to Reading List
|
||||
readingList.urlbar.addDone = Page added to Reading List
|
||||
readingList.urlbar.remove = Remove page from Reading List
|
||||
readingList.urlbar.removeDone = Page removed from Reading List
|
||||
# Pre-landed strings for bug 1133610 & bug 1133611
|
||||
# LOCALIZATION NOTE(readingList.promo.noSync.label): %S a link, using the text from readingList.promo.noSync.link
|
||||
readingList.promo.noSync.label = Access your Reading List on all your devices. %S
|
||||
readingList.promo.noSync.link = Get started with Sync.
|
||||
readingList.promo.hasSync.label = You can now access your Reading List on all your devices connected by Sync.
|
||||
|
@ -26,6 +26,8 @@
|
||||
<!ENTITY syncMy.label "Sync My">
|
||||
<!ENTITY engine.bookmarks.label "Bookmarks">
|
||||
<!ENTITY engine.bookmarks.accesskey "m">
|
||||
<!ENTITY engine.readinglist.label "Reading List">
|
||||
<!ENTITY engine.readinglist.accesskey "L">
|
||||
<!ENTITY engine.tabs.label "Tabs">
|
||||
<!ENTITY engine.tabs.accesskey "T">
|
||||
<!ENTITY engine.history.label "History">
|
||||
|
@ -15,6 +15,8 @@
|
||||
-->
|
||||
<!ENTITY engine.bookmarks.label "Bookmarks">
|
||||
<!ENTITY engine.bookmarks.accesskey "m">
|
||||
<!ENTITY engine.readinglist.label "Reading List">
|
||||
<!ENTITY engine.readinglist.accesskey "L">
|
||||
<!ENTITY engine.history.label "History">
|
||||
<!ENTITY engine.history.accesskey "r">
|
||||
<!ENTITY engine.tabs.label "Tabs">
|
||||
|
@ -579,10 +579,6 @@ label.requests-menu-status-code {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#security-error-message {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.security-warning-icon {
|
||||
background-image: url(alerticon-warning.png);
|
||||
background-size: 13px 12px;
|
||||
|
@ -490,7 +490,7 @@ browser.jar:
|
||||
* skin/classic/aero/browser/devedition.css (devedition-aero.css)
|
||||
* skin/classic/aero/browser/browser-lightweightTheme.css
|
||||
skin/classic/aero/browser/click-to-play-warning-stripes.png
|
||||
* skin/classic/aero/browser/content-contextmenu.svg
|
||||
skin/classic/aero/browser/content-contextmenu.svg
|
||||
skin/classic/aero/browser/drm-icon.svg (../shared/drm-icon.svg)
|
||||
* skin/classic/aero/browser/engineManager.css
|
||||
skin/classic/aero/browser/fullscreen-darknoise.png
|
||||
|
@ -298,11 +298,6 @@ pref("chrome.override_package.passwordmgr", "browser");
|
||||
// enable xul error pages
|
||||
pref("browser.xul.error_pages.enabled", true);
|
||||
|
||||
pref("browser.history.grouping", "day");
|
||||
pref("browser.history.showSessions", false);
|
||||
pref("browser.sessionhistory.max_entries", 50);
|
||||
pref("browser.history_expire_sites", 40000);
|
||||
|
||||
// disable color management
|
||||
pref("gfx.color_management.mode", 0);
|
||||
|
||||
@ -863,3 +858,6 @@ pref("reader.color_scheme.values", "[\"light\",\"dark\",\"auto\"]");
|
||||
|
||||
// Whether to use a vertical or horizontal toolbar.
|
||||
pref("reader.toolbar.vertical", false);
|
||||
|
||||
// Whether or not to display buttons related to reading list in reader view.
|
||||
pref("browser.readinglist.enabled", true);
|
||||
|
@ -34,6 +34,8 @@ import java.io.OutputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Locale;
|
||||
|
||||
public class SearchEngineManager implements SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
@ -42,6 +44,9 @@ public class SearchEngineManager implements SharedPreferences.OnSharedPreference
|
||||
// Gecko pref that defines the name of the default search engine.
|
||||
private static final String PREF_GECKO_DEFAULT_ENGINE = "browser.search.defaultenginename";
|
||||
|
||||
// Gecko pref that defines the name of the default searchplugin locale.
|
||||
private static final String PREF_GECKO_DEFAULT_LOCALE = "distribution.searchplugins.defaultLocale";
|
||||
|
||||
// Key for shared preference that stores default engine name.
|
||||
private static final String PREF_DEFAULT_ENGINE_KEY = "search.engines.defaultname";
|
||||
|
||||
@ -65,6 +70,10 @@ public class SearchEngineManager implements SharedPreferences.OnSharedPreference
|
||||
// This should only be accessed from the background thread.
|
||||
private String fallbackLocale;
|
||||
|
||||
// Cached version of default locale included in Distribution preferences.
|
||||
// This should only be accessed from the background thread.
|
||||
private String distributionLocale;
|
||||
|
||||
public static interface SearchEngineCallback {
|
||||
public void execute(SearchEngine engine);
|
||||
}
|
||||
@ -239,7 +248,16 @@ public class SearchEngineManager implements SharedPreferences.OnSharedPreference
|
||||
try {
|
||||
final JSONObject all = new JSONObject(FileUtils.getFileContents(prefFile));
|
||||
|
||||
// First, check to see if there's a locale-specific override.
|
||||
// First, look for a default locale specified by the distribution.
|
||||
if (all.has("Preferences")) {
|
||||
final JSONObject prefs = all.getJSONObject("Preferences");
|
||||
if (prefs.has(PREF_GECKO_DEFAULT_LOCALE)) {
|
||||
Log.d(LOG_TAG, "Found default searchplugin locale in distribution Preferences.");
|
||||
distributionLocale = prefs.getString(PREF_GECKO_DEFAULT_LOCALE);
|
||||
}
|
||||
}
|
||||
|
||||
// Then, check to see if there's a locale-specific default engine override.
|
||||
final String languageTag = Locales.getLanguageTag(Locale.getDefault());
|
||||
final String overridesKey = "LocalizablePreferences." + languageTag;
|
||||
if (all.has(overridesKey)) {
|
||||
@ -250,7 +268,7 @@ public class SearchEngineManager implements SharedPreferences.OnSharedPreference
|
||||
}
|
||||
}
|
||||
|
||||
// Next, check to see if there's a non-override default pref.
|
||||
// Next, check to see if there's a non-override default engine pref.
|
||||
if (all.has("LocalizablePreferences")) {
|
||||
final JSONObject localizablePrefs = all.getJSONObject("LocalizablePreferences");
|
||||
if (localizablePrefs.has(PREF_GECKO_DEFAULT_ENGINE)) {
|
||||
@ -443,12 +461,43 @@ public class SearchEngineManager implements SharedPreferences.OnSharedPreference
|
||||
return null;
|
||||
}
|
||||
|
||||
final File[] files = (new File(pluginsDir, "common")).listFiles();
|
||||
if (files == null) {
|
||||
// Collect an array of files to scan using the same approach as
|
||||
// DirectoryService._appendDistroSearchDirs which states:
|
||||
// Common engines are loaded for all locales. If there is no locale directory for
|
||||
// the current locale, there is a pref: "distribution.searchplugins.defaultLocale",
|
||||
// which specifies a default locale to use.
|
||||
ArrayList<File> files = new ArrayList<>();
|
||||
|
||||
// Load files from the common folder first
|
||||
final File[] commonFiles = (new File(pluginsDir, "common")).listFiles();
|
||||
if (commonFiles != null) {
|
||||
Collections.addAll(files, commonFiles);
|
||||
}
|
||||
|
||||
// Next, check to see if there's a locale-specific override.
|
||||
final File localeDir = new File(pluginsDir, "locale");
|
||||
if (localeDir != null) {
|
||||
final String languageTag = Locales.getLanguageTag(Locale.getDefault());
|
||||
final File[] localeFiles = (new File(localeDir, languageTag)).listFiles();
|
||||
if (localeFiles != null) {
|
||||
Collections.addAll(files, localeFiles);
|
||||
} else {
|
||||
// We didn't append the locale dir - try the default one.
|
||||
if (distributionLocale != null) {
|
||||
final File[] defaultLocaleFiles = (new File(localeDir, distributionLocale)).listFiles();
|
||||
if (defaultLocaleFiles != null) {
|
||||
Collections.addAll(files, defaultLocaleFiles);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (files.isEmpty()) {
|
||||
Log.e(LOG_TAG, "Could not find search plugin files in distribution directory");
|
||||
return null;
|
||||
}
|
||||
return createEngineFromFileList(files, name);
|
||||
|
||||
return createEngineFromFileList(files.toArray(new File[files.size()]), name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -57,9 +57,16 @@ let AboutReader = function(mm, win) {
|
||||
|
||||
this._setupStyleDropdown();
|
||||
this._setupButton("close-button", this._onReaderClose.bind(this), "aboutReader.toolbar.close");
|
||||
this._setupButton("toggle-button", this._onReaderToggle.bind(this), "aboutReader.toolbar.addToReadingList");
|
||||
this._setupButton("share-button", this._onShare.bind(this), "aboutReader.toolbar.share");
|
||||
this._setupButton("list-button", this._onList.bind(this), "aboutReader.toolbar.openReadingList");
|
||||
|
||||
try {
|
||||
if (Services.prefs.getBoolPref("browser.readinglist.enabled")) {
|
||||
this._setupButton("toggle-button", this._onReaderToggle.bind(this), "aboutReader.toolbar.addToReadingList");
|
||||
this._setupButton("list-button", this._onList.bind(this), "aboutReader.toolbar.openReadingList");
|
||||
}
|
||||
} catch (e) {
|
||||
// Pref doesn't exist.
|
||||
}
|
||||
|
||||
let colorSchemeValues = JSON.parse(Services.prefs.getCharPref("reader.color_scheme.values"));
|
||||
let colorSchemeOptions = colorSchemeValues.map((value) => {
|
||||
@ -699,6 +706,7 @@ AboutReader.prototype = {
|
||||
|
||||
_setupButton: function Reader_setupButton(id, callback, titleEntity) {
|
||||
let button = this._doc.getElementById(id);
|
||||
button.removeAttribute("hidden");
|
||||
button.setAttribute("title", gStrings.GetStringFromName(titleEntity));
|
||||
|
||||
button.addEventListener("click", function(aEvent) {
|
||||
|
@ -38,8 +38,8 @@
|
||||
<div class="dropdown-arrow"/>
|
||||
</li>
|
||||
</ul>
|
||||
<li><button id="toggle-button" class="button toggle-button"/></li>
|
||||
<li><button id="list-button" class="button list-button"/></li>
|
||||
<li><button id="toggle-button" class="button toggle-button" hidden="true"/></li>
|
||||
<li><button id="list-button" class="button list-button" hidden="true"/></li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
|
@ -229,6 +229,10 @@ let FrameSnapshotFront = protocol.FrontClass(FrameSnapshotActor, {
|
||||
* made when drawing frame inside an animation loop.
|
||||
*/
|
||||
let CanvasActor = exports.CanvasActor = protocol.ActorClass({
|
||||
// Reset for each recording, boolean indicating whether or not
|
||||
// any draw calls were called for a recording.
|
||||
_animationContainsDrawCall: false,
|
||||
|
||||
typeName: "canvas",
|
||||
initialize: function(conn, tabActor) {
|
||||
protocol.Actor.prototype.initialize.call(this, conn);
|
||||
@ -286,6 +290,16 @@ let CanvasActor = exports.CanvasActor = protocol.ActorClass({
|
||||
response: { initialized: RetVal("boolean") }
|
||||
}),
|
||||
|
||||
/**
|
||||
* Returns whether or not the CanvasActor is recording an animation.
|
||||
* Used in tests.
|
||||
*/
|
||||
isRecording: method(function() {
|
||||
return !!this._callWatcher.isRecording();
|
||||
}, {
|
||||
response: { recording: RetVal("boolean") }
|
||||
}),
|
||||
|
||||
/**
|
||||
* Records a snapshot of all the calls made during the next animation frame.
|
||||
* The animation should be implemented via the de-facto requestAnimationFrame
|
||||
@ -300,6 +314,7 @@ let CanvasActor = exports.CanvasActor = protocol.ActorClass({
|
||||
return this._currentAnimationFrameSnapshot.promise;
|
||||
}
|
||||
|
||||
this._recordingContainsDrawCall = false;
|
||||
this._callWatcher.eraseRecording();
|
||||
this._callWatcher.resumeRecording();
|
||||
|
||||
@ -340,7 +355,11 @@ let CanvasActor = exports.CanvasActor = protocol.ActorClass({
|
||||
_handleAnimationFrame: function(functionCall) {
|
||||
if (!this._animationStarted) {
|
||||
this._handleAnimationFrameBegin();
|
||||
} else {
|
||||
}
|
||||
// Check to see if draw calls occurred yet, as it could be future frames,
|
||||
// like in the scenario where requestAnimationFrame is called to trigger an animation,
|
||||
// and rAF is at the beginning of the animate loop.
|
||||
else if (this._animationContainsDrawCall) {
|
||||
this._handleAnimationFrameEnd(functionCall);
|
||||
}
|
||||
},
|
||||
@ -362,6 +381,7 @@ let CanvasActor = exports.CanvasActor = protocol.ActorClass({
|
||||
// previously recorded calls.
|
||||
let functionCalls = this._callWatcher.pauseRecording();
|
||||
this._callWatcher.eraseRecording();
|
||||
this._animationContainsDrawCall = false;
|
||||
|
||||
// Since the animation frame finished, get a hold of the (already retrieved)
|
||||
// canvas pixels to conveniently create a screenshot of the final rendering.
|
||||
@ -410,6 +430,8 @@ let CanvasActor = exports.CanvasActor = protocol.ActorClass({
|
||||
let dimensions = CanvasFront.THUMBNAIL_SIZE;
|
||||
let thumbnail;
|
||||
|
||||
this._animationContainsDrawCall = true;
|
||||
|
||||
// Create a thumbnail on every draw call on the canvas context, to augment
|
||||
// the respective function call actor with this additional data.
|
||||
if (global == CallWatcherFront.CANVAS_WEBGL_CONTEXT) {
|
||||
|
@ -248,6 +248,10 @@ body {
|
||||
border-bottom: 1px solid #c1c1c1;
|
||||
}
|
||||
|
||||
.button[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
text-align: center;
|
||||
list-style: none;
|
||||
|
Loading…
Reference in New Issue
Block a user