Commit Graph
116 Commits
Author SHA1 Message Date
Dão Gottwald 32d4a0ef7d Bug 2038250 - Fork media-query-no-invalid stylelint rule to allow -moz-pref. r=hjones,desktop-theme-reviewers,firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D299653
2026-05-26 14:26:18 +00:00
Alexandru Marc be40df6b18 Revert "Bug 2038250 - Fork media-query-no-invalid stylelint rule to allow -moz-pref. r=hjones,desktop-theme-reviewers,firefox-style-system-reviewers,emilio" for causing node failures @ media-query-no-invalid.tests.mjs
This reverts commit bca5d1f7e0.
2026-05-13 22:50:15 +00:00
Dão Gottwald bca5d1f7e0 Bug 2038250 - Fork media-query-no-invalid stylelint rule to allow -moz-pref. r=hjones,desktop-theme-reviewers,firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D299653
2026-05-13 22:33:02 +00:00
Eri Pazos Pérez 0599bccd84 Bug 1788937 - Implement font-family: math. r=jfkthame,emilio,firefox-style-system-reviewers,layout-reviewers
Replaces the internal x-math lang for the CSS Fonts Level 4
`font-family: math` generic font family.

Since the preference system is not flexible enough yet, the
configuration for the generic family is still handled by the
previous key, `font.name-list.serif.x-math`.

Spec: https://www.w3.org/TR/css-fonts-4/#math-def

Differential Revision: https://phabricator.services.mozilla.com/D256978
2025-09-18 11:15:21 +00:00
agoloman 9d4a4e88a4 Revert "Bug 1788937 - Implement font-family: math. r=jfkthame,emilio,firefox-style-system-reviewers,layout-reviewers" for causing wpt failures @math-global-event-handlers.tentative.html.
This reverts commit fc0d07c7d9.
2025-08-26 16:37:47 +00:00
Eri Pazos Pérez fc0d07c7d9 Bug 1788937 - Implement font-family: math. r=jfkthame,emilio,firefox-style-system-reviewers,layout-reviewers
Replaces the internal x-math lang for the CSS Fonts Level 4
`font-family: math` generic font family.

Since the preference system is not flexible enough yet, the
configuration for the generic family is still handled by the
previous key, `font.name-list.serif.x-math`.

Spec: https://www.w3.org/TR/css-fonts-4/#math-def

Differential Revision: https://phabricator.services.mozilla.com/D256978
2025-08-26 08:33:40 +00:00
Eri Pazos Pérez 49a7419209 Bug 1923569 - Implement math-shift: compact. r=fredw,emilio,firefox-style-system-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D260440
2025-08-19 12:31:35 +00:00
Alexandru Marc 4ba9672c61 Revert "Bug 1923569 - Implement math-shift: compact. r=fredw,emilio,firefox-style-system-reviewers" for causing non-unified build bustages @ nsMathMLmrootFrame.cpp
This reverts commit ed9282cc21.
2025-08-18 16:46:44 +00:00
Eri Pazos Pérez ed9282cc21 Bug 1923569 - Implement math-shift: compact. r=fredw,emilio,firefox-style-system-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D260440
2025-08-18 15:24:31 +00:00
hannajones bc8bef93b2 Bug 1606785 - Format layout CSS files with Prettier r=layout-reviewers,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D249175
2025-05-28 02:08:05 +00:00
agoloman 63c83deb26 Revert "Bug 1606785 - Enable Prettier for CSS files r=desktop-theme-reviewers,Standard8,frontend-codestyle-reviewers,emilio" for causing multiple failures.
This reverts commit ec5fa1d4c0.

Revert "Bug 1606785 - Format Firefox CSS files with Prettier r=desktop-theme-reviewers,perftest-reviewers,places-reviewers,translations-reviewers,omc-reviewers,backup-reviewers,browser-installer-reviewers,sparky,dao,pdahiya,nrishel,kpatenio"

This reverts commit baa5d72bbd.

Revert "Bug 1606785 - Format browser/themes and toolkit/themes CSS files with Prettier r=desktop-theme-reviewers,pip-reviewers,tabbrowser-reviewers,places-reviewers,dao,mconley"

This reverts commit 9604b0a8ae.

Revert "Bug 1606785 - Format browser/themes/preferences CSS files with Prettier r=settings-reviewers,desktop-theme-reviewers,dao,mconley"

This reverts commit 686c1cf85f.

Revert "Bug 1606785 - Format urlbar CSS files with Prettier r=urlbar-reviewers,desktop-theme-reviewers,dao"

This reverts commit a7a4f31251.

Revert "Bug 1606785 - Format webcompat CSS files with Prettier r=webcompat-reviewers,denschub"

This reverts commit 41bc4d5237.

Revert "Bug 1606785 - Format search CSS files with Prettier r=search-reviewers,jteow"

This reverts commit 7bb7f82374.

Revert "Bug 1606785 - Format dom CSS files with Prettier r=emilio"

This reverts commit c22e910235.

Revert "Bug 1606785 - Format android CSS files with Prettier r=geckoview-reviewers,hiro"

This reverts commit c08e43fc3d.

Revert "Bug 1606785 - Format layout CSS files with Prettier r=layout-reviewers,dholbert"

This reverts commit 4f2a32d1a4.

Revert "Bug 1606785 - Format devtools CSS files with Prettier r=devtools-reviewers,nchevobbe,frontend-codestyle-reviewers"

This reverts commit c05f675ddf.

Revert "Bug 1606785 - Format recomp CSS files with Prettier r=reusable-components-reviewers,desktop-theme-reviewers,dao,mkennedy"

This reverts commit b10c7de8d0.

Revert "Bug 1606785 - Format sidebar CSS files with Prettier r=sidebar-reviewers,desktop-theme-reviewers,dao,nsharpley"

This reverts commit d32c555e37.

Revert "Bug 1606785 - Format shopping CSS files with Prettier r=shopping-reviewers,desktop-theme-reviewers,dao,rking"

This reverts commit 965887a708.

Revert "Bug 1606785 - Format profiles CSS files with Prettier r=profiles-reviewers,desktop-theme-reviewers,dao,mossop"

This reverts commit 8338860f74.

Revert "Bug 1606785 - Format genai and ml CSS files with Prettier r=firefox-ai-ml-reviewers,Mardak"

This reverts commit d66681f553.

Revert "Bug 1606785 - Format firefoxview CSS files with Prettier r=fxview-reviewers,desktop-theme-reviewers,dao,jsudiaman"

This reverts commit 530b815cad.

Revert "Bug 1606785 - Format aboutlogins, megalist, and form autofill CSS files with Prettier r=credential-management-reviewers,mtigley,desktop-theme-reviewers,dao"

This reverts commit 813c864381.
2025-05-21 04:49:28 +00:00
hannajones 4f2a32d1a4 Bug 1606785 - Format layout CSS files with Prettier r=layout-reviewers,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D249175
2025-05-21 03:54:44 +00:00
Emilio Cobos Álvarez c67d8c9c9c Bug 1946764 - Support non-boolean media query prefs via -moz-pref(). r=firefox-style-system-reviewers,desktop-theme-reviewers,settings-reviewers,tabbrowser-reviewers,places-reviewers,sidebar-reviewers,urlbar-reviewers,firefox-ai-ml-reviewers,dao,mconley,dshin,mak
Allow querying int and string prefs too via functional syntax:

```
@media -moz-pref("pref-name", <value>) {
```

No argument means the pref exists and has a non-zero/false/empty value.
Unfortunately stylelint is still unhappy with this so we need to keep
the annoying comments...

Differential Revision: https://phabricator.services.mozilla.com/D237275
2025-02-12 12:14:42 +00:00
Butkovits Atila 3bc2e1759e Backed out changeset f1089681a6c6 (bug 1946764) for causing failures at browser_preferences_usage.js. 2025-02-11 21:24:36 +02:00
Emilio Cobos Álvarez bab7f36d0f Bug 1946764 - Support non-boolean media query prefs via -moz-pref(). r=firefox-style-system-reviewers,desktop-theme-reviewers,settings-reviewers,tabbrowser-reviewers,places-reviewers,sidebar-reviewers,urlbar-reviewers,firefox-ai-ml-reviewers,dao,mconley,dshin,mak
Allow querying int and string prefs too via functional syntax:

```
@media -moz-pref("pref-name", <value>) {
```

No argument implies bool. Unfortunately stylelint is still unhappy with
this so we need to keep the annoying comments...

Differential Revision: https://phabricator.services.mozilla.com/D237275
2025-02-11 17:26:17 +00:00
hjones 476bb0c534 Bug 1837658 - enable Stylelint length-zero-no-unit r=frontend-codestyle-reviewers,desktop-theme-reviewers,mtigley,settings-reviewers,pip-reviewers,credential-management-reviewers,devtools-reviewers,tabbrowser-reviewers,translations-reviewers,android-reviewers,backup-reviewers,nchevobbe,dao,mconley,tthibaud
This use of units for zero length occasionally gets flagged during theme reviews so it makes sense to establish our preference and automate checks via Stylelint.

Differential Revision: https://phabricator.services.mozilla.com/D230287
2024-12-10 00:28:49 +00:00
Frédéric Wang 119638ac63 Bug 1908069 - Add border/padding/margin support to mrow-like elements. r=emilio
See D216670 for the general approach taken.

This also fixes nsMathMLContainerFrame::UpdateIntrinsicISize which is
in particular used by nsMathMLmathBlockFrame and
nsMathMLmathInlineFrame when calculating intrinsic size of the <math>
tag and aligns merror's UA style on MathML Core at
https://w3c.github.io/mathml-core/#user-agent-stylesheet.

Differential Revision: https://phabricator.services.mozilla.com/D216686
2024-08-07 06:00:44 +00:00
Frédéric Wang ad6375be7c Bug 1908069 - Add border/padding/margin support to <mfrac>. r=emilio
This is the first patch of the series that actually take
border/padding/margin into account for MathML layout. One subtility is
that Gecko distinguishes the ink nsBoundingMetrics box and the
ReflowOutput box for accurate positioning of math components contrary
to the current version of MathML Core [1].

For MathML Core and the WPT tests, it is assumed that border/padding are
used to inflate the content box [2] [3] and it does not really matter
whether we inflate the ink bounding box, or simply adjust its offsets
inside the normal bounding box. We choose the former and introduce a
helper function InflateReflowAndBoundingMetrics for that purpose, which
will be reused in follow-up patches. After inflating these boxes, the
offsets of children and painted items must also be adjusted by the
left/top border+padding.

Regarding margins, MathML Core says that we should use "margin boxes"
and WPT tests simply check that the layout of MathML constructions
containing mspace elements with margins is not changed if we move
these margins inside the mspace's width/height/depth attributes. To
pass these tests, we similarly need to inflate both the ink and
non-ink bounding boxes by the margin.

However, the margins can be negative possibly leading to negative
dimensions of "margin boxes". To make the code more generic, we
simplify adjust all usages of the children's nsBoundingMetrics and
ReflowOutput to include these margins. When calling FinishReflowChild
at the end, the offsets of children must be adjusted by these margins.

This patch also reimplements the extra one-pixel padding around a
fraction using rules from MathML Core's UA stylesheet at
https://w3c.github.io/mathml-core/#user-agent-stylesheet

[1] https://github.com/w3c/mathml-core/issues/78
[2] https://github.com/web-platform-tests/wpt/blob/27c8d234ee83a4b15f36ad10cc26c951b1782fb6/mathml/relations/css-styling/padding-border-margin/border-002.html#L25
[4] https://github.com/web-platform-tests/wpt/blob/27c8d234ee83a4b15f36ad10cc26c951b1782fb6/mathml/relations/css-styling/padding-border-margin/padding-002.html#L26
[3] https://github.com/web-platform-tests/wpt/blob/27c8d234ee83a4b15f36ad10cc26c951b1782fb6/mathml/relations/css-styling/padding-border-margin/margin-003.html#L50

Differential Revision: https://phabricator.services.mozilla.com/D216670
2024-08-07 06:00:44 +00:00
Iulian Moraru 096c9e730e Backed out 7 changesets (bug 1908069) for causing wr failures on mo-lspace-rspace-4.html. CLOSED TREE
Backed out changeset d497ae104185 (bug 1908069)
Backed out changeset c87b8ca300dc (bug 1908069)
Backed out changeset 3e76c02843a7 (bug 1908069)
Backed out changeset f4c5983c700b (bug 1908069)
Backed out changeset 5468da212605 (bug 1908069)
Backed out changeset ab5ab71ddfc4 (bug 1908069)
Backed out changeset 21269d373fff (bug 1908069)
2024-08-01 19:45:36 +03:00
Frédéric Wang c353b03792 Bug 1908069 - Add border/padding/margin support to mrow-like elements. r=emilio
See D216670 for the general approach taken.

This also fixes nsMathMLContainerFrame::UpdateIntrinsicISize which is
in particular used by nsMathMLmathBlockFrame and
nsMathMLmathInlineFrame when calculating intrinsic size of the <math>
tag and aligns merror's UA style on MathML Core at
https://w3c.github.io/mathml-core/#user-agent-stylesheet.

Differential Revision: https://phabricator.services.mozilla.com/D216686
2024-08-01 12:58:07 +00:00
Frédéric Wang 4f718eac8d Bug 1908069 - Add border/padding/margin support to <mfrac>. r=emilio
This is the first patch of the series that actually take
border/padding/margin into account for MathML layout. One subtility is
that Gecko distinguishes the ink nsBoundingMetrics box and the
ReflowOutput box for accurate positioning of math components contrary
to the current version of MathML Core [1].

For MathML Core and the WPT tests, it is assumed that border/padding are
used to inflate the content box [2] [3] and it does not really matter
whether we inflate the ink bounding box, or simply adjust its offsets
inside the normal bounding box. We choose the former and introduce a
helper function InflateReflowAndBoundingMetrics for that purpose, which
will be reused in follow-up patches. After inflating these boxes, the
offsets of children and painted items must also be adjusted by the
left/top border+padding.

Regarding margins, MathML Core says that we should use "margin boxes"
and WPT tests simply check that the layout of MathML constructions
containing mspace elements with margins is not changed if we move
these margins inside the mspace's width/height/depth attributes. To
pass these tests, we similarly need to inflate both the ink and
non-ink bounding boxes by the margin.

However, the margins can be negative possibly leading to negative
dimensions of "margin boxes". To make the code more generic, we
simplify adjust all usages of the children's nsBoundingMetrics and
ReflowOutput to include these margins. When calling FinishReflowChild
at the end, the offsets of children must be adjusted by these margins.

This patch also reimplements the extra one-pixel padding around a
fraction using rules from MathML Core's UA stylesheet at
https://w3c.github.io/mathml-core/#user-agent-stylesheet

[1] https://github.com/w3c/mathml-core/issues/78
[2] https://github.com/web-platform-tests/wpt/blob/27c8d234ee83a4b15f36ad10cc26c951b1782fb6/mathml/relations/css-styling/padding-border-margin/border-002.html#L25
[4] https://github.com/web-platform-tests/wpt/blob/27c8d234ee83a4b15f36ad10cc26c951b1782fb6/mathml/relations/css-styling/padding-border-margin/padding-002.html#L26
[3] https://github.com/web-platform-tests/wpt/blob/27c8d234ee83a4b15f36ad10cc26c951b1782fb6/mathml/relations/css-styling/padding-border-margin/margin-003.html#L50

Differential Revision: https://phabricator.services.mozilla.com/D216670
2024-08-01 12:58:06 +00:00
Tamas Szentpeteri 5098f477fd Backed out 7 changesets (bug 1908069) for causing mochitest failures related to EnumSet.h. CLOSED TREE
Backed out changeset 7a9063b6e9f1 (bug 1908069)
Backed out changeset 6b8c788b3fb3 (bug 1908069)
Backed out changeset 6775a291fb83 (bug 1908069)
Backed out changeset 526b1ba8c610 (bug 1908069)
Backed out changeset e7797c083647 (bug 1908069)
Backed out changeset 2c4076a423fa (bug 1908069)
Backed out changeset 8fac35770369 (bug 1908069)
2024-07-31 18:45:21 +03:00
Frédéric Wang f9cfa02bfa Bug 1908069 - Add border/padding/margin support to mrow-like elements. r=emilio
See D216670 for the general approach taken.

This also fixes nsMathMLContainerFrame::UpdateIntrinsicISize which is
in particular used by nsMathMLmathBlockFrame and
nsMathMLmathInlineFrame when calculating intrinsic size of the <math>
tag and aligns merror's UA style on MathML Core at
https://w3c.github.io/mathml-core/#user-agent-stylesheet.

Differential Revision: https://phabricator.services.mozilla.com/D216686
2024-07-31 14:14:29 +00:00
Frédéric Wang c127c754f6 Bug 1908069 - Add border/padding/margin support to <mfrac>. r=emilio
This is the first patch of the series that actually take
border/padding/margin into account for MathML layout. One subtility is
that Gecko distinguishes the ink nsBoundingMetrics box and the
ReflowOutput box for accurate positioning of math components contrary
to the current version of MathML Core [1].

For MathML Core and the WPT tests, it is assumed that border/padding are
used to inflate the content box [2] [3] and it does not really matter
whether we inflate the ink bounding box, or simply adjust its offsets
inside the normal bounding box. We choose the former and introduce a
helper function InflateReflowAndBoundingMetrics for that purpose, which
will be reused in follow-up patches. After inflating these boxes, the
offsets of children and painted items must also be adjusted by the
left/top border+padding.

Regarding margins, MathML Core says that we should use "margin boxes"
and WPT tests simply check that the layout of MathML constructions
containing mspace elements with margins is not changed if we move
these margins inside the mspace's width/height/depth attributes. To
pass these tests, we similarly need to inflate both the ink and
non-ink bounding boxes by the margin.

However, the margins can be negative possibly leading to negative
dimensions of "margin boxes". To make the code more generic, we
simplify adjust all usages of the children's nsBoundingMetrics and
ReflowOutput to include these margins. When calling FinishReflowChild
at the end, the offsets of children must be adjusted by these margins.

This patch also reimplements the extra one-pixel padding around a
fraction using rules from MathML Core's UA stylesheet at
https://w3c.github.io/mathml-core/#user-agent-stylesheet

[1] https://github.com/w3c/mathml-core/issues/78
[2] https://github.com/web-platform-tests/wpt/blob/27c8d234ee83a4b15f36ad10cc26c951b1782fb6/mathml/relations/css-styling/padding-border-margin/border-002.html#L25
[4] https://github.com/web-platform-tests/wpt/blob/27c8d234ee83a4b15f36ad10cc26c951b1782fb6/mathml/relations/css-styling/padding-border-margin/padding-002.html#L26
[3] https://github.com/web-platform-tests/wpt/blob/27c8d234ee83a4b15f36ad10cc26c951b1782fb6/mathml/relations/css-styling/padding-border-margin/margin-003.html#L50

Differential Revision: https://phabricator.services.mozilla.com/D216670
2024-07-31 14:14:29 +00:00
Emilio Cobos Álvarez 3a05d81c7f Bug 1859538 - Allow chrome stylesheets to be parsed in parallel. r=layout-reviewers,desktop-theme-reviewers,dao,Gijs,tlouw
This changes -moz-bool-pref from @supports to @media, bringing various
improvements:

 * @media (-moz-bool-pref) properly reacts to dynamic changes.
 * We no longer need to parse chrome:// stylesheets in the main thread
   (-moz-bool-pref was the only thing that forced us to do that).

This makes privileged and non-privileged stylesheets more similar.

Differential Revision: https://phabricator.services.mozilla.com/D191196
2023-10-19 10:50:27 +00:00
Frederic Wang a61a50c1e2 Bug 1788223 - Remove preferences for maction/semantics. r=emilio
This commit removes the preference
mathml.legacy_maction_and_semantics_implementations.disabled
that controls whether we layout maction/semantics as an mrow +
extra style. It has been set to true since Firefox 106.

Differential Revision: https://phabricator.services.mozilla.com/D184720
2023-07-31 07:46:30 +00:00
Frederic Wang 52b8a058f1 Bug 1845641 - Remove runtime preference for lquote/rquote. r=emilio CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D184661
2023-07-27 13:31:18 +00:00
Noemi Erli fe1b68b547 Backed out changeset 414d16a3f4d9 (bug 1845641) for causing build bustages in Decimal.h CLOSED TREE 2023-07-27 18:02:15 +03:00
Frederic Wang 9ec1deadec Bug 1845641 - Remove runtime preference for lquote/rquote. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D184661
2023-07-27 13:31:18 +00:00
Noemi Erli 8ee213df66 Backed out changeset 665285aadf62 (bug 1845641) for causing failures in quotes-1.xhtml 2023-07-27 15:20:57 +03:00
Frederic Wang 637f931fe8 Bug 1845641 - Remove runtime preference for lquote/rquote. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D184661
2023-07-27 09:57:32 +00:00
Frederic Wang 163acd7f54 Bug 1667090 - Implement CSS font-size: math and math-depth properties. r=emilio,devtools-reviewers
The font-size math keyword is implemented. It behaves as a font-size: 1em
with the extra fixup due to math-level change (and other legacy MathML
attributes). After that change, the CSS for math-level / font-size: math
is behaving as per the specification, so the math-depth is turned in
nightly.

The adjusting function for font-size: math is modified so that it's
executed only if both font-size: math (otherwise the spec says no scale
should apply) and math-depth (otherwise the scale is 1 and function exists
early anyway) are set on the element.

Differential Revision: https://phabricator.services.mozilla.com/D91744
2023-07-26 06:15:12 +00:00
Frederic Wang 007afe1197 Bug 1788637 - Remove MathML preferences scriptminsize_attribute and scriptsizemultiplier_attribute. r=emilio
This commit removes the runtime flags and related code for the
scriptminsize and scriptsizemultiplier, which have been disabled by
default for a while. The hardcoded default values
kMathMLDefaultScriptSizeMultiplier and kMathMLDefaultScriptMinSizePt
are still used in some places and are preserved for now.

Differential Revision: https://phabricator.services.mozilla.com/D157426
2023-07-24 10:02:24 +00:00
Frederic Wang fdbed17109 Bug 1821980: Align mathvariant implementation on MathML Core. r=emilio,jfkthame
In MathML Core, the recommendation is to directly use the proper
character from the Mathematical Alphanumeric Symbols instead of the
mathvariant attribute. The exception is for automatic italicization on
single-char `<mi>` element. This is implemented via a new text-transform
value "math-auto" [1] which is the default on the `<mi>` element. The
mathvariant attribute is now restricted to that element and to value
"normal" in order to force upright text instead [2]. This CL implements
this restriction together with that new text-transform value under the
mathml.legacy_mathvariant_attribute.disabled flag.

Some legacy MathML cases where math-auto alone does not work are
still handled via MathMLTextRunFactory.

[1] https://w3c.github.io/mathml-core/#new-text-transform-values
[2] https://w3c.github.io/mathml-core/#the-mathvariant-attribute

Differential Revision: https://phabricator.services.mozilla.com/D172395
2023-07-14 19:44:04 +00:00
Cristian Tuns 26d6e46ac1 Backed out changeset db50582c2b9f (bug 1821980) for causing mochitest failures in browser_mathml.js CLOSED TREE 2023-07-14 13:49:13 -04:00
Frederic Wang 3cd57ef95a Bug 1821980: Align mathvariant implementation on MathML Core. r=emilio,jfkthame
In MathML Core, the recommendation is to directly use the proper
character from the Mathematical Alphanumeric Symbols instead of the
mathvariant attribute. The exception is for automatic italicization on
single-char `<mi>` element. This is implemented via a new text-transform
value "math-auto" [1] which is the default on the `<mi>` element. The
mathvariant attribute is now restricted to that element and to value
"normal" in order to force upright text instead [2]. This CL implements
this restriction together with that new text-transform value under the
mathml.legacy_mathvariant_attribute.disabled flag.

Some legacy MathML cases where math-auto alone does not work are
still handled via MathMLTextRunFactory.

[1] https://w3c.github.io/mathml-core/#new-text-transform-values
[2] https://w3c.github.io/mathml-core/#the-mathvariant-attribute

Differential Revision: https://phabricator.services.mozilla.com/D172395
2023-07-14 15:53:34 +00:00
Iulian Moraru d048395e91 Backed out changeset 6cceaca5e653 (bug 1821980) for causing multiple failures. CLOSED TREE 2023-07-14 15:41:31 +03:00
Frederic Wang 48e18e6261 Bug 1821980: Align mathvariant implementation on MathML Core. r=emilio,jfkthame
In MathML Core, the recommendation is to directly use the proper
character from the Mathematical Alphanumeric Symbols instead of the
mathvariant attribute. The exception is for automatic italicization on
single-char `<mi>` element. This is implemented via a new text-transform
value "math-auto" [1] which is the default on the `<mi>` element. The
mathvariant attribute is now restricted to that element and to value
"normal" in order to force upright text instead [2]. This CL implements
this restriction together with that new text-transform value under the
mathml.legacy_mathvariant_attribute.disabled flag.

Some legacy MathML cases where math-auto alone does not work are
still handled via MathMLTextRunFactory.

[1] https://w3c.github.io/mathml-core/#new-text-transform-values
[2] https://w3c.github.io/mathml-core/#the-mathvariant-attribute

Differential Revision: https://phabricator.services.mozilla.com/D172395
2023-07-14 10:52:59 +00:00
Frederic Wang 7ba8f0149b Bug 1586574 - apply horizontal writing mode to mathml elements. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D48279
2022-12-16 17:07:56 +00:00
Norisz Fay af9476d2e2 Backed out changeset 112934bd11d2 (bug 1586574) for causing reftest failures on 1748277.html 2022-12-16 13:35:27 +02:00
Frederic Wang 567e519862 Bug 1586574 - apply horizontal writing mode to mathml elements. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D48279
2022-12-16 08:44:34 +00:00
Stanca Serban 3877ee327e Backed out changeset 06a17fd75d84 (bug 1586574) for causing wpt failures in ignored-properties-001.html. CLOSED TREE 2022-12-15 13:09:51 +02:00
Frederic Wang 5995fae6cc Bug 1586574 - apply horizontal writing mode to mathml elements. r=emilio CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D48279
2022-12-15 09:11:48 +00:00
Stanca Serban 306a7a5c49 Backed out changeset 32522f6f6750 (bug 1586574) for causing wpt unexpected passes on reset-and-logicial-property.html. CLOSED TREE 2022-12-15 11:45:38 +02:00
Frederic Wang fd7e252b62 Bug 1586574 - apply horizontal writing mode to mathml elements. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D48279
2022-12-15 08:23:15 +00:00
Frederic Wang a2415a1a68 Bug 1800112 - default-properties-on-the-math-root.html fails. r=emilio
This commit adds missing UA rules on the <math> root as specified
in https://w3c.github.io/mathml-core/#the-top-level-math-element

Differential Revision: https://phabricator.services.mozilla.com/D161815
2022-11-11 09:39:15 +00:00
Frederic Wang 0937ed5fc0 Bug 1793387 - disable lquote/rquote attributes on the <ms> element. r=emilio
This commit introduces a MathML preference for the legacy implementation
of the lquote/rquote attributes, and disable it by default. This feature
is not implemented in Chromium or WebKit, not part of MathML Core and
Firefox's implementation has issues (e.g. bugs 787215 and 1108608).

Differential Revision: https://phabricator.services.mozilla.com/D158479
2022-10-08 11:37:32 +00:00
criss 8bedc22cb1 Backed out 2 changesets (bug 1667090, bug 1788605) for causing Xpcshell failures on test_css-properties-db.js. CLOSED TREE
Backed out changeset cee98ae67ea4 (bug 1788605)
Backed out changeset 404e0b4bcd0f (bug 1667090)
2022-09-15 12:13:28 +03:00
Frederic Wang b48c61455f Bug 1667090 - Implement CSS font-size: math and math-depth properties. r=emilio
The font-size math keyword is implemented. It behaves as a font-size: 1em
with the extra fixup due to math-level change (and other legacy MathML
attributes). After that change, the CSS for math-level / font-size: math
is behaving as per the specification, so the math-depth is turned in
nightly.

The adjusting function for font-size: math is modified so that it's
executed only if both font-size: math (otherwise the spec says no scale
should apply) and math-depth (otherwise the scale is 1 and function exists
early anyway) are set on the element. Also checking if the current node
has a scriptsizemultiplier rule applied to use MathML3's scaling is
incorrect. Instead this is changed to check if a non-default
scriptsizemultiplier is set.

Differential Revision: https://phabricator.services.mozilla.com/D91744
2022-09-15 08:14:49 +00:00
Frederic Wang 0d6dd90e26 Bug 1588733 - Make maction/semantics elements behave as an mrow with the first child. r=emilio
See https://groups.google.com/forum/#!topic/mozilla.dev.platform/BWUvjERSXUM

Differential Revision: https://phabricator.services.mozilla.com/D49285
2022-09-06 04:32:15 +00:00