mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1587572 - Remove support for the mfrac@bevelled attribute. r=emilio
See https://groups.google.com/forum/#!topic/mozilla.dev.platform/9pEvlYn-Xyw Differential Revision: https://phabricator.services.mozilla.com/D49299 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
3f1e57d343
commit
d7e6c31b00
@ -47,6 +47,7 @@ DEPRECATED_OPERATION(MozfullscreenerrorDeprecatedPrefix)
|
||||
DEPRECATED_OPERATION(External_AddSearchProvider)
|
||||
DEPRECATED_OPERATION(MouseEvent_MozPressure)
|
||||
DEPRECATED_OPERATION(MathML_DeprecatedAlignmentAttributes)
|
||||
DEPRECATED_OPERATION(MathML_DeprecatedBevelledAttribute)
|
||||
DEPRECATED_OPERATION(MathML_DeprecatedLineThicknessValue)
|
||||
DEPRECATED_OPERATION(MathML_DeprecatedMathSizeValue)
|
||||
DEPRECATED_OPERATION(MathML_DeprecatedMathSpaceValue)
|
||||
|
@ -366,6 +366,8 @@ External_AddSearchProviderWarning=AddSearchProvider is deprecated.
|
||||
MouseEvent_MozPressureWarning=MouseEvent.mozPressure is deprecated. Use PointerEvent.pressure instead.
|
||||
# LOCALIZATION NOTE: Do not translate MathML, align, numalign and denomalign.
|
||||
MathML_DeprecatedAlignmentAttributesWarning=MathML attributes “align”, “numalign” and “denomalign” are deprecated values and will be removed at a future date.
|
||||
# LOCALIZATION NOTE: Do not translate MathML and bevelled.
|
||||
MathML_DeprecatedBevelledAttribute=MathML attribute “bevelled” is deprecated and may be removed at a future date.
|
||||
# LOCALIZATION NOTE: Do not translate thin, medium, thick and linethickness.
|
||||
MathML_DeprecatedLineThicknessValueWarning=“thin”, “medium” and “thick” are deprecated values for the linethickness attribute and will be removed at a future date.
|
||||
# LOCALIZATION NOTE: Do not translate small, normal, big and mathsize.
|
||||
|
@ -253,9 +253,15 @@ nsresult nsMathMLmfracFrame::PlaceInternal(DrawTarget* aDrawTarget,
|
||||
defaultRuleThickness, fontSizeInflation);
|
||||
|
||||
// bevelled attribute
|
||||
mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::bevelled_,
|
||||
value);
|
||||
mIsBevelled = value.EqualsLiteral("true");
|
||||
mIsBevelled = false;
|
||||
if (!StaticPrefs::mathml_mfrac_bevelled_attribute_disabled()) {
|
||||
if (mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::bevelled_,
|
||||
value)) {
|
||||
mContent->OwnerDoc()->WarnOnceAbout(
|
||||
dom::Document::eMathML_DeprecatedBevelledAttribute);
|
||||
mIsBevelled = value.EqualsLiteral("true");
|
||||
}
|
||||
}
|
||||
|
||||
bool displayStyle = StyleFont()->mMathDisplay == NS_MATHML_DISPLAYSTYLE_BLOCK;
|
||||
|
||||
|
@ -61,60 +61,63 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=975681
|
||||
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 975681 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var epsilon = 1; // allow a small relative error
|
||||
var delta = .25; // used to indicate a small shift
|
||||
|
||||
function almostEqualAbs(x, y) {
|
||||
var e = Math.abs(x - y);
|
||||
return (e <= epsilon);
|
||||
if (SpecialPowers.getBoolPref('mathml.mfrac_bevelled_attribute.disabled')) {
|
||||
ok(true, "bevelled attribute disabled.")
|
||||
} else {
|
||||
|
||||
var epsilon = 1; // allow a small relative error
|
||||
var delta = .25; // used to indicate a small shift
|
||||
|
||||
function almostEqualAbs(x, y) {
|
||||
var e = Math.abs(x - y);
|
||||
return (e <= epsilon);
|
||||
}
|
||||
|
||||
function almostLessThanAbs(x, y) {
|
||||
var e = x - y;
|
||||
return (e <= epsilon);
|
||||
}
|
||||
|
||||
// test: mfrac
|
||||
var mfracNum = document.getElementById("test_mfrac").firstElementChild.getBoundingClientRect();
|
||||
var mfracDenom = document.getElementById("test_mfrac").lastElementChild.getBoundingClientRect();
|
||||
|
||||
ok(almostEqualAbs(mfracNum.left, mfracDenom.left) &&
|
||||
almostEqualAbs(mfracNum.right, mfracDenom.right), "Numerator and denominator should be vertical aligned");
|
||||
|
||||
ok(almostLessThanAbs(mfracNum.bottom, mfracDenom.top), "Numerator should be above denominator");
|
||||
|
||||
// test: mfrac attributes
|
||||
var mfrac = document.getElementById("mfrac_linethickness").getBoundingClientRect();
|
||||
var num = document.getElementById("mfrac_linethickness").firstElementChild.getBoundingClientRect();
|
||||
var denom = document.getElementById("mfrac_linethickness").lastElementChild.getBoundingClientRect();
|
||||
|
||||
ok(almostLessThanAbs(num.height + 30 + denom.height, mfrac.height) &&
|
||||
almostLessThanAbs(num.bottom + 30, denom.top), "numerator and denominator should be separated by linethickness");
|
||||
|
||||
if (!SpecialPowers.getBoolPref('mathml.deprecated_alignment_attributes.disabled')) {
|
||||
num = document.getElementById("mfrac_numalign").firstElementChild.getBoundingClientRect();
|
||||
mfrac = document.getElementById("mfrac_numalign").getBoundingClientRect();
|
||||
|
||||
ok(almostEqualAbs(num.left, mfrac.left), "numerator should be aligned left");
|
||||
|
||||
mfrac = document.getElementById("mfrac_denomalign").getBoundingClientRect();
|
||||
denom = document.getElementById("mfrac_denomalign").lastElementChild.getBoundingClientRect();
|
||||
|
||||
ok(almostEqualAbs(mfrac.right, denom.right), "denominator should be aligned right");
|
||||
}
|
||||
|
||||
num = document.getElementById("mfrac_bevelled").firstElementChild.getBoundingClientRect();
|
||||
denom = document.getElementById("mfrac_bevelled").lastElementChild.getBoundingClientRect();
|
||||
|
||||
ok(almostLessThanAbs(num.right, denom.left) &&
|
||||
almostLessThanAbs(num.top*(1-delta)+num.bottom*delta, denom.top), "incorrect position of mfrac children");
|
||||
}
|
||||
|
||||
function almostLessThanAbs(x, y) {
|
||||
var e = x - y;
|
||||
return (e <= epsilon);
|
||||
}
|
||||
|
||||
// test: mfrac
|
||||
var mfracNum = document.getElementById("test_mfrac").firstElementChild.getBoundingClientRect();
|
||||
var mfracDenom = document.getElementById("test_mfrac").lastElementChild.getBoundingClientRect();
|
||||
|
||||
ok(almostEqualAbs(mfracNum.left, mfracDenom.left) &&
|
||||
almostEqualAbs(mfracNum.right, mfracDenom.right), "Numerator and denominator should be vertical aligned");
|
||||
|
||||
ok(almostLessThanAbs(mfracNum.bottom, mfracDenom.top), "Numerator should be above denominator");
|
||||
|
||||
// test: mfrac attributes
|
||||
var mfrac = document.getElementById("mfrac_linethickness").getBoundingClientRect();
|
||||
var num = document.getElementById("mfrac_linethickness").firstElementChild.getBoundingClientRect();
|
||||
var denom = document.getElementById("mfrac_linethickness").lastElementChild.getBoundingClientRect();
|
||||
|
||||
ok(almostLessThanAbs(num.height + 30 + denom.height, mfrac.height) &&
|
||||
almostLessThanAbs(num.bottom + 30, denom.top), "numerator and denominator should be separated by linethickness");
|
||||
|
||||
if (!SpecialPowers.getBoolPref('mathml.deprecated_alignment_attributes.disabled')) {
|
||||
num = document.getElementById("mfrac_numalign").firstElementChild.getBoundingClientRect();
|
||||
mfrac = document.getElementById("mfrac_numalign").getBoundingClientRect();
|
||||
|
||||
ok(almostEqualAbs(num.left, mfrac.left), "numerator should be aligned left");
|
||||
|
||||
mfrac = document.getElementById("mfrac_denomalign").getBoundingClientRect();
|
||||
denom = document.getElementById("mfrac_denomalign").lastElementChild.getBoundingClientRect();
|
||||
|
||||
ok(almostEqualAbs(mfrac.right, denom.right), "denominator should be aligned right");
|
||||
}
|
||||
|
||||
num = document.getElementById("mfrac_bevelled").firstElementChild.getBoundingClientRect();
|
||||
denom = document.getElementById("mfrac_bevelled").lastElementChild.getBoundingClientRect();
|
||||
|
||||
ok(almostLessThanAbs(num.right, denom.left) &&
|
||||
almostLessThanAbs(num.top*(1-delta)+num.bottom*delta, denom.top), "incorrect position of mfrac children");
|
||||
|
||||
|
||||
SimpleTest.finish();
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -16,7 +16,7 @@ fuzzy-if(skiaContent,0-2,0-529) == 393760-2.xml 393760-2-ref.xml
|
||||
== 414123.xhtml 414123-ref.xhtml
|
||||
== dir-1.html dir-1-ref.html
|
||||
pref(mathml.deprecated_alignment_attributes.disabled,false) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == dir-2.html dir-2-ref.html # Bug 1392106
|
||||
random-if(gtkWidget) == dir-3.html dir-3-ref.html # bug 1309426
|
||||
pref(mathml.mfrac_bevelled_attribute.disabled,false) random-if(gtkWidget) == dir-3.html dir-3-ref.html # bug 1309426
|
||||
pref(mathml.deprecated_menclose_notation_radical.disabled,false) == dir-4.html dir-4-ref.html
|
||||
== dir-5.html dir-5-ref.html
|
||||
fuzzy-if(cocoaWidget,0-135,0-56) == dir-6a.html dir-6a-ref.html
|
||||
@ -93,7 +93,7 @@ fails == stretchy-mover-2a.html stretchy-mover-2-ref.html
|
||||
== stretchy-largeop-1.html stretchy-largeop-1-ref.html
|
||||
== stretchy-largeop-2.html stretchy-largeop-2-ref.html
|
||||
== stretchy-largeop-3.html stretchy-largeop-3-ref.html
|
||||
== table-width-1.xhtml table-width-1-ref.xhtml
|
||||
pref(mathml.mfrac_bevelled_attribute.disabled,false) == table-width-1.xhtml table-width-1-ref.xhtml
|
||||
== table-width-2.html table-width-2-ref.html
|
||||
== table-width-3.html table-width-3-ref.html
|
||||
== table-width-4.html table-width-4-ref.html
|
||||
@ -187,7 +187,7 @@ pref(mathml.mathspace_names.disabled,false) == positive-namedspace.html positive
|
||||
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == mo-lspace-rspace.html mo-lspace-rspace-ref.html # Bug 1392106
|
||||
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == mo-lspace-rspace-2.html mo-lspace-rspace-2-ref.html # Bug 1392106
|
||||
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == mo-lspace-rspace-3.html mo-lspace-rspace-3-ref.html # Bug 1392106
|
||||
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == mo-lspace-rspace-4.html mo-lspace-rspace-4-ref.html # Bug 1392106
|
||||
pref(mathml.mfrac_bevelled_attribute.disabled,false) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == mo-lspace-rspace-4.html mo-lspace-rspace-4-ref.html # Bug 1392106
|
||||
== mo-invisibleoperators.html mo-invisibleoperators-ref.html
|
||||
== mo-invisibleoperators-2.html mo-invisibleoperators-2-ref.html
|
||||
random-if(gtkWidget) == mo-glyph-size.html mo-glyph-size-ref.html # bug 1309426
|
||||
@ -340,7 +340,7 @@ random-if(gtkWidget) == rowlines-3-2.html rowlines-3-2-ref.html # bug 1309426
|
||||
!= op-dict-11.html op-dict-11-ref.html
|
||||
== op-dict-12.html op-dict-12-ref.html
|
||||
!= op-dict-13.html op-dict-13-ref.html
|
||||
== mfrac-A-1.html mfrac-A-1-ref.html
|
||||
pref(mathml.mfrac_bevelled_attribute.disabled,false) == mfrac-A-1.html mfrac-A-1-ref.html
|
||||
pref(mathml.deprecated_alignment_attributes.disabled,false) == mfrac-A-2.html mfrac-A-2-ref.html
|
||||
pref(mathml.deprecated_alignment_attributes.disabled,false) == mfrac-A-3.html mfrac-A-3-ref.html
|
||||
== mfrac-A-4.html mfrac-A-4-ref.html
|
||||
@ -348,18 +348,18 @@ pref(mathml.mfrac_linethickness_names.disabled,false) random-if(/^Windows\x20NT\
|
||||
pref(mathml.deprecated_alignment_attributes.disabled,false) == mfrac-A-6.html mfrac-A-6-ref.html
|
||||
pref(mathml.deprecated_alignment_attributes.disabled,false) == mfrac-A-7.html mfrac-A-7-ref.html
|
||||
== mfrac-A-8.html mfrac-A-8-ref.html
|
||||
== mfrac-B-1.html mfrac-B-1-ref.html
|
||||
pref(mathml.mfrac_bevelled_attribute.disabled,false) == mfrac-B-1.html mfrac-B-1-ref.html
|
||||
pref(mathml.mfrac_linethickness_names.disabled,false) == mfrac-B-2.html mfrac-B-2-3-ref.html
|
||||
pref(mathml.mfrac_linethickness_names.disabled,false) == mfrac-B-3.html mfrac-B-2-3-ref.html
|
||||
pref(mathml.deprecated_alignment_attributes.disabled,false) fuzzy-if(geckoview&&webrender,0-239,0-781) == mfrac-B-4.html mfrac-B-4-5-ref.html
|
||||
pref(mathml.deprecated_alignment_attributes.disabled,false) == mfrac-B-5.html mfrac-B-4-5-ref.html
|
||||
pref(mathml.deprecated_alignment_attributes.disabled,false) fuzzy-if(geckoview&&webrender,0-239,0-781) == mfrac-B-6.html mfrac-B-6-7-ref.html
|
||||
pref(mathml.deprecated_alignment_attributes.disabled,false) == mfrac-B-7.html mfrac-B-6-7-ref.html
|
||||
fuzzy-if(OSX,0-1,0-100) fuzzy-if(skiaContent,0-1,0-14) == mfrac-C-1.html mfrac-C-1-ref.html
|
||||
pref(mathml.mfrac_bevelled_attribute.disabled,false) fuzzy-if(OSX,0-1,0-100) fuzzy-if(skiaContent,0-1,0-14) == mfrac-C-1.html mfrac-C-1-ref.html
|
||||
pref(mathml.mfrac_linethickness_names.disabled,false) == mfrac-C-2.html mfrac-C-2-ref.html
|
||||
pref(mathml.deprecated_alignment_attributes.disabled,false) fuzzy-if(geckoview&&webrender,0-239,0-776) == mfrac-C-3.html mfrac-C-3-ref.html
|
||||
pref(mathml.deprecated_alignment_attributes.disabled,false) fuzzy-if(geckoview&&webrender,0-239,0-271) == mfrac-C-4.html mfrac-C-4-ref.html
|
||||
fuzzy-if(OSX,0-1,0-100) fuzzy-if(skiaContent,0-1,0-14) == mfrac-D-1.html mfrac-D-1-ref.html
|
||||
pref(mathml.mfrac_bevelled_attribute.disabled,false) fuzzy-if(OSX,0-1,0-100) fuzzy-if(skiaContent,0-1,0-14) == mfrac-D-1.html mfrac-D-1-ref.html
|
||||
pref(mathml.mfrac_linethickness_names.disabled,false) == mfrac-D-2.html mfrac-D-2-ref.html
|
||||
pref(mathml.deprecated_alignment_attributes.disabled,false) fuzzy-if(geckoview&&webrender,0-239,0-776) == mfrac-D-3.html mfrac-D-3-ref.html
|
||||
pref(mathml.deprecated_alignment_attributes.disabled,false) fuzzy-if(geckoview&&webrender,0-239,0-271) == mfrac-D-4.html mfrac-D-4-ref.html
|
||||
|
@ -5351,6 +5351,12 @@
|
||||
value: @IS_NIGHTLY_BUILD@
|
||||
mirror: always
|
||||
|
||||
# Whether to disable the mfrac bevelled attribute.
|
||||
- name: mathml.mfrac_bevelled_attribute.disabled
|
||||
type: bool
|
||||
value: @IS_NIGHTLY_BUILD@
|
||||
mirror: always
|
||||
|
||||
# Whether to disable legacy names "thin", "thick" and "medium" for the
|
||||
# linethickness attribute of the mfrac element.
|
||||
- name: mathml.mfrac_linethickness_names.disabled
|
||||
|
@ -1 +1 @@
|
||||
prefs: [mathml.deprecated_style_attributes.disabled: true, mathml.deprecated_menclose_notation_radical.disabled: true, mathml.legacy_number_syntax.disabled: true, mathml.mathsize_names.disabled:true, mathml.mathspace_names.disabled: true, mathml.mfrac_linethickness_names.disabled:true, mathml.nonzero_unitless_lengths.disabled:true, mathml.deprecated_alignment_attributes.disabled: true, mathml.script_shift_attributes.disabled: true]
|
||||
prefs: [mathml.deprecated_style_attributes.disabled: true, mathml.deprecated_menclose_notation_radical.disabled: true, mathml.legacy_number_syntax.disabled: true, mathml.mathsize_names.disabled:true, mathml.mathspace_names.disabled: true, mathml.mfrac_linethickness_names.disabled:true, mathml.nonzero_unitless_lengths.disabled:true, mathml.deprecated_alignment_attributes.disabled: true, mathml.script_shift_attributes.disabled: true, mathml.mfrac_bevelled_attribute.disabled: true]
|
@ -1,2 +0,0 @@
|
||||
[frac-legacy-bevelled-attribute.tentative.html]
|
||||
expected: FAIL
|
Loading…
Reference in New Issue
Block a user