This commit is contained in:
Carsten "Tomcat" Book 2014-10-10 15:09:16 +02:00
Родитель ced1cd1fbd 92cce75ada
Коммит 68b41009fc
25 изменённых файлов: 195 добавлений и 86 удалений

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

@ -56,8 +56,9 @@ let developerHUD = {
},
init: function dwp_init() {
if (this._client)
if (this._client) {
return;
}
if (!DebuggerServer.initialized) {
RemoteDebugger.initServer();
@ -91,8 +92,9 @@ let developerHUD = {
},
uninit: function dwp_uninit() {
if (!this._client)
if (!this._client) {
return;
}
for (let frame of this._targets.keys()) {
this.untrackFrame(frame);
@ -109,8 +111,9 @@ let developerHUD = {
* on an app frame.
*/
trackFrame: function dwp_trackFrame(frame) {
if (this._targets.has(frame))
if (this._targets.has(frame)) {
return;
}
DebuggerServer.connectToChild(this._conn, frame).then(actor => {
let target = new Target(frame, actor);
@ -339,10 +342,10 @@ let consoleWatcher = {
if (pageError.warning || pageError.strict) {
metric.name = 'warnings';
output += 'warning (';
output += 'Warning (';
} else {
metric.name = 'errors';
output += 'error (';
output += 'Error (';
}
if (this._security.indexOf(pageError.category) > -1) {
@ -359,12 +362,12 @@ let consoleWatcher = {
case 'error':
metric.name = 'errors';
output += 'error (console)';
output += 'Error (console)';
break;
case 'warn':
metric.name = 'warnings';
output += 'warning (console)';
output += 'Warning (console)';
break;
default:
@ -378,7 +381,7 @@ let consoleWatcher = {
let {start, end, sourceURL, interruptible} = packet;
metric.interruptible = interruptible;
let duration = Math.round((end - start) * 100) / 100;
output += 'reflow: ' + duration + 'ms';
output += 'Reflow: ' + duration + 'ms';
if (sourceURL) {
output += ' ' + this.formatSourceURL(packet);
}
@ -425,6 +428,7 @@ let eventLoopLagWatcher = {
if (this._active == value) {
return;
}
this._active = value;
// Toggle the state of existing fronts.
@ -446,7 +450,7 @@ let eventLoopLagWatcher = {
this._fronts.set(target, front);
front.on('event-loop-lag', time => {
target.update({name: 'jank', value: time}, 'jank: ' + time + 'ms');
target.update({name: 'jank', value: time}, 'Jank: ' + time + 'ms');
});
if (this._active) {
@ -500,7 +504,7 @@ let memoryWatcher = {
update: function mw_update() {
let watching = this._watching;
let active = watching.memory || watching.uss;
let active = watching.appmemory || watching.uss;
if (this._active) {
for (let target of this._fronts.keys()) {
@ -519,10 +523,11 @@ let memoryWatcher = {
measure: function mw_measure(target) {
let watch = this._watching;
let front = this._fronts.get(target);
let format = this.formatMemory;
if (watch.uss) {
front.residentUnique().then(value => {
target.update({name: 'uss', value: value});
target.update({name: 'uss', value: value}, 'USS: ' + format(value));
}, err => {
console.error(err);
});
@ -531,36 +536,46 @@ let memoryWatcher = {
if (watch.appmemory) {
front.measure().then(data => {
let total = 0;
if (watch.jsobjects) {
total += parseInt(data.jsObjectsSize);
}
if (watch.jsstrings) {
total += parseInt(data.jsStringsSize);
}
if (watch.jsother) {
total += parseInt(data.jsOtherSize);
}
if (watch.dom) {
total += parseInt(data.domSize);
}
if (watch.style) {
total += parseInt(data.styleSize);
}
if (watch.other) {
total += parseInt(data.otherSize);
let details = [];
function item(name, condition, value) {
if (!condition) {
return;
}
let v = parseInt(value);
total += v;
details.push(name + ': ' + format(v));
}
item('JS objects', watch.jsobjects, data.jsObjectsSize);
item('JS strings', watch.jsstrings, data.jsStringsSize);
item('JS other', watch.jsother, data.jsOtherSize);
item('DOM', watch.dom, data.domSize);
item('Style', watch.style, data.styleSize);
item('Other', watch.other, data.otherSize);
// TODO Also count images size (bug #976007).
target.update({name: 'memory', value: total});
target.update({name: 'memory', value: total},
'App Memory: ' + format(total) + ' (' + details.join(', ') + ')');
}, err => {
console.error(err);
});
}
let timer = setTimeout(() => this.measure(target), 500);
let timer = setTimeout(() => this.measure(target), 800);
this._timers.set(target, timer);
},
formatMemory: function mw_formatMemory(bytes) {
var prefix = ['','K','M','G','T','P','E','Z','Y'];
var i = 0;
for (; bytes > 1024 && i < prefix.length; ++i) {
bytes /= 1024;
}
return (Math.round(bytes * 100) / 100) + ' ' + prefix[i] + 'B';
},
trackTarget: function mw_trackTarget(target) {
target.register('uss');
target.register('memory');

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

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="3a2947df41a480de1457a6dcdbf46ad0af70d8e0">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1036b544b7e102592bd9fab95cd9317329ac1293"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="cc5da7b055e2b06fdeb46fa94970550392ee571d"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

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

@ -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="1036b544b7e102592bd9fab95cd9317329ac1293"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="cc5da7b055e2b06fdeb46fa94970550392ee571d"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>

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

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1036b544b7e102592bd9fab95cd9317329ac1293"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="cc5da7b055e2b06fdeb46fa94970550392ee571d"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ca2008ac50b163d31244ef9f036cb224f4f229b"/>

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

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="3a2947df41a480de1457a6dcdbf46ad0af70d8e0">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1036b544b7e102592bd9fab95cd9317329ac1293"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="cc5da7b055e2b06fdeb46fa94970550392ee571d"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

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

@ -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="1036b544b7e102592bd9fab95cd9317329ac1293"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="cc5da7b055e2b06fdeb46fa94970550392ee571d"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>

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

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="3a2947df41a480de1457a6dcdbf46ad0af70d8e0">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1036b544b7e102592bd9fab95cd9317329ac1293"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="cc5da7b055e2b06fdeb46fa94970550392ee571d"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

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

@ -17,7 +17,7 @@
</project>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1036b544b7e102592bd9fab95cd9317329ac1293"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="cc5da7b055e2b06fdeb46fa94970550392ee571d"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ca2008ac50b163d31244ef9f036cb224f4f229b"/>

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

@ -4,6 +4,6 @@
"remote": "",
"branch": ""
},
"revision": "ab9466a85acc108164bc17b9064387142b82d4da",
"revision": "eeeae73691f91cd5042660b0f19c84747ebc7be2",
"repo_path": "/integration/gaia-central"
}

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

@ -17,7 +17,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="1036b544b7e102592bd9fab95cd9317329ac1293"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="cc5da7b055e2b06fdeb46fa94970550392ee571d"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

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

@ -15,7 +15,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="1036b544b7e102592bd9fab95cd9317329ac1293"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="cc5da7b055e2b06fdeb46fa94970550392ee571d"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

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

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1036b544b7e102592bd9fab95cd9317329ac1293"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="cc5da7b055e2b06fdeb46fa94970550392ee571d"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ca2008ac50b163d31244ef9f036cb224f4f229b"/>

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

@ -17,7 +17,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="1036b544b7e102592bd9fab95cd9317329ac1293"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="cc5da7b055e2b06fdeb46fa94970550392ee571d"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

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

@ -5,7 +5,6 @@
<html>
<head>
<meta charset="utf-8">
<title>Loop Panel</title>
<link rel="stylesheet" type="text/css" href="loop/shared/css/reset.css">
<link rel="stylesheet" type="text/css" href="loop/shared/css/common.css">
<link rel="stylesheet" type="text/css" href="loop/shared/css/panel.css">

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

@ -233,7 +233,6 @@ p {
/* Alerts/Notifications */
.notificationContainer {
border-bottom: 2px solid #E9E9E9;
margin-bottom: 1em;
}
.messages > .notificationContainer > .alert {

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

@ -25,6 +25,12 @@ body {
/* Tabs and tab selection buttons */
.tab-view-container {
background-image: url("../img/beta-ribbon.svg#beta-ribbon");
background-size: 36px 36px;
background-repeat: no-repeat;
}
.tab-view {
display: flex;
flex-direction: row;
@ -93,6 +99,12 @@ body {
.content-area header {
font-weight: 700;
-moz-padding-start: 20px;
}
.tab-view + .tab .content-area header {
/* The header shouldn't be indented if the tabs are present. */
-moz-padding-start: 0;
}
.content-area label {

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

@ -0,0 +1,26 @@
<?xml version="1.0"?>
<!-- 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/. -->
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 100 100"
xmlns:xlink="http://www.w3.org/1999/xlink"
enable-background="new 0 0 100 100">
<style>
</style>
<defs>
<g id="beta-ribbon">
<path fill="#e6e6e6" d="M0,100 100,0 49.1,0 0,49.2z"/>
<path fill="#fff" d="M0,94.7 94.7,0 46.5,0 0,46.6z"/>
<g fill="#999">
<path d="m25.9,56.7l-4,4-13.7-13.7 3.7-3.7c2.4-2.4 5.7-4.1 8.3-1.4 1.7,1.7 1.4,3.9 .5,5.3l.1,.1c1.6-1.1 4-1.9 6.3,.3 3,3 1.3,6.5-1.2,9.1zm-12.2-12.2l-2.2,2.2 4.3,4.3 2.3-2.3c1.6-1.6 1.8-3.1 .2-4.7-1.4-1.6-2.9-1.2-4.6,.5zm6.1,5.4l-2.5,2.5 4.9,4.9 2.4-2.4c1.3-1.3 2.5-3.3 .6-5.3-2-2-3.9-1.2-5.4,.3z"/>
<path d="m30.7,42.7c2.5,2.2 4.6,2.1 6.2,.5 1-1 1.5-2 1.6-3.6l2,.4c-.2,1.7-.9,3.4-2.2,4.7-3.1,3.1-6.9,2.5-10.2-.7-3.2-3.2-3.8-7.1-1.1-9.9 2.7-2.7 6.2-2.3 9.4,.9 .4,.4 .7,.7 .9,1l-6.6,6.7zm-1.4-1.4l4.9-4.9c-2.2-2.1-4.1-2.5-5.7-.9-1.4,1.5-1.3,3.4 .8,5.8z"/>
<path d="m49.8,31.8c-.2,1.1-.8,2.2-1.6,3.1-1.9,1.9-4,1.6-5.9-.2l-6.3-6.3-1.6,1.6-1.4-1.4 1.7-1.7-2.4-2.4 1.6-2 2.6,2.6 2.6-2.6 1.2,1.6-2.4,2.4 6.3,6.3c1.1,1.1 1.9,1.2 2.8,.3 .5-.5 .7-1 .9-1.8l1.9,.5z"/>
<path d="m57,20.8c.8,.8 1.4,.9 2.1,.6l.8,1.7c-1.1,.8-2.1,1.1-3.4,.5 .3,1.7-.4,3.3-1.6,4.6-2.1,2.1-4.7,2.1-6.6,.2-2.2-2.2-1.6-5.1 1.5-8.3l1.4-1.3-.8-.8c-1.5-1.5-2.8-1.3-4.3,.2-.7,.7-1.5,1.8-2.2,3.3l-1.8-.9c.8-1.8 1.8-3.1 2.8-4.2 2.7-2.7 5.1-2.5 7.2-.4l4.9,4.8zm-2,1.6l-2.6-2.6-1.3,1.3c-2.2,2.2-2.2,3.8-.9,5.1 1.3,1.3 2.5,1.4 3.8,.1 1.1-1.1 1.3-2.4 1-3.9z"/>
<path d="M93.4,0 0,94.1 0,96 95.2,0z"/>
<path d="M45.3,0 0,46 0,47.9 47,0z"/>
</g>
</g>
</defs>
<use id="beta-ribbon" xlink:href="#beta-ribbon"/>
</svg>

После

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

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

@ -48,6 +48,7 @@ browser.jar:
content/browser/loop/shared/img/svg/glyph-signin-16x16.svg (content/shared/img/svg/glyph-signin-16x16.svg)
content/browser/loop/shared/img/svg/glyph-signout-16x16.svg (content/shared/img/svg/glyph-signout-16x16.svg)
content/browser/loop/shared/img/audio-call-avatar.svg (content/shared/img/audio-call-avatar.svg)
content/browser/loop/shared/img/beta-ribbon.svg (content/shared/img/beta-ribbon.svg)
content/browser/loop/shared/img/icons-10x10.svg (content/shared/img/icons-10x10.svg)
content/browser/loop/shared/img/icons-14x14.svg (content/shared/img/icons-14x14.svg)
content/browser/loop/shared/img/icons-16x16.svg (content/shared/img/icons-16x16.svg)

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

@ -5,7 +5,6 @@
<html>
<head>
<meta charset="utf-8">
<title>Loop</title>
<link rel="stylesheet" type="text/css" href="shared/css/reset.css">
<link rel="stylesheet" type="text/css" href="shared/css/common.css">
<link rel="stylesheet" type="text/css" href="shared/css/conversation.css">

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

@ -25,7 +25,7 @@ loop.webapp = (function($, _, OT, mozL10n) {
var HomeView = React.createClass({displayName: 'HomeView',
render: function() {
return (
React.DOM.p(null, mozL10n.get("welcome"))
React.DOM.p(null, mozL10n.get("welcome", {clientShortname: mozL10n.get("clientShortname2")}))
);
}
});
@ -37,13 +37,13 @@ loop.webapp = (function($, _, OT, mozL10n) {
render: function() {
var useLatestFF = mozL10n.get("use_latest_firefox", {
"firefoxBrandNameLink": React.renderComponentToStaticMarkup(
React.DOM.a({target: "_blank", href: "https://www.mozilla.org/firefox/"}, "Firefox")
React.DOM.a({target: "_blank", href: mozL10n.get("brand_website")}, mozL10n.get("brandShortname"))
)
});
return (
React.DOM.div(null,
React.DOM.h2(null, mozL10n.get("incompatible_browser")),
React.DOM.p(null, mozL10n.get("powered_by_webrtc")),
React.DOM.p(null, mozL10n.get("powered_by_webrtc", {clientShortname: mozL10n.get("clientShortname2")})),
React.DOM.p({dangerouslySetInnerHTML: {__html: useLatestFF}})
)
);
@ -58,8 +58,8 @@ loop.webapp = (function($, _, OT, mozL10n) {
return (
React.DOM.div(null,
React.DOM.h2(null, mozL10n.get("incompatible_device")),
React.DOM.p(null, mozL10n.get("sorry_device_unsupported")),
React.DOM.p(null, mozL10n.get("use_firefox_windows_mac_linux"))
React.DOM.p(null, mozL10n.get("sorry_device_unsupported", {clientShortname: mozL10n.get("clientShortname2")})),
React.DOM.p(null, mozL10n.get("use_firefox_windows_mac_linux", {brandShortname: mozL10n.get("brandShortname")}))
)
);
}
@ -79,11 +79,11 @@ loop.webapp = (function($, _, OT, mozL10n) {
}
return (
React.DOM.div({className: "promote-firefox"},
React.DOM.h3(null, mozL10n.get("promote_firefox_hello_heading")),
React.DOM.h3(null, mozL10n.get("promote_firefox_hello_heading", {brandShortname: mozL10n.get("brandShortname")})),
React.DOM.p(null,
React.DOM.a({className: "btn btn-large btn-accept",
href: "https://www.mozilla.org/firefox/"},
mozL10n.get("get_firefox_button")
href: mozL10n.get("brand_website")},
mozL10n.get("get_firefox_button", {brandShortname: mozL10n.get("brandShortname")})
)
)
)
@ -232,7 +232,9 @@ loop.webapp = (function($, _, OT, mozL10n) {
return (
React.DOM.header({className: "standalone-header header-box container-box"},
ConversationBranding(null),
React.DOM.div({className: "loop-logo", title: "Firefox WebRTC! logo"}),
React.DOM.div({className: "loop-logo",
title: mozL10n.get("client_alttext",
{clientShortname: mozL10n.get("clientShortname2")})}),
React.DOM.h3({className: "call-url"},
conversationUrl
),
@ -248,7 +250,9 @@ loop.webapp = (function($, _, OT, mozL10n) {
render: function() {
return (
React.DOM.div({className: "standalone-footer container-box"},
React.DOM.div({title: "Mozilla Logo", className: "footer-logo"})
React.DOM.div({title: mozL10n.get("vendor_alttext",
{vendorShortname: mozL10n.get("vendorShortname")}),
className: "footer-logo"})
)
);
}
@ -454,10 +458,11 @@ loop.webapp = (function($, _, OT, mozL10n) {
var privacyNoticeName = mozL10n.get("privacy_notice_link_text");
var tosHTML = mozL10n.get("legal_text_and_links", {
"terms_of_use_url": "<a target=_blank href='/legal/terms/'>" +
"terms_of_use_url": "<a target=_blank href='" +
mozL10n.get("legal_website") + "'>" +
tosLinkName + "</a>",
"privacy_notice_url": "<a target=_blank href='" +
"https://www.mozilla.org/privacy/'>" + privacyNoticeName + "</a>"
mozL10n.get("privacy_website") + "'>" + privacyNoticeName + "</a>"
});
var tosClasses = React.addons.classSet({
@ -909,6 +914,7 @@ loop.webapp = (function($, _, OT, mozL10n) {
// Set the 'lang' and 'dir' attributes to <html> when the page is translated
document.documentElement.lang = mozL10n.language.code;
document.documentElement.dir = mozL10n.language.direction;
document.title = mozL10n.get("clientShortname2");
}
return {

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

@ -25,7 +25,7 @@ loop.webapp = (function($, _, OT, mozL10n) {
var HomeView = React.createClass({
render: function() {
return (
<p>{mozL10n.get("welcome")}</p>
<p>{mozL10n.get("welcome", {clientShortname: mozL10n.get("clientShortname2")})}</p>
);
}
});
@ -37,13 +37,13 @@ loop.webapp = (function($, _, OT, mozL10n) {
render: function() {
var useLatestFF = mozL10n.get("use_latest_firefox", {
"firefoxBrandNameLink": React.renderComponentToStaticMarkup(
<a target="_blank" href="https://www.mozilla.org/firefox/">Firefox</a>
<a target="_blank" href={mozL10n.get("brand_website")}>{mozL10n.get("brandShortname")}</a>
)
});
return (
<div>
<h2>{mozL10n.get("incompatible_browser")}</h2>
<p>{mozL10n.get("powered_by_webrtc")}</p>
<p>{mozL10n.get("powered_by_webrtc", {clientShortname: mozL10n.get("clientShortname2")})}</p>
<p dangerouslySetInnerHTML={{__html: useLatestFF}}></p>
</div>
);
@ -58,8 +58,8 @@ loop.webapp = (function($, _, OT, mozL10n) {
return (
<div>
<h2>{mozL10n.get("incompatible_device")}</h2>
<p>{mozL10n.get("sorry_device_unsupported")}</p>
<p>{mozL10n.get("use_firefox_windows_mac_linux")}</p>
<p>{mozL10n.get("sorry_device_unsupported", {clientShortname: mozL10n.get("clientShortname2")})}</p>
<p>{mozL10n.get("use_firefox_windows_mac_linux", {brandShortname: mozL10n.get("brandShortname")})}</p>
</div>
);
}
@ -79,11 +79,11 @@ loop.webapp = (function($, _, OT, mozL10n) {
}
return (
<div className="promote-firefox">
<h3>{mozL10n.get("promote_firefox_hello_heading")}</h3>
<h3>{mozL10n.get("promote_firefox_hello_heading", {brandShortname: mozL10n.get("brandShortname")})}</h3>
<p>
<a className="btn btn-large btn-accept"
href="https://www.mozilla.org/firefox/">
{mozL10n.get("get_firefox_button")}
href={mozL10n.get("brand_website")}>
{mozL10n.get("get_firefox_button", {brandShortname: mozL10n.get("brandShortname")})}
</a>
</p>
</div>
@ -232,7 +232,9 @@ loop.webapp = (function($, _, OT, mozL10n) {
return (
<header className="standalone-header header-box container-box">
<ConversationBranding />
<div className="loop-logo" title="Firefox WebRTC! logo"></div>
<div className="loop-logo"
title={mozL10n.get("client_alttext",
{clientShortname: mozL10n.get("clientShortname2")})}></div>
<h3 className="call-url">
{conversationUrl}
</h3>
@ -248,7 +250,9 @@ loop.webapp = (function($, _, OT, mozL10n) {
render: function() {
return (
<div className="standalone-footer container-box">
<div title="Mozilla Logo" className="footer-logo"></div>
<div title={mozL10n.get("vendor_alttext",
{vendorShortname: mozL10n.get("vendorShortname")})}
className="footer-logo"></div>
</div>
);
}
@ -454,10 +458,11 @@ loop.webapp = (function($, _, OT, mozL10n) {
var privacyNoticeName = mozL10n.get("privacy_notice_link_text");
var tosHTML = mozL10n.get("legal_text_and_links", {
"terms_of_use_url": "<a target=_blank href='/legal/terms/'>" +
"terms_of_use_url": "<a target=_blank href='" +
mozL10n.get("legal_website") + "'>" +
tosLinkName + "</a>",
"privacy_notice_url": "<a target=_blank href='" +
"https://www.mozilla.org/privacy/'>" + privacyNoticeName + "</a>"
mozL10n.get("privacy_website") + "'>" + privacyNoticeName + "</a>"
});
var tosClasses = React.addons.classSet({
@ -909,6 +914,7 @@ loop.webapp = (function($, _, OT, mozL10n) {
// Set the 'lang' and 'dir' attributes to <html> when the page is translated
document.documentElement.lang = mozL10n.language.code;
document.documentElement.dir = mozL10n.language.direction;
document.title = mozL10n.get("clientShortname2");
}
return {

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

@ -49,6 +49,14 @@ brandShortname=Firefox
## LOCALIZATION NOTE(clientShortname2): This should not be localized and
## should remain "Firefox Hello" for all locales.
clientShortname2=Firefox Hello
## LOCALIZATION NOTE(vendorShortname): This should not be localized and
## should remain "Mozilla" for all locales.
vendorShortname=Mozilla
## LOCALIZATION NOTE(client_alttext): {{clientShortname}} will be replaced with the
## value of the clientShortname2 string above.
client_alttext={{clientShortname}} logo
vendor_alttext={{vendorShortname}} logo
## LOCALIZATION NOTE (call_url_creation_date_label): Example output: (from May 26, 2014)
call_url_creation_date_label=(from {{call_url_creation_date}})
@ -107,3 +115,7 @@ rooms_room_full_call_to_action_nonFx_label=Download {{brandShortname}} to start
rooms_room_full_call_to_action_label=Learn more about {{clientShortname}} »
rooms_room_joined_label=Someone has joined the conversation!
rooms_room_join_label=Join the conversation
brand_website=https://www.mozilla.org/firefox/
privacy_website=https://www.mozilla.org/privacy/
legal_website=/legal/terms/

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

@ -7,7 +7,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>WebRTC: Terms of Service</title>
<title>Firefox Hello: Terms of Service</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
@ -21,7 +21,7 @@
<p class="error browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<header id="legal-header">
<h3>WebRTC</h3>
<h3>Firefox Hello</h3>
<h1 id="webrtc-tos-header">Terms of Service</h1>
</header>

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

@ -1160,17 +1160,25 @@ DataConnectionHandler.prototype = {
}
},
_compareDataCallOptions: function(dataCall, newDataCall) {
return dataCall.apnProfile.apn == newDataCall.apn &&
dataCall.apnProfile.user == newDataCall.user &&
dataCall.apnProfile.password == newDataCall.password &&
dataCall.chappap == newDataCall.chappap &&
dataCall.pdptype == newDataCall.pdptype;
},
_deliverDataCallMessage: function(name, args) {
for (let i = 0; i < this._dataCalls.length; i++) {
let datacall = this._dataCalls[i];
// Send message only to the DataCall that matches apn.
// Send message only to the DataCall that matches the data call options.
// Currently, args always contain only one datacall info.
if (!args[0].apn || args[0].apn != datacall.apnProfile.apn) {
if (!this._compareDataCallOptions(datacall, args[0])) {
continue;
}
// Do not deliver message to DataCall that contains cid but mistmaches
// with the cid in the current message.
if (args[0].cid && datacall.linkInfo.cid &&
if (args[0].cid !== undefined && datacall.linkInfo.cid != null &&
args[0].cid != datacall.linkInfo.cid) {
continue;
}
@ -1486,9 +1494,17 @@ DataConnectionHandler.prototype = {
// Notify data call error only for data APN
let networkInterface = this.dataNetworkInterfaces.get("default");
if (networkInterface && networkInterface.enabled) {
let apnSetting = networkInterface.apnSetting;
if (message.apn == apnSetting.apn) {
gMobileConnectionService.notifyDataError(this.clientId, message);
let dataCall = networkInterface.dataCall;
// If there is a cid, compare cid; otherwise it is probably an error on
// data call setup.
if (message.cid !== undefined) {
if (message.cid == dataCall.linkInfo.cid) {
gMobileConnectionService.notifyDataError(this.clientId, message);
}
} else {
if (this._compareDataCallOptions(dataCall, message)) {
gMobileConnectionService.notifyDataError(this.clientId, message);
}
}
}
@ -3894,6 +3910,12 @@ DataCall.prototype = {
// Array to hold RILNetworkInterfaces that requested this DataCall.
requestedNetworkIfaces: null,
// Holds the pdp type sent to ril worker.
pdptype: null,
// Holds the authentication type sent to ril worker.
chappap: null,
dataCallError: function(message) {
if (DEBUG) this.debug("Data call error on APN: " + message.apn);
this.state = RIL.GECKO_NETWORK_STATE_DISCONNECTED;
@ -4012,10 +4034,18 @@ DataCall.prototype = {
},
canHandleApn: function(apnSetting) {
// TODO: compare authtype?
return (this.apnProfile.apn == apnSetting.apn &&
(this.apnProfile.user || '') == (apnSetting.user || '') &&
(this.apnProfile.password || '') == (apnSetting.password || ''));
let isIdentical = this.apnProfile.apn == apnSetting.apn &&
(this.apnProfile.user || '') == (apnSetting.user || '') &&
(this.apnProfile.password || '') == (apnSetting.password || '') &&
(this.apnProfile.authType || '') == (apnSetting.authtype || '');
if (RILQUIRKS_HAVE_IPV6) {
isIdentical = isIdentical &&
(this.apnProfile.protocol || '') == (apnSetting.protocol || '') &&
(this.apnProfile.roaming_protocol || '') == (apnSetting.roaming_protocol || '');
}
return isIdentical;
},
reset: function() {
@ -4027,6 +4057,9 @@ DataCall.prototype = {
this.linkInfo.gateways = [];
this.state = RIL.GECKO_NETWORK_STATE_UNKNOWN;
this.chappap = null;
this.pdptype = null;
},
connect: function(networkInterface) {
@ -4079,7 +4112,7 @@ DataCall.prototype = {
let radioTechType = dataInfo.type;
let radioTechnology = RIL.GECKO_RADIO_TECH.indexOf(radioTechType);
let authType = RIL.RIL_DATACALL_AUTH_TO_GECKO.indexOf(this.apnProfile.authtype);
let authType = RIL.RIL_DATACALL_AUTH_TO_GECKO.indexOf(this.apnProfile.authType);
// Use the default authType if the value in database is invalid.
// For the case that user might not select the authentication type.
if (authType == -1) {
@ -4088,6 +4121,8 @@ DataCall.prototype = {
}
authType = RIL.RIL_DATACALL_AUTH_TO_GECKO.indexOf(RIL.GECKO_DATACALL_AUTH_DEFAULT);
}
this.chappap = authType;
let pdpType = RIL.GECKO_DATACALL_PDP_TYPE_IP;
if (RILQUIRKS_HAVE_IPV6) {
pdpType = !dataInfo.roaming
@ -4101,6 +4136,7 @@ DataCall.prototype = {
pdpType = RIL.GECKO_DATACALL_PDP_TYPE_DEFAULT;
}
}
this.pdptype = pdpType;
let radioInterface = this.gRIL.getRadioInterface(this.clientId);
radioInterface.sendWorkerMessage("setupDataCall", {

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

@ -4128,10 +4128,8 @@ RilObject.prototype = {
// can be removed if is the same as the current one.
for each (let newDataCall in datacalls) {
if (newDataCall.status != DATACALL_FAIL_NONE) {
if (newDataCallOptions) {
newDataCall.apn = newDataCallOptions.apn;
}
this._sendDataCallError(newDataCall, newDataCall.status);
this._sendDataCallError(newDataCallOptions || newDataCall,
newDataCall.status);
}
}