зеркало из https://github.com/mozilla/gecko-dev.git
merge fx-team to mozilla-central a=merge
This commit is contained in:
Коммит
f8581d6c76
|
@ -3002,7 +3002,7 @@
|
|||
// otherwise just rely on the panel id for common arrowpanels.
|
||||
let type = this._panel.firstChild.getAttribute("popupid") ||
|
||||
this._panel.id;
|
||||
if (type.startsWith("password-"))
|
||||
if (type == "password")
|
||||
return "passwords";
|
||||
if (type == "editBookmarkPanel")
|
||||
return "bookmarks";
|
||||
|
|
|
@ -54,6 +54,7 @@ let RLSidebar = {
|
|||
addEventListener("unload", () => this.uninit());
|
||||
|
||||
this.list = document.getElementById("list");
|
||||
this.emptyListInfo = document.getElementById("emptyListInfo");
|
||||
this.itemTemplate = document.getElementById("item-template");
|
||||
|
||||
this.list.addEventListener("click", event => this.onListClick(event));
|
||||
|
@ -91,6 +92,8 @@ let RLSidebar = {
|
|||
this.list.appendChild(itemNode);
|
||||
this.itemNodesById.set(item.id, itemNode);
|
||||
this.itemsById.set(item.id, item);
|
||||
|
||||
this.emptyListInfo.hidden = true;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -106,6 +109,8 @@ let RLSidebar = {
|
|||
this.itemsById.delete(item.id);
|
||||
// TODO: ensureListItems doesn't yet cope with needing to add one item.
|
||||
//this.ensureListItems();
|
||||
|
||||
this.emptyListInfo.hidden = (this.numItems > 0);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -148,6 +153,7 @@ let RLSidebar = {
|
|||
log.warn("Error adding item", e);
|
||||
}
|
||||
});
|
||||
this.emptyListInfo.hidden = (this.numItems > 0);
|
||||
}),
|
||||
|
||||
/**
|
||||
|
@ -350,6 +356,11 @@ let RLSidebar = {
|
|||
if (!itemNode)
|
||||
return;
|
||||
|
||||
if (event.target.classList.contains("remove-button")) {
|
||||
ReadingList.deleteItem(this.getItemFromNode(itemNode));
|
||||
return;
|
||||
}
|
||||
|
||||
this.activeItem = itemNode;
|
||||
this.openActiveItem(event);
|
||||
},
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<head>
|
||||
<script src="chrome://browser/content/readinglist/sidebar.js" type="application/javascript;version=1.8"></script>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="chrome://browser/skin/readinglist/sidebar.css"/>
|
||||
<!-- <title>&readingList.label;</title> -->
|
||||
<title>&readingList.label;</title>
|
||||
</head>
|
||||
|
||||
<body role="application">
|
||||
|
@ -19,12 +19,16 @@
|
|||
<div class="item" role="option" tabindex="-1">
|
||||
<div class="item-thumb-container"></div>
|
||||
<div class="item-summary-container">
|
||||
<div class="item-title"></div>
|
||||
<div class="item-title-lines">
|
||||
<p class="item-title"/>
|
||||
<button class="remove-button" title="&readingList.sidebar.delete.tooltip;"/>
|
||||
</div>
|
||||
<div class="item-domain"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div id="emptyListInfo" hidden="true">&readingList.sidebar.emptyText;</div>
|
||||
<div id="list" role="listbox" tabindex="1"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -9,8 +9,6 @@ const { Services } = Cu.import("resource://gre/modules/Services.jsm");
|
|||
const { require } =
|
||||
Cu.import("resource://gre/modules/devtools/Loader.jsm", {}).devtools;
|
||||
const QR = require("devtools/toolkit/qrcode/index");
|
||||
const PROPERTIES = "chrome://browser/locale/devtools/webide.properties";
|
||||
const Strings = Services.strings.createBundle(PROPERTIES);
|
||||
|
||||
window.addEventListener("load", function onLoad() {
|
||||
window.removeEventListener("load", onLoad);
|
||||
|
@ -33,10 +31,6 @@ function createQR(oob) {
|
|||
}
|
||||
|
||||
function createToken(oob) {
|
||||
let spacedCert = oob.sha256.replace(/:/g, " ").toLowerCase();
|
||||
let certText = Strings.formatStringFromName("wifi_auth_cert",
|
||||
[spacedCert], 1);
|
||||
document.querySelector("#cert").textContent = certText;
|
||||
let token = oob.sha256.replace(/:/g, "").toLowerCase() + oob.k;
|
||||
document.querySelector("#token pre").textContent = token;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
<h3 id="header">&wifi_auth_header;</h3>
|
||||
<div id="scan-request">&wifi_auth_scan_request;</div>
|
||||
<div id="cert"></div>
|
||||
|
||||
<div id="qr-code">
|
||||
<div id="qr-code-wrapper">
|
||||
|
|
|
@ -853,7 +853,6 @@ just addresses the organization to follow, e.g. "This site is run by " -->
|
|||
<!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">
|
||||
|
|
|
@ -77,9 +77,3 @@ status_unknown=UNKNOWN
|
|||
|
||||
# Device preferences and settings
|
||||
device_reset_default=Reset to default
|
||||
|
||||
# WiFi Auth
|
||||
# LOCALIZATION NOTE (wifi_auth_cert): Part of the dialog that instructs the
|
||||
# user to transfer an authentication token to the server.
|
||||
# %1$S: The client's cert fingerprint
|
||||
wifi_auth_cert=My Cert: %1$S
|
||||
|
|
|
@ -1195,8 +1195,7 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon {
|
|||
list-style-image: url(chrome://global/skin/icons/question-64.png);
|
||||
}
|
||||
|
||||
.popup-notification-icon[popupid="password-save"],
|
||||
.popup-notification-icon[popupid="password-change"] {
|
||||
.popup-notification-icon[popupid="password"] {
|
||||
list-style-image: url(chrome://mozapps/skin/passwordmgr/key-64.png);
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ browser.jar:
|
|||
skin/classic/browser/reader-mode-16.png (../shared/reader/reader-mode-16.png)
|
||||
skin/classic/browser/readinglist/icons.svg (../shared/readinglist/icons.svg)
|
||||
skin/classic/browser/readinglist/readinglist-icon.svg (../shared/readinglist/readinglist-icon.svg)
|
||||
skin/classic/browser/readinglist/sidebar.css (../shared/readinglist/sidebar.css)
|
||||
* skin/classic/browser/readinglist/sidebar.css (readinglist/sidebar.css)
|
||||
skin/classic/browser/webRTC-shareDevice-16.png
|
||||
skin/classic/browser/webRTC-shareDevice-64.png
|
||||
skin/classic/browser/webRTC-sharingDevice-16.png (../shared/webrtc/webRTC-sharingDevice-16.png)
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/* 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/. */
|
||||
|
||||
%include ../../shared/readinglist/sidebar.inc.css
|
||||
|
||||
.item {
|
||||
-moz-padding-end: 0;
|
||||
}
|
||||
|
||||
.item-title {
|
||||
margin: 1px 0 0;
|
||||
}
|
||||
|
||||
.item-title, .item-domain {
|
||||
-moz-margin-end: 6px;
|
||||
}
|
||||
|
||||
.remove-button {
|
||||
background-image: -moz-image-rect(url("chrome://global/skin/icons/close.svg"), 0, 16, 16, 0);
|
||||
}
|
||||
|
||||
.remove-button:hover {
|
||||
background-image: -moz-image-rect(url("chrome://global/skin/icons/close.svg"), 0, 32, 16, 16);
|
||||
}
|
||||
|
||||
.remove-button:hover:active {
|
||||
background-image: -moz-image-rect(url("chrome://global/skin/icons/close.svg"), 0, 48, 16, 32);
|
||||
}
|
|
@ -4220,8 +4220,7 @@ notification[value="loop-sharing-notification"] .messageImage {
|
|||
list-style-image: url(chrome://global/skin/icons/question-64.png);
|
||||
}
|
||||
|
||||
.popup-notification-icon[popupid="password-save"],
|
||||
.popup-notification-icon[popupid="password-change"] {
|
||||
.popup-notification-icon[popupid="password"] {
|
||||
list-style-image: url(chrome://mozapps/skin/passwordmgr/key-64.png);
|
||||
}
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ browser.jar:
|
|||
skin/classic/browser/reader-mode-16@2x.png (../shared/reader/reader-mode-16@2x.png)
|
||||
skin/classic/browser/readinglist/icons.svg (../shared/readinglist/icons.svg)
|
||||
skin/classic/browser/readinglist/readinglist-icon.svg (../shared/readinglist/readinglist-icon.svg)
|
||||
skin/classic/browser/readinglist/sidebar.css (../shared/readinglist/sidebar.css)
|
||||
* skin/classic/browser/readinglist/sidebar.css (readinglist/sidebar.css)
|
||||
skin/classic/browser/webRTC-shareDevice-16.png
|
||||
skin/classic/browser/webRTC-shareDevice-16@2x.png
|
||||
skin/classic/browser/webRTC-shareDevice-64.png
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/* 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/. */
|
||||
|
||||
%include ../../shared/readinglist/sidebar.inc.css
|
||||
|
||||
.item-title {
|
||||
margin: 4px 0 0;
|
||||
}
|
||||
|
||||
.remove-button {
|
||||
background-image: -moz-image-rect(url("chrome://global/skin/icons/close.png"), 0, 16, 16, 0);
|
||||
}
|
||||
|
||||
.remove-button:hover {
|
||||
background-image: -moz-image-rect(url("chrome://global/skin/icons/close.png"), 0, 32, 16, 16);
|
||||
}
|
||||
|
||||
.remove-button:hover:active {
|
||||
background-image: -moz-image-rect(url("chrome://global/skin/icons/close.png"), 0, 48, 16, 32);
|
||||
}
|
||||
|
||||
@media (min-resolution: 2dppx) {
|
||||
.remove-button {
|
||||
background-image: -moz-image-rect(url("chrome://global/skin/icons/close@2x.png"), 0, 32, 32, 0);
|
||||
}
|
||||
|
||||
.remove-button:hover {
|
||||
background-image: -moz-image-rect(url("chrome://global/skin/icons/close@2x.png"), 0, 64, 32, 32);
|
||||
}
|
||||
|
||||
.remove-button:hover:active {
|
||||
background-image: -moz-image-rect(url("chrome://global/skin/icons/close@2x.png"), 0, 96, 32, 64);
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
/* 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/. */
|
||||
% 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/.
|
||||
|
||||
:root, body {
|
||||
height: 100%;
|
||||
|
@ -16,6 +16,12 @@ body {
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
#emptyListInfo {
|
||||
cursor: default;
|
||||
padding: 3em 1em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#list {
|
||||
height: 100%;
|
||||
overflow-x: auto;
|
||||
|
@ -52,11 +58,18 @@ body {
|
|||
flex-flow: column;
|
||||
-moz-padding-start: 4px;
|
||||
overflow: hidden;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.item-title-lines {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.item-title {
|
||||
overflow: hidden;
|
||||
height: 2.8em;
|
||||
max-height: 2.8em;
|
||||
line-height: 1.4;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.item-domain {
|
||||
|
@ -70,3 +83,16 @@ body {
|
|||
.item:hover .item-domain {
|
||||
color: #008ACB;
|
||||
}
|
||||
|
||||
.item:not(:hover) .remove-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.remove-button {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-size: contain;
|
||||
background-color: transparent;
|
||||
border-width: 0;
|
||||
}
|
||||
|
|
@ -2217,8 +2217,7 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
|
|||
list-style-image: url(chrome://global/skin/icons/question-64.png);
|
||||
}
|
||||
|
||||
.popup-notification-icon[popupid="password-save"],
|
||||
.popup-notification-icon[popupid="password-change"] {
|
||||
.popup-notification-icon[popupid="password"] {
|
||||
list-style-image: url(chrome://mozapps/skin/passwordmgr/key-64.png);
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ browser.jar:
|
|||
skin/classic/browser/reader-mode-16.png (../shared/reader/reader-mode-16.png)
|
||||
skin/classic/browser/readinglist/icons.svg (../shared/readinglist/icons.svg)
|
||||
skin/classic/browser/readinglist/readinglist-icon.svg (../shared/readinglist/readinglist-icon.svg)
|
||||
skin/classic/browser/readinglist/sidebar.css (../shared/readinglist/sidebar.css)
|
||||
* skin/classic/browser/readinglist/sidebar.css (readinglist/sidebar.css)
|
||||
skin/classic/browser/notification-pluginNormal.png (../shared/plugins/notification-pluginNormal.png)
|
||||
skin/classic/browser/notification-pluginAlert.png (../shared/plugins/notification-pluginAlert.png)
|
||||
skin/classic/browser/notification-pluginBlocked.png (../shared/plugins/notification-pluginBlocked.png)
|
||||
|
@ -584,7 +584,7 @@ browser.jar:
|
|||
skin/classic/aero/browser/reader-mode-16.png (../shared/reader/reader-mode-16.png)
|
||||
skin/classic/aero/browser/readinglist/icons.svg (../shared/readinglist/icons.svg)
|
||||
skin/classic/aero/browser/readinglist/readinglist-icon.svg (../shared/readinglist/readinglist-icon.svg)
|
||||
skin/classic/aero/browser/readinglist/sidebar.css (../shared/readinglist/sidebar.css)
|
||||
* skin/classic/aero/browser/readinglist/sidebar.css (readinglist/sidebar.css)
|
||||
skin/classic/aero/browser/notification-pluginNormal.png (../shared/plugins/notification-pluginNormal.png)
|
||||
skin/classic/aero/browser/notification-pluginAlert.png (../shared/plugins/notification-pluginAlert.png)
|
||||
skin/classic/aero/browser/notification-pluginBlocked.png (../shared/plugins/notification-pluginBlocked.png)
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
/* 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/. */
|
||||
|
||||
%include ../../shared/readinglist/sidebar.inc.css
|
||||
|
||||
.item {
|
||||
-moz-padding-end: 0;
|
||||
}
|
||||
|
||||
.item-title {
|
||||
margin: 1px 0 0;
|
||||
}
|
||||
|
||||
.item-title, .item-domain {
|
||||
-moz-margin-end: 6px;
|
||||
}
|
||||
|
||||
.remove-button {
|
||||
-moz-margin-end: 2px;
|
||||
background-image: -moz-image-rect(url("chrome://global/skin/icons/close.png"), 0, 16, 16, 0);
|
||||
}
|
||||
|
||||
.remove-button:hover {
|
||||
background-image: -moz-image-rect(url("chrome://global/skin/icons/close.png"), 0, 32, 16, 16);
|
||||
}
|
||||
|
||||
.remove-button:hover:active {
|
||||
background-image: -moz-image-rect(url("chrome://global/skin/icons/close.png"), 0, 48, 16, 32);
|
||||
}
|
|
@ -854,10 +854,12 @@ LoginManagerPrompter.prototype = {
|
|||
|
||||
var { browser } = this._getNotifyWindow();
|
||||
|
||||
aNotifyObj.show(browser, "password-save", notificationText,
|
||||
aNotifyObj.show(browser, "password", notificationText,
|
||||
"password-notification-icon", mainAction,
|
||||
secondaryActions, { timeout: Date.now() + 10000,
|
||||
persistWhileVisible: true });
|
||||
secondaryActions,
|
||||
{ timeout: Date.now() + 10000,
|
||||
persistWhileVisible: true,
|
||||
passwordNotificationType: "password-save" });
|
||||
} else {
|
||||
var notNowButtonText =
|
||||
this._getLocalizedString("notifyBarNotNowButtonText");
|
||||
|
@ -906,7 +908,7 @@ LoginManagerPrompter.prototype = {
|
|||
_removeLoginNotifications : function () {
|
||||
var popupNote = this._getPopupNote();
|
||||
if (popupNote)
|
||||
popupNote = popupNote.getNotification("password-save");
|
||||
popupNote = popupNote.getNotification("password");
|
||||
if (popupNote)
|
||||
popupNote.remove();
|
||||
|
||||
|
@ -1052,10 +1054,11 @@ LoginManagerPrompter.prototype = {
|
|||
var { browser } = this._getNotifyWindow();
|
||||
|
||||
Services.telemetry.getHistogramById("PWMGR_PROMPT_UPDATE_ACTION").add(PROMPT_DISPLAYED);
|
||||
aNotifyObj.show(browser, "password-change", notificationText,
|
||||
aNotifyObj.show(browser, "password", notificationText,
|
||||
"password-notification-icon", mainAction,
|
||||
null, { timeout: Date.now() + 10000,
|
||||
persistWhileVisible: true });
|
||||
persistWhileVisible: true,
|
||||
passwordNotificationType: "password-change" });
|
||||
} else {
|
||||
var dontChangeButtonText =
|
||||
this._getLocalizedString("notifyBarDontChangeButtonText");
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
[DEFAULT]
|
||||
support-files =
|
||||
authenticate.sjs
|
||||
form_basic.html
|
||||
|
||||
[browser_notifications.js]
|
||||
[browser_passwordmgr_fields.js]
|
||||
[browser_passwordmgr_observers.js]
|
||||
[browser_passwordmgr_sort.js]
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
add_task(function* test_save() {
|
||||
let tab = gBrowser.addTab("https://example.com/browser/toolkit/components/" +
|
||||
"passwordmgr/test/browser/form_basic.html");
|
||||
let browser = tab.linkedBrowser;
|
||||
yield BrowserTestUtils.browserLoaded(browser);
|
||||
gBrowser.selectedTab = tab;
|
||||
|
||||
let promiseShown = BrowserTestUtils.waitForEvent(PopupNotifications.panel,
|
||||
"Shown");
|
||||
yield ContentTask.spawn(browser, null, function* () {
|
||||
content.document.getElementById("form-basic-username").value = "username";
|
||||
content.document.getElementById("form-basic-password").value = "password";
|
||||
content.document.getElementById("form-basic").submit();
|
||||
});
|
||||
yield promiseShown;
|
||||
let notificationElement = PopupNotifications.panel.childNodes[0];
|
||||
|
||||
let promiseLogin = TestUtils.topicObserved("passwordmgr-storage-changed",
|
||||
(_, data) => data == "addLogin");
|
||||
notificationElement.button.doCommand();
|
||||
let [login] = yield promiseLogin;
|
||||
login.QueryInterface(Ci.nsILoginInfo);
|
||||
|
||||
Assert.equal(login.username, "username");
|
||||
Assert.equal(login.password, "password");
|
||||
|
||||
// Cleanup.
|
||||
Services.logins.removeAllLogins();
|
||||
gBrowser.removeTab(tab);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>
|
||||
<!-- Any copyright is dedicated to the Public Domain.
|
||||
- http://creativecommons.org/publicdomain/zero/1.0/ -->
|
||||
|
||||
<!-- Simplest form with username and password fields. -->
|
||||
<form id="form-basic">
|
||||
<input id="form-basic-username" name="username">
|
||||
<input id="form-basic-password" name="password" type="password">
|
||||
<input id="form-basic-submit" type="submit">
|
||||
</form>
|
||||
|
||||
</body></html>
|
|
@ -39,7 +39,11 @@ function getPopupNotifications(aWindow) {
|
|||
*/
|
||||
function getPopup(aPopupNote, aKind) {
|
||||
ok(true, "Looking for " + aKind + " popup notification");
|
||||
return aPopupNote.getNotification(aKind);
|
||||
var notification = aPopupNote.getNotification("password");
|
||||
if (notification) {
|
||||
is(notification.options.passwordNotificationType, aKind);
|
||||
}
|
||||
return notification;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -644,6 +644,9 @@ PopupNotifications.prototype = {
|
|||
notificationsToShow.forEach(function (n) {
|
||||
this._fireCallback(n, NOTIFICATION_EVENT_SHOWN);
|
||||
}, this);
|
||||
// This notification is used by tests to know when all the processing
|
||||
// required to display the panel has happened.
|
||||
this.panel.dispatchEvent(new this.window.CustomEvent("Shown"));
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -99,11 +99,15 @@ CheckMsg(const NS_tchar *path, const char *expected)
|
|||
|
||||
struct stat ms;
|
||||
if (fstat(fileno(inFP), &ms)) {
|
||||
fclose(inFP);
|
||||
inFP = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
char *mbuf = (char *) malloc(ms.st_size + 1);
|
||||
if (!mbuf) {
|
||||
fclose(inFP);
|
||||
inFP = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -113,14 +117,19 @@ CheckMsg(const NS_tchar *path, const char *expected)
|
|||
r -= c;
|
||||
rb += c;
|
||||
if (c == 0 && r) {
|
||||
free(mbuf);
|
||||
fclose(inFP);
|
||||
inFP = nullptr;
|
||||
return false;
|
||||
}
|
||||
mbuf[ms.st_size] = '\0';
|
||||
rb = mbuf;
|
||||
|
||||
bool isMatch = strcmp(rb, expected) == 0;
|
||||
free(mbuf);
|
||||
fclose(inFP);
|
||||
inFP = nullptr;
|
||||
return strcmp(rb, expected) == 0;
|
||||
return isMatch;
|
||||
}
|
||||
|
||||
#ifdef XP_WIN
|
||||
|
|
|
@ -28,11 +28,11 @@ body {
|
|||
}
|
||||
|
||||
.sans-serif {
|
||||
font-family: sans-serif;
|
||||
font-family: "Fira Sans", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
.serif {
|
||||
font-family: serif;
|
||||
font-family: "Charis SIL", Georgia, "Times New Roman", serif;
|
||||
}
|
||||
|
||||
.font-size1 {
|
||||
|
@ -93,7 +93,7 @@ body {
|
|||
font-size: 0.9rem;
|
||||
line-height: 1.33rem;
|
||||
padding-bottom: 4px;
|
||||
font-family: sans-serif;
|
||||
font-family: "Fira Sans", Helvetica, Arial, sans-serif;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid;
|
||||
color: #0095dd;
|
||||
|
@ -231,7 +231,7 @@ body {
|
|||
/*======= Controls toolbar =======*/
|
||||
|
||||
.toolbar {
|
||||
font-family: sans-serif;
|
||||
font-family: "Fira Sans", Helvetica, Arial, sans-serif;
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
top: 0px;
|
||||
|
@ -286,7 +286,7 @@ body {
|
|||
background-color: #FBFBFB;
|
||||
visibility: hidden;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #B5B5B5;
|
||||
border: 1px 1px 0 1px solid #B5B5B5;
|
||||
box-shadow: 0px 1px 12px #666;
|
||||
}
|
||||
|
||||
|
@ -319,6 +319,19 @@ body {
|
|||
flex-direction: row;
|
||||
}
|
||||
|
||||
#font-type-buttons > button:first-child {
|
||||
border-top-left-radius: 3px;
|
||||
}
|
||||
#font-type-buttons > button:last-child {
|
||||
border-top-right-radius: 3px;
|
||||
}
|
||||
#color-scheme-buttons > button:first-child {
|
||||
border-bottom-left-radius: 3px;
|
||||
}
|
||||
#color-scheme-buttons > button:last-child {
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
|
||||
#font-type-buttons > button,
|
||||
#font-size-buttons > button,
|
||||
#color-scheme-buttons > button {
|
||||
|
@ -337,7 +350,7 @@ body {
|
|||
}
|
||||
|
||||
#color-scheme-buttons > button {
|
||||
width: 33%;
|
||||
width: 33.33%;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
@ -350,12 +363,13 @@ body {
|
|||
#font-type-buttons > button {
|
||||
display: inline-block;
|
||||
font-size: 48px;
|
||||
border-bottom: 3px solid transparent;
|
||||
}
|
||||
|
||||
#font-type-buttons > button:active:hover,
|
||||
#font-type-buttons > button.selected {
|
||||
border-bottom: 3px solid #FC6420;
|
||||
#font-type-buttons > button.selected,
|
||||
#color-scheme-buttons > button:active:hover,
|
||||
#color-scheme-buttons > button.selected {
|
||||
box-shadow: inset 0 -3px 0 0 #FC6420;
|
||||
}
|
||||
|
||||
#font-type-buttons > button > div {
|
||||
|
@ -364,7 +378,8 @@ body {
|
|||
}
|
||||
|
||||
.button:hover,
|
||||
#font-size-buttons > button:hover {
|
||||
#font-size-buttons > button:hover,
|
||||
#font-type-buttons > button:hover {
|
||||
background-color: #EBEBEB;
|
||||
}
|
||||
|
||||
|
@ -381,7 +396,7 @@ body {
|
|||
}
|
||||
|
||||
.serif-button {
|
||||
font-family: serif;
|
||||
font-family: "Charis SIL", Georgia, "Times New Roman", serif;
|
||||
}
|
||||
|
||||
.minus-button,
|
||||
|
@ -439,3 +454,9 @@ body {
|
|||
.plus-button {
|
||||
background-image: url("chrome://global/skin/reader/RM-Plus-24x24.svg");
|
||||
}
|
||||
|
||||
@media print {
|
||||
.toolbar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче