зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 2 changesets (bug 1660857) for bc failures on browser_parsable_css.js . CLOSED TREE
Backed out changeset 1378546cc0db (bug 1660857) Backed out changeset 6c8985ac1d4c (bug 1660857)
This commit is contained in:
Родитель
b342cdb618
Коммит
77bc01a5e1
|
@ -312,7 +312,7 @@
|
|||
margin: 0.125in 0.25in;
|
||||
}
|
||||
|
||||
@media (monochrome) and (-moz-print-preview) {
|
||||
@media (monochrome) {
|
||||
*|*::-moz-page {
|
||||
filter: grayscale(1);
|
||||
}
|
||||
|
|
|
@ -46,7 +46,6 @@ function testToggle(toggle) {
|
|||
|
||||
const TOGGLES = [
|
||||
"-moz-is-glyph",
|
||||
"-moz-print-preview",
|
||||
"-moz-scrollbar-start-backward",
|
||||
"-moz-scrollbar-start-forward",
|
||||
"-moz-scrollbar-end-backward",
|
||||
|
|
|
@ -521,18 +521,6 @@ fn eval_moz_is_glyph(
|
|||
query_value.map_or(is_glyph, |v| v == is_glyph)
|
||||
}
|
||||
|
||||
fn eval_moz_print_preview(
|
||||
device: &Device,
|
||||
query_value: Option<bool>,
|
||||
_: Option<RangeOrOperator>,
|
||||
) -> bool {
|
||||
let is_print_preview = device.is_print_preview();
|
||||
if is_print_preview {
|
||||
debug_assert_eq!(device.media_type(), MediaType::print());
|
||||
}
|
||||
query_value.map_or(is_print_preview, |v| v == is_print_preview)
|
||||
}
|
||||
|
||||
fn eval_moz_is_resource_document(
|
||||
device: &Device,
|
||||
query_value: Option<bool>,
|
||||
|
@ -613,7 +601,7 @@ macro_rules! system_metric_feature {
|
|||
/// to support new types in these entries and (2) ensuring that either
|
||||
/// nsPresContext::MediaFeatureValuesChanged is called when the value that
|
||||
/// would be returned by the evaluator function could change.
|
||||
pub static MEDIA_FEATURES: [MediaFeatureDescription; 56] = [
|
||||
pub static MEDIA_FEATURES: [MediaFeatureDescription; 55] = [
|
||||
feature!(
|
||||
atom!("width"),
|
||||
AllowsRanges::Yes,
|
||||
|
@ -811,12 +799,6 @@ pub static MEDIA_FEATURES: [MediaFeatureDescription; 56] = [
|
|||
Evaluator::Ident(eval_moz_os_version),
|
||||
ParsingRequirements::CHROME_AND_UA_ONLY,
|
||||
),
|
||||
feature!(
|
||||
atom!("-moz-print-preview"),
|
||||
AllowsRanges::No,
|
||||
Evaluator::BoolInteger(eval_moz_print_preview),
|
||||
ParsingRequirements::CHROME_AND_UA_ONLY,
|
||||
),
|
||||
system_metric_feature!(atom!("-moz-scrollbar-start-backward")),
|
||||
system_metric_feature!(atom!("-moz-scrollbar-start-forward")),
|
||||
system_metric_feature!(atom!("-moz-scrollbar-end-backward")),
|
||||
|
|
|
@ -206,15 +206,6 @@ impl Device {
|
|||
self.reset_computed_values();
|
||||
}
|
||||
|
||||
/// Returns whether this document is in print preview.
|
||||
pub fn is_print_preview(&self) -> bool {
|
||||
let pc = match self.pres_context() {
|
||||
Some(pc) => pc,
|
||||
None => return false,
|
||||
};
|
||||
pc.mType == structs::nsPresContext_nsPresContextType_eContext_PrintPreview
|
||||
}
|
||||
|
||||
/// Returns the current media type of the device.
|
||||
pub fn media_type(&self) -> MediaType {
|
||||
let pc = match self.pres_context() {
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
<section id="color-mode" class="section-block">
|
||||
<label for="color-mode-picker" class="block-label" data-l10n-id="printui-color-mode-label"></label>
|
||||
<select is="color-mode-select" id="color-mode-picker" class="row" data-setting-name="printInColor">
|
||||
<option value="color" selected data-l10n-id="printui-color-mode-color"></option>
|
||||
<option value="color" selected data-l10n-id="printui-color-mode-color" id="color-option" hidden></option>
|
||||
<option value="bw" data-l10n-id="printui-color-mode-bw"></option>
|
||||
</select>
|
||||
</section>
|
||||
|
|
|
@ -576,20 +576,6 @@ const PrintSettingsViewProxy = {
|
|||
|
||||
case "supportsColor":
|
||||
return this.availablePrinters[target.printerName].supportsColor;
|
||||
|
||||
// We allow switching colors except:
|
||||
//
|
||||
// * For PDF printing, where it'd require rasterization and thus bad
|
||||
// quality.
|
||||
//
|
||||
// * For Mac, where there's no API to print in monochrome.
|
||||
//
|
||||
case "supportsColorSwitch":
|
||||
return (
|
||||
target.printerName != PrintUtils.SAVE_TO_PDF_PRINTER &&
|
||||
AppConstants.platform !== "macosx" &&
|
||||
this.get(target, "supportsColor")
|
||||
);
|
||||
}
|
||||
return target[name];
|
||||
},
|
||||
|
@ -758,16 +744,13 @@ class ColorModePicker extends PrintSettingSelect {
|
|||
update(settings) {
|
||||
let value = settings[this.settingName];
|
||||
let supportsColor = settings.supportsColor;
|
||||
let supportsColorSwitch = settings.supportsColorSwitch;
|
||||
// If we're switching to a printer that either doesn't allow us to switch
|
||||
// to monochrome, or doesn't support color, force a value change.
|
||||
let forceChange = value != supportsColor && (!supportsColorSwitch || value);
|
||||
if (forceChange) {
|
||||
value = !value;
|
||||
let forceChange;
|
||||
if (value && !supportsColor) {
|
||||
forceChange = true;
|
||||
value = false;
|
||||
}
|
||||
this.value = value ? "color" : "bw";
|
||||
this.toggleAttribute("disallowed", !supportsColorSwitch);
|
||||
this.disabled = !supportsColorSwitch;
|
||||
this.options.namedItem("color-option").hidden = !supportsColor;
|
||||
if (forceChange) {
|
||||
this.dispatchEvent(new Event("change", { bubbles: true }));
|
||||
}
|
||||
|
|
|
@ -50,7 +50,6 @@ STATIC_ATOMS = [
|
|||
Atom("mozsignature", "moz-signature"), # Used by MailNews.
|
||||
Atom("_moz_is_glyph", "-moz-is-glyph"),
|
||||
Atom("_moz_original_size", "_moz_original_size"),
|
||||
Atom("_moz_print_preview", "-moz-print-preview"),
|
||||
Atom("menuactive", "_moz-menuactive"),
|
||||
Atom("_poundDefault", "#default"),
|
||||
Atom("_asterisk", "*"),
|
||||
|
|
Загрузка…
Ссылка в новой задаче