зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1705327 - Remove infobar notification from pdf viewer r=bdahl
Recommandation from UX is to not show this bar, so remove it. Differential Revision: https://phabricator.services.mozilla.com/D112163
This commit is contained in:
Родитель
76be4380bd
Коммит
b4e39eb71d
|
@ -24,13 +24,6 @@ var PdfJsTelemetry = {
|
|||
onViewerIsUsed() {
|
||||
Services.telemetry.scalarAdd("pdf.viewer.used", 1);
|
||||
},
|
||||
onFallbackShown(featureId) {
|
||||
Services.telemetry.scalarAdd("pdf.viewer.fallback_shown", 1);
|
||||
let histogram = Services.telemetry.getHistogramById(
|
||||
"PDF_VIEWER_FALLBACK_REASON"
|
||||
);
|
||||
histogram.add(featureId ?? "unknown");
|
||||
},
|
||||
onFallbackError(featureId) {
|
||||
let histogram = Services.telemetry.getHistogramById(
|
||||
"PDF_VIEWER_FALLBACK_ERROR"
|
||||
|
|
|
@ -174,13 +174,6 @@ function getLocalizedStrings(path) {
|
|||
}
|
||||
return map;
|
||||
}
|
||||
function getLocalizedString(strings, id, property) {
|
||||
property = property || "textContent";
|
||||
if (id in strings) {
|
||||
return strings[id][property];
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
function isValidMatchesCount(data) {
|
||||
if (typeof data !== "object" || data === null) {
|
||||
|
@ -576,36 +569,7 @@ class ChromeActions {
|
|||
* @param {function} sendResponse - Callback function.
|
||||
*/
|
||||
fallback(args, sendResponse) {
|
||||
var featureId = args.featureId;
|
||||
|
||||
var domWindow = this.domWindow;
|
||||
var strings = getLocalizedStrings("chrome.properties");
|
||||
var message;
|
||||
if (featureId === "forms") {
|
||||
message = getLocalizedString(strings, "unsupported_feature_forms");
|
||||
} else if (featureId === "signatures") {
|
||||
message = getLocalizedString(strings, "unsupported_feature_signatures");
|
||||
} else {
|
||||
message = getLocalizedString(strings, "unsupported_feature");
|
||||
}
|
||||
PdfJsTelemetry.onFallbackShown(featureId);
|
||||
|
||||
// Request the display of a notification warning in the associated window
|
||||
// when the renderer isn't sure a pdf displayed correctly.
|
||||
let actor = getActor(domWindow);
|
||||
if (actor) {
|
||||
actor.sendAsyncMessage("PDFJS:Parent:displayWarning", {
|
||||
message,
|
||||
label: getLocalizedString(strings, "open_with_different_viewer"),
|
||||
accessKey: getLocalizedString(
|
||||
strings,
|
||||
"open_with_different_viewer",
|
||||
"accessKey"
|
||||
),
|
||||
});
|
||||
|
||||
actor.fallbackCallback = sendResponse;
|
||||
}
|
||||
sendResponse(false);
|
||||
}
|
||||
|
||||
updateFindControlState(data) {
|
||||
|
|
|
@ -24,6 +24,7 @@ support-files =
|
|||
file_pdfjs_object_stream.pdf
|
||||
file_pdfjs_object_stream.pdf^headers^
|
||||
[browser_pdfjs_notification_close_on_navigation.js]
|
||||
skip-if = true # see bug 1705327
|
||||
[browser_pdfjs_octet_stream.js]
|
||||
support-files =
|
||||
file_pdfjs_object_stream.pdf
|
||||
|
|
|
@ -10096,17 +10096,6 @@
|
|||
"n_buckets": 50,
|
||||
"description": "Time spent to display first page in PDF Viewer (ms)"
|
||||
},
|
||||
"PDF_VIEWER_FALLBACK_REASON": {
|
||||
"record_in_processes": ["content"],
|
||||
"products": ["firefox"],
|
||||
"expires_in_version": "92",
|
||||
"alert_emails": ["bdahl@mozilla.com"],
|
||||
"releaseChannelCollection": "opt-out",
|
||||
"bug_numbers": [1630844, 1666979, 1689264],
|
||||
"kind": "categorical",
|
||||
"labels": ["unknown", "forms", "javaScript", "signatures", "smask", "shadingPattern", "font", "errorTilingPattern", "errorExtGState", "errorXObject", "errorFontLoadType3", "errorFontState", "errorFontMissing", "errorFontTranslate", "errorColorSpace", "errorOperatorList", "errorFontToUnicode", "errorFontLoadNative", "errorFontGetPath"],
|
||||
"description": "The reason the fallback bar was shown."
|
||||
},
|
||||
"PDF_VIEWER_FALLBACK_ERROR": {
|
||||
"record_in_processes": ["main", "content"],
|
||||
"products": ["firefox"],
|
||||
|
@ -10115,7 +10104,7 @@
|
|||
"releaseChannelCollection": "opt-out",
|
||||
"bug_numbers": [1643402, 1666979, 1689264],
|
||||
"kind": "categorical",
|
||||
"labels": ["unknown", "forms", "javaScript", "smask", "shadingPattern", "font", "errorTilingPattern", "errorExtGState", "errorXObject", "errorFontLoadType3", "errorFontState", "errorFontMissing", "errorFontTranslate", "errorColorSpace", "errorOperatorList", "errorFontToUnicode", "errorFontLoadNative", "errorFontGetPath"],
|
||||
"labels": ["unknown", "forms", "javaScript", "signatures", "smask", "shadingPattern", "font", "errorTilingPattern", "errorExtGState", "errorXObject", "errorFontLoadType3", "errorFontState", "errorFontMissing", "errorFontTranslate", "errorColorSpace", "errorOperatorList", "errorFontToUnicode", "errorFontLoadNative", "errorFontGetPath"],
|
||||
"description": "All errors that could trigger the fallback bar, even after the bar is shown."
|
||||
},
|
||||
"PDF_VIEWER_TAGGED": {
|
||||
|
|
Загрузка…
Ссылка в новой задаче