зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 972db326c375 (bug 1587570) for causing wr failures on subsup-legacy-scriptshift-attributes-001.tentative.html
This commit is contained in:
Родитель
4c99a834d0
Коммит
e37b7b8834
|
@ -51,6 +51,5 @@ DEPRECATED_OPERATION(MathML_DeprecatedLineThicknessValue)
|
||||||
DEPRECATED_OPERATION(MathML_DeprecatedMathSizeValue)
|
DEPRECATED_OPERATION(MathML_DeprecatedMathSizeValue)
|
||||||
DEPRECATED_OPERATION(MathML_DeprecatedMathSpaceValue)
|
DEPRECATED_OPERATION(MathML_DeprecatedMathSpaceValue)
|
||||||
DEPRECATED_OPERATION(MathML_DeprecatedMencloseNotationRadical)
|
DEPRECATED_OPERATION(MathML_DeprecatedMencloseNotationRadical)
|
||||||
DEPRECATED_OPERATION(MathML_DeprecatedScriptShiftAttributes)
|
|
||||||
DEPRECATED_OPERATION(MathML_DeprecatedStyleAttribute)
|
DEPRECATED_OPERATION(MathML_DeprecatedStyleAttribute)
|
||||||
DEPRECATED_OPERATION(MathML_DeprecatedXLinkAttribute)
|
DEPRECATED_OPERATION(MathML_DeprecatedXLinkAttribute)
|
||||||
|
|
|
@ -375,8 +375,6 @@ MathML_DeprecatedMathSizeValueWarning=“small”, “normal” and “big” ar
|
||||||
MathML_DeprecatedMathSpaceValueWarning=“veryverythinmathspace”, “verythinmathspace”, “thinmathspace”, “mediummathspace”, “thickmathspace”, “verythickmathspace” and “veryverythickmathspace” are deprecated values for MathML lengths and will be removed at a future date.
|
MathML_DeprecatedMathSpaceValueWarning=“veryverythinmathspace”, “verythinmathspace”, “thinmathspace”, “mediummathspace”, “thickmathspace”, “verythickmathspace” and “veryverythickmathspace” are deprecated values for MathML lengths and will be removed at a future date.
|
||||||
# LOCALIZATION NOTE: Do not translate radical, notation and menclose.
|
# LOCALIZATION NOTE: Do not translate radical, notation and menclose.
|
||||||
MathML_DeprecatedMencloseNotationRadical=The “radical” value is deprecated for the “notation” attribute of the <menclose> element and will be removed at a future date.
|
MathML_DeprecatedMencloseNotationRadical=The “radical” value is deprecated for the “notation” attribute of the <menclose> element and will be removed at a future date.
|
||||||
# LOCALIZATION NOTE: Do not translate MathML, subscriptshift and superscriptshift.
|
|
||||||
MathML_DeprecatedScriptShiftAttributes=MathML attributes “subscriptshift” and “superscriptshift” are deprecated and may be removed at a future date.
|
|
||||||
# LOCALIZATION NOTE: Do not translate MathML, background, color, fontfamily, fontsize, fontstyle and fontweight.
|
# LOCALIZATION NOTE: Do not translate MathML, background, color, fontfamily, fontsize, fontstyle and fontweight.
|
||||||
MathML_DeprecatedStyleAttributeWarning=MathML attributes “background”, “color”, “fontfamily”, “fontsize”, “fontstyle” and “fontweight” are deprecated and will be removed at a future date.
|
MathML_DeprecatedStyleAttributeWarning=MathML attributes “background”, “color”, “fontfamily”, “fontsize”, “fontstyle” and “fontweight” are deprecated and will be removed at a future date.
|
||||||
# LOCALIZATION NOTE: Do not translate MathML and XLink.
|
# LOCALIZATION NOTE: Do not translate MathML and XLink.
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#include "nsMathMLmmultiscriptsFrame.h"
|
#include "nsMathMLmmultiscriptsFrame.h"
|
||||||
|
|
||||||
#include "mozilla/PresShell.h"
|
#include "mozilla/PresShell.h"
|
||||||
#include "mozilla/StaticPrefs_mathml.h"
|
|
||||||
#include "nsPresContext.h"
|
#include "nsPresContext.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "gfxContext.h"
|
#include "gfxContext.h"
|
||||||
|
@ -95,43 +94,41 @@ nsresult nsMathMLmmultiscriptsFrame::Place(DrawTarget* aDrawTarget,
|
||||||
nscoord supScriptShift = 0;
|
nscoord supScriptShift = 0;
|
||||||
float fontSizeInflation = nsLayoutUtils::FontSizeInflationFor(this);
|
float fontSizeInflation = nsLayoutUtils::FontSizeInflationFor(this);
|
||||||
|
|
||||||
if (!StaticPrefs::mathml_script_shift_attributes_disabled()) {
|
// subscriptshift
|
||||||
// subscriptshift
|
//
|
||||||
//
|
// "Specifies the minimum amount to shift the baseline of subscript down; the
|
||||||
// "Specifies the minimum amount to shift the baseline of subscript down;
|
// default is for the rendering agent to use its own positioning rules."
|
||||||
// the default is for the rendering agent to use its own positioning rules."
|
//
|
||||||
//
|
// values: length
|
||||||
// values: length
|
// default: automatic
|
||||||
// default: automatic
|
//
|
||||||
//
|
// We use 0 as the default value so unitless values can be ignored.
|
||||||
// We use 0 as the default value so unitless values can be ignored.
|
// As a minimum, negative values can be ignored.
|
||||||
// As a minimum, negative values can be ignored.
|
//
|
||||||
//
|
nsAutoString value;
|
||||||
nsAutoString value;
|
if (!mContent->IsMathMLElement(nsGkAtoms::msup_)) {
|
||||||
if (!mContent->IsMathMLElement(nsGkAtoms::msup_) &&
|
mContent->AsElement()->GetAttr(kNameSpaceID_None,
|
||||||
mContent->AsElement()->GetAttr(kNameSpaceID_None,
|
nsGkAtoms::subscriptshift_, value);
|
||||||
nsGkAtoms::subscriptshift_, value)) {
|
if (!value.IsEmpty()) {
|
||||||
mContent->OwnerDoc()->WarnOnceAbout(
|
|
||||||
dom::Document::eMathML_DeprecatedScriptShiftAttributes);
|
|
||||||
ParseNumericValue(value, &subScriptShift, 0, PresContext(),
|
ParseNumericValue(value, &subScriptShift, 0, PresContext(),
|
||||||
mComputedStyle, fontSizeInflation);
|
mComputedStyle, fontSizeInflation);
|
||||||
}
|
}
|
||||||
// superscriptshift
|
}
|
||||||
//
|
// superscriptshift
|
||||||
// "Specifies the minimum amount to shift the baseline of superscript up;
|
//
|
||||||
// the default is for the rendering agent to use its own positioning rules."
|
// "Specifies the minimum amount to shift the baseline of superscript up; the
|
||||||
//
|
// default is for the rendering agent to use its own positioning rules."
|
||||||
// values: length
|
//
|
||||||
// default: automatic
|
// values: length
|
||||||
//
|
// default: automatic
|
||||||
// We use 0 as the default value so unitless values can be ignored.
|
//
|
||||||
// As a minimum, negative values can be ignored.
|
// We use 0 as the default value so unitless values can be ignored.
|
||||||
//
|
// As a minimum, negative values can be ignored.
|
||||||
if (!mContent->IsMathMLElement(nsGkAtoms::msub_) &&
|
//
|
||||||
mContent->AsElement()->GetAttr(kNameSpaceID_None,
|
if (!mContent->IsMathMLElement(nsGkAtoms::msub_)) {
|
||||||
nsGkAtoms::superscriptshift_, value)) {
|
mContent->AsElement()->GetAttr(kNameSpaceID_None,
|
||||||
mContent->OwnerDoc()->WarnOnceAbout(
|
nsGkAtoms::superscriptshift_, value);
|
||||||
dom::Document::eMathML_DeprecatedScriptShiftAttributes);
|
if (!value.IsEmpty()) {
|
||||||
ParseNumericValue(value, &supScriptShift, 0, PresContext(),
|
ParseNumericValue(value, &supScriptShift, 0, PresContext(),
|
||||||
mComputedStyle, fontSizeInflation);
|
mComputedStyle, fontSizeInflation);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,26 +34,24 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=706406
|
||||||
</math></p>
|
</math></p>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
|
|
||||||
/** Test for the scriptshift aspect of bug 827713 **/
|
/** Test for the scriptshift aspect of bug 827713 **/
|
||||||
SimpleTest.waitForExplicitFinish();
|
SimpleTest.waitForExplicitFinish();
|
||||||
|
|
||||||
if (SpecialPowers.getBoolPref('mathml.script_shift_attributes.disabled')) {
|
subBaseRect = $("subbase").getBoundingClientRect();
|
||||||
ok(true, "Script shifts disabled");
|
subSubRect = $("subsub").getBoundingClientRect();
|
||||||
} else {
|
is(subBaseRect.bottom, subSubRect.top, "Bad subscript shift for msub");
|
||||||
subBaseRect = $("subbase").getBoundingClientRect();
|
|
||||||
subSubRect = $("subsub").getBoundingClientRect();
|
|
||||||
is(subBaseRect.bottom, subSubRect.top, "Bad subscript shift for msub");
|
|
||||||
|
|
||||||
supBaseRect = $("supbase").getBoundingClientRect();
|
supBaseRect = $("supbase").getBoundingClientRect();
|
||||||
supSupRect = $("supsup").getBoundingClientRect();
|
supSupRect = $("supsup").getBoundingClientRect();
|
||||||
is(supBaseRect.top, supSupRect.bottom, "Bad superscript shift for msup");
|
is(supBaseRect.top, supSupRect.bottom, "Bad superscript shift for msup");
|
||||||
|
|
||||||
|
ssBaseRect = $("ssbase").getBoundingClientRect();
|
||||||
|
ssSubRect = $("sssub").getBoundingClientRect();
|
||||||
|
ssSupRect = $("sssup").getBoundingClientRect();
|
||||||
|
is(ssBaseRect.bottom, ssSubRect.top, "Bad subscript shift for msubusp");
|
||||||
|
is(ssBaseRect.top, ssSupRect.bottom, "Bad superscript shift for msubusp");
|
||||||
|
|
||||||
ssBaseRect = $("ssbase").getBoundingClientRect();
|
|
||||||
ssSubRect = $("sssub").getBoundingClientRect();
|
|
||||||
ssSupRect = $("sssup").getBoundingClientRect();
|
|
||||||
is(ssBaseRect.bottom, ssSubRect.top, "Bad subscript shift for msubusp");
|
|
||||||
is(ssBaseRect.top, ssSupRect.bottom, "Bad superscript shift for msubusp");
|
|
||||||
}
|
|
||||||
|
|
||||||
SimpleTest.finish();
|
SimpleTest.finish();
|
||||||
|
|
||||||
|
|
|
@ -5364,12 +5364,6 @@
|
||||||
value: @IS_NIGHTLY_BUILD@
|
value: @IS_NIGHTLY_BUILD@
|
||||||
mirror: always
|
mirror: always
|
||||||
|
|
||||||
# Whether to disable subscriptshift and superscriptshift attributes.
|
|
||||||
- name: mathml.script_shift_attributes.disabled
|
|
||||||
type: bool
|
|
||||||
value: @IS_NIGHTLY_BUILD@
|
|
||||||
mirror: always
|
|
||||||
|
|
||||||
# Whether to disable support for XLink on MathML elements.
|
# Whether to disable support for XLink on MathML elements.
|
||||||
- name: mathml.xlink.disabled
|
- name: mathml.xlink.disabled
|
||||||
type: bool
|
type: bool
|
||||||
|
|
Загрузка…
Ссылка в новой задаче