193 Commits
Author SHA1 Message Date
Emilio Cobos Álvarez c9cf6c0d25 Bug 2028314 - Remove GetPresentationDataFrom. r=fredw
We walk the tree but do nothing with the result. This was introduced in
https://searchfox.org/firefox-main/commit/37334d1e2b55cbaa3c5aee1ca8cdf40c476801da
for displaystyle, scriptlevel and an internal debugging flag. The latter
was removed in https://phabricator.services.mozilla.com/D222260 and the
two first are now handled by CSS properties math-style and math-depth.

Differential Revision: https://phabricator.services.mozilla.com/D291358
2026-04-01 18:23:42 +00:00
Frédéric Wang Nélar 76bfbc593d Bug 2023903 - Remove preference mathml.math_shift.enabled. r=emilio,firefox-style-system-reviewers,layout-reviewers
This has been enabled by default starting with Firefox 146.

Differential Revision: https://phabricator.services.mozilla.com/D288193
2026-03-26 08:54:04 +00:00
agoloman 6fb4312b1e Revert "Bug 2023903 - Remove preference mathml.rtl_operator_mirroring.enabled. r=emilio,layout-reviewers" for causing gtest failures @MathMLPrefs_NonAdjacent.
This reverts commit ada83c01ee.

Revert "Bug 2023903 - Remove preference mathml.math_shift.enabled. r=emilio,firefox-style-system-reviewers,layout-reviewers"

This reverts commit 59effc5f70.
2026-03-24 12:49:13 +00:00
Frédéric Wang Nélar 59effc5f70 Bug 2023903 - Remove preference mathml.math_shift.enabled. r=emilio,firefox-style-system-reviewers,layout-reviewers
This has been enabled by default starting with Firefox 146.

Differential Revision: https://phabricator.services.mozilla.com/D288193
2026-03-24 11:34:29 +00:00
Atila Butkovits a420a28d11 Revert "Bug 2023903 - Remove preference mathml.rtl_operator_mirroring.enabled. r=emilio,layout-reviewers" for causing failures at UserCharacteristics_MathMLPrefs_NonAdjacent.
This reverts commit 8bcd92b612.

Revert "Bug 2023903 - Remove preference mathml.math_shift.enabled. r=emilio,firefox-style-system-reviewers,layout-reviewers"

This reverts commit febddccfd1.
2026-03-24 00:52:51 +00:00
Frédéric Wang Nélar febddccfd1 Bug 2023903 - Remove preference mathml.math_shift.enabled. r=emilio,firefox-style-system-reviewers,layout-reviewers
This has been enabled by default starting with Firefox 146.

Differential Revision: https://phabricator.services.mozilla.com/D288193
2026-03-23 10:34:26 +00:00
Sylvestre Ledru 55481ac4b5 Bug 2023419 - Remove Emacs/Vim modelines from layout/ r=emilio,firefox-style-system-reviewers,layout-reviewers
replaced by .editorconfig

Differential Revision: https://phabricator.services.mozilla.com/D287852
2026-03-17 12:05:43 +00:00
Frédéric Wang 9714004803 Bug 2014885 - Convert dom::MathMLElement's length parsing flags to an EnumSet. r=layout-reviewers,dshin
Also make the aFlags argument optional with an empty EnumSet as the default.

Differential Revision: https://phabricator.services.mozilla.com/D282042
2026-02-06 09:12:34 +00:00
Emilio Cobos Álvarez 30b7a3d89a Bug 2014922 - Untangle pseudo-element and anon box definitions. r=firefox-style-system-reviewers,xpcom-reviewers,layout-reviewers,dshin,nika
I looked at this because in bug 2014331 I need to mark more pseudos as
element-backed, and it's kinda silly the state our setup is in right
now.

This is all a somewhat historical mess, because in the old style system
pseudo-elements were just atoms, and we had that different types of atom
setup. The source of truth for these right now lives in a header macro
file, which isn't very flexible.

But now we have PseudoStyleType which represents both pseudos and anon
boxes, and is similar to the rust side PseudoElement enum.

Plus, the ::-moz-tree pseudo-elements are defined as anon boxes which
doesn't make any sense, so move them to pseudo-elements while at it.

Unify this in a similar way we treat CSS properties: Source of truth is
in pseudo_elements.toml / anon_boxes.toml, and we generate Rust and C++
as needed. This allows removing the nsStaticAtom subclass thing from
XPCOM, too.

This avoids some nasty duplication around which pseudos are pref-gated
and what not as well.

Differential Revision: https://phabricator.services.mozilla.com/D282076
2026-02-06 07:39:54 +00:00
Norisz Fay 27f4694604 Revert "Bug 2014922 - Untangle pseudo-element and anon box definitions. r=firefox-style-system-reviewers,xpcom-reviewers,layout-reviewers,dshin,nika" for causing bustage @ ElementAnimationData.h
This reverts commit c70290c619.
2026-02-06 05:34:42 +00:00
Emilio Cobos Álvarez c70290c619 Bug 2014922 - Untangle pseudo-element and anon box definitions. r=firefox-style-system-reviewers,xpcom-reviewers,layout-reviewers,dshin,nika
I looked at this because in bug 2014331 I need to mark more pseudos as
element-backed, and it's kinda silly the state our setup is in right
now.

This is all a somewhat historical mess, because in the old style system
pseudo-elements were just atoms, and we had that different types of atom
setup. The source of truth for these right now lives in a header macro
file, which isn't very flexible.

But now we have PseudoStyleType which represents both pseudos and anon
boxes, and is similar to the rust side PseudoElement enum.

Plus, the ::-moz-tree pseudo-elements are defined as anon boxes which
doesn't make any sense, so move them to pseudo-elements while at it.

Unify this in a similar way we treat CSS properties: Source of truth is
in pseudo_elements.toml / anon_boxes.toml, and we generate Rust and C++
as needed. This allows removing the nsStaticAtom subclass thing from
XPCOM, too.

This avoids some nasty duplication around which pseudos are pref-gated
and what not as well.

Differential Revision: https://phabricator.services.mozilla.com/D282076
2026-02-06 03:42:45 +00:00
Frédéric Wang 4dc270cdf2 Bug 2013273 - Make nsMencloseNotation an enum class. r=layout-reviewers,dshin
Differential Revision: https://phabricator.services.mozilla.com/D280936
2026-02-03 16:00:44 +00:00
Frédéric Wang f0727f2777 Bug 2013273 - Make nsStretchDirection an enum class. r=emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D280935
2026-02-03 16:00:41 +00:00
agoloman cdb00cbee7 Revert "Bug 2013273 - Make GetPreferredStretchSize calculation mode an enum class. r=layout-reviewers,dshin" for causing build bustages @nsMathMLOperators.h.
This reverts commit 9c8eddd444.

Revert "Bug 2013273 - Modernize implementation of nsOperatorFlags. r=layout-reviewers,dshin"

This reverts commit 6cbde817db.

Revert "Bug 2013273 - Ensure underlying types for MathMLFrameType and DrawingMethod are uint8_t. r=layout-reviewers,dshin"

This reverts commit bb3d80f482.

Revert "Bug 2013273 - Convert MathML stretch flags to mozilla::EnumSet. r=layout-reviewers,dshin"

This reverts commit 0abd326292.

Revert "Bug 2013273 - Make mtable eAlign an enum class. r=layout-reviewers,dshin"

This reverts commit da72abe4b4.

Revert "Bug 2013273 - Make nsMencloseNotation an enum class. r=layout-reviewers,dshin"

This reverts commit 1051d05264.

Revert "Bug 2013273 - Make nsStretchDirection an enum class. r=emilio,layout-reviewers"

This reverts commit a98c372331.
2026-02-03 09:57:20 +00:00
Frédéric Wang 1051d05264 Bug 2013273 - Make nsMencloseNotation an enum class. r=layout-reviewers,dshin
Differential Revision: https://phabricator.services.mozilla.com/D280936
2026-02-03 09:06:13 +00:00
Frédéric Wang a98c372331 Bug 2013273 - Make nsStretchDirection an enum class. r=emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D280935
2026-02-03 09:06:10 +00:00
longsonr 5bab573ff3 Bug 2013031 - Convert ctxDirection to an enum class r=emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D280806
2026-01-30 16:41:32 +00:00
Atila Butkovits 37d7e85f6b Revert "Bug 2013031 - Convert ctxDirection to an enum class r=emilio,layout-reviewers" for causing bustages at SVGFilterInstance.cpp.
This reverts commit c5ab22e884.
2026-01-30 15:01:19 +00:00
longsonr c5ab22e884 Bug 2013031 - Convert ctxDirection to an enum class r=emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D280806
2026-01-30 11:46:27 +00:00
Frédéric Wang ad2f25ae65 Bug 2008902 - Make eMathMLFrameType an enum class. r=emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D278101
2026-01-08 15:26:36 +00:00
Frédéric Wang 291e676b1d Bug 2008902 - Convert MathML embellish flags to mozilla::EnumSet. r=emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D278100
2026-01-08 15:26:33 +00:00
Frédéric Wang eb94b292ae Bug 2008902 - Convert MathML presentation flags to mozilla::EnumSet. r=emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D278091
2026-01-08 15:26:30 +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
Emilio Cobos Álvarez a8a2311474 Bug 1976457 - Sort includes in layout/. r=janv,dshin
Interesting bit is layout/.clang-format, the rest is all automated.

Differential Revision: https://phabricator.services.mozilla.com/D256616
2025-07-09 13:24:00 +00:00
Harry Chen e09ba05f08 Bug 1924672 - Add WPT tests and support for more CSS units in MathML. r=fredw,emilio
This reuses the SVG machinery for calculating unit lengths and leaves vi and vb unimplemented. These units need special handling since they depend on the writing mode, but MathML does not support non-horizontal writing modes yet.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1935717.

Differential Revision: https://phabricator.services.mozilla.com/D230738
2025-05-01 15:22:31 +00:00
Alexandru Marc 875344009d Backed out changeset 4a74b1fc4b79 (bug 1924672) for causing build bustages @ nsMathMLmfracFrame.cpp CLOSED TREE 2025-04-30 08:30:30 +03:00
Harry Chen e6ab2a57aa Bug 1924672 - Add WPT tests and support for more CSS units in MathML. r=fredw,emilio
This reuses the SVG machinery for calculating unit lengths and leaves vi and vb unimplemented. These units need special handling since they depend on the writing mode, but MathML does not support non-horizontal writing modes yet.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1935717.

Differential Revision: https://phabricator.services.mozilla.com/D230738
2025-04-30 05:11:08 +00:00
Timothy Nikkel 292af322c3 Bug 1933440. Make all display item destructors default and mark all display items final that can be. r=layout-reviewers,jfkthame
This just makes things nice and consistent and lets the compiler optimize if it can.

Differential Revision: https://phabricator.services.mozilla.com/D230249
2024-12-06 13:22:11 +00:00
Jonathan Watt 3eab38263b Bug 1931736. Add missing braces around if/loop statements in layout/mathml/. r=layout-reviewers,emilio
Depends on D229249

Differential Revision: https://phabricator.services.mozilla.com/D229250
2024-11-17 05:03:59 +00:00
Emilio Cobos Álvarez 130913bb7c Bug 1925478 - Remove redundant virtual keywords in layout/mathml. r=jwatt
Just drive-by cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D226119
2024-10-18 12:08:48 +00:00
Frédéric Wang a5c1ebec25 Bug 1918989 - Remove disabled SHOW_BOUNDING_BOX MathML code. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D222260
2024-09-16 13:27:10 +00:00
Frédéric Wang dc128ab0f1 Bug 1917763 - Remove eCSSUnit_Number handling from nsMathMLFrame::ParseNumericValue. r=emilio
This case was used to handle non-zero unitless values, but support was
removed in D89920.

Differential Revision: https://phabricator.services.mozilla.com/D221789
2024-09-13 08:03:56 +00:00
Butkovits Atila aeafb698d8 Backed out 8 changesets (bug 1917763) for causing bustages at nsMathMLmspaceFrame.h. CLOSED TREE
Backed out changeset 7c7c002d7db2 (bug 1917763)
Backed out changeset 10eb2ccfa645 (bug 1917763)
Backed out changeset 9ba90d161930 (bug 1917763)
Backed out changeset ab7ce0058852 (bug 1917763)
Backed out changeset 19766c906c98 (bug 1917763)
Backed out changeset d1b87bb6e8d4 (bug 1917763)
Backed out changeset 043cf853e2cf (bug 1917763)
Backed out changeset a869862a66ec (bug 1917763)
2024-09-12 18:35:55 +03:00
Frédéric Wang bc673db733 Bug 1917763 - Remove eCSSUnit_Number handling from nsMathMLFrame::ParseNumericValue. r=emilio
This case was used to handle non-zero unitless values, but support was
removed in D89920.

Differential Revision: https://phabricator.services.mozilla.com/D221789
2024-09-12 14:26:27 +00:00
Emilio Cobos Álvarez c27730d3df Bug 1364813 - Remove IsFrameOfType, use non-virtual checks. r=jwatt
Extend the per-frame-class bit we have to devirtualize IsLeaf to also
devirtualize IsFrameOfType. That is, move this data to FrameClasses.py.

This was done by going through all the frame classes, trying to preserve
behavior.

The only quirky thing is that I had to add two more trivial frame
classes, `nsAudioFrame` for audio elements, and
`nsFloatingFirstLetterFrame`. That's because these frame classes were
returning different answers at runtime, but they do this only on
conditions that trigger frame reconstruction (floating, and being an
audio element, respectively).

Differential Revision: https://phabricator.services.mozilla.com/D194703
2023-11-26 22:17:28 +00:00
Emilio Cobos Álvarez 2bc0294d20 Bug 1791281 - Simplify our setup for font metric queries from style. r=jfkthame
While looking at moving the flag around I realized that the only reason
we have FontMetricsProvider and co is because we didn't have access to
the per-document font-prefs cache. That's trivial to fix tho, so do
that and simplify the setup for font queries even more.

Differential Revision: https://phabricator.services.mozilla.com/D157589
2022-09-20 19:30:45 +00:00
Andrew Osmond 66c6bad8f6 Bug 1779519 - gfxFontCache expiration tracker operations should be more atomic. r=jfkthame
gfxFontCache acquires and releases its mutex during various operations.
In order to keep the state internally consistent, we should only release
the lock after the full operation is complete. This involves moving the
deletion of gfxFont to outside the lock via a temporary discard array.

The expiration state should not be protected by the gfxFont's mutex
since we don't hold it during most operations. Instead we should hold
gfxFontCache's mutex because then we can guarantee the operation is
atomic, particularly when a worker wants a font, and the main thread is
aging the generations.

When a font is returned from gfxFontCache, we now return it already
removed from the tracker, and with its refcount updated. This avoids any
potential races between the expiration timer and a worker accessing the
font, as well as simplying the callers so they don't need to be aware of
addref-ing manually in case the result is to be discarded (so that it
gets readded to the tracker).

Differential Revision: https://phabricator.services.mozilla.com/D151821
2022-07-14 19:53:09 +00:00
criss 380e3e436f Backed out changeset e4cd98b5984d (bug 1779519) for causing build bustages. CLOSED TREE 2022-07-14 22:06:53 +03:00
Andrew Osmond 8cb302b7c5 Bug 1779519 - gfxFontCache expiration tracker operations should be more atomic. r=jfkthame
gfxFontCache acquires and releases its mutex during various operations.
In order to keep the state internally consistent, we should only release
the lock after the full operation is complete. This involves moving the
deletion of gfxFont to outside the lock via a temporary discard array.

The expiration state should not be protected by the gfxFont's mutex
since we don't hold it during most operations. Instead we should hold
gfxFontCache's mutex because then we can guarantee the operation is
atomic, particularly when a worker wants a font, and the main thread is
aging the generations.

When a font is returned from gfxFontCache, we now return it already
removed from the tracker, and with its refcount updated. This avoids any
potential races between the expiration timer and a worker accessing the
font, as well as simplying the callers so they don't need to be aware of
addref-ing manually in case the result is to be discarded (so that it
gets readded to the tracker).

Differential Revision: https://phabricator.services.mozilla.com/D151821
2022-07-14 18:35:49 +00:00
Jonathan Kew 14de673bf9 Bug 1702924 - Add support for the 'cap' font-relative unit. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D133101
2021-12-08 12:20:40 +00:00
Butkovits Atila 4829bb7483 Backed out changeset 145c64b7ac17 (bug 1531223) for causing failures at gfxFontEntry.cpp. CLOSED TREE 2021-12-06 14:57:31 +02:00
Jonathan Kew 9e8f198faf Bug 1531223 - Add support for the 'ic' and 'cap' font-relative units. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D132818
2021-12-06 12:22:09 +00:00
Miko Mynttinen 8df6649834 Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D120041
2021-07-19 11:28:20 +00:00
Alexandru Michis 9b9c5fe24e Backed out 2 changesets (bug 1720804) for causing bustages.
CLOSED TREE

Backed out changeset 5278e88c6d34 (bug 1720804)
Backed out changeset 1acb4ed79b6b (bug 1720804)
2021-07-16 18:10:11 +03:00
Miko Mynttinen 397ffc88e1 Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D120041
2021-07-16 14:36:34 +00:00
Simon Giesecke 46908cfb51 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Razvan Maries 17b3f05bc0 Backed out changeset 20fadec3e9dc (bug 1187682) for perma failures on layout/reftests/mathml/stretchy-munderover-1c.html. CLOSED TREE 2020-10-02 17:11:33 +03:00
Frederic Wang 74d8dcd7e2 Bug 1187682 - Use ScriptPercentScaleDown and ScriptScriptPercentScaleDown constants. r=emilio
The math-depth implementation is refined to take into account the
ScriptPercentScaleDown and ScriptScriptPercentScaleDown constants (if the
parent's first valid font has a MATH table) in order to calculate the
scale factor between math-deth 0 and 1, and between 0 and 2 respectively.

Behavior is unchanged if the legacy scriptsizemultiplier attribute is
specified or if no MATH table is available.

The preference layout.css.math-depth.enabled remains disabled in nightly
until the remaining bit (support for font-size: math) is implemented in
bug 1667090.

Differential Revision: https://phabricator.services.mozilla.com/D91604
2020-10-02 11:33:34 +00:00