Commit Graph
106 Commits
Author SHA1 Message Date
Daniel Holbert 3a33cc1c12 Bug 2044510: Pass already_AddRefed types by-value instead of by rvalue reference, in dom/{ipc,mathml,media,notification,streams}. r=dom-core-reviewers,media-playback-reviewers,webrtc-reviewers,smaug,pehrsons,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D304363
2026-06-05 21:06:42 +00:00
Frédéric Wang Nélar 0e852ba43a Bug 2007083 - nonce side-channels hiding is not implemented for MathML r=webidl,smaug
See https://github.com/whatwg/html/pull/12416 and
https://html.spec.whatwg.org/multipage/urls-and-fetching.html#nonce-attributes

Differential Revision: https://phabricator.services.mozilla.com/D299705
2026-05-13 06:04:15 +00:00
Lando 03943c5a3b Bug 2036778: apply code formatting via Lando
# ignore-this-changeset
2026-05-05 14:02:39 +00:00
Frédéric Wang Nélar 86fdf703e5 Bug 2036778 - Set default tabIndex on MathML's a to 0. r=emilio
See https://github.com/whatwg/html/pull/12416

Differential Revision: https://phabricator.services.mozilla.com/D298477
2026-05-05 14:02:28 +00:00
Frédéric Wang Nélar 1e371482e5 Bug 2026848 - Add preference to disable MathML href on all but <a> elements, with deprecation and use counters. r=emilio,flod
Differential Revision: https://phabricator.services.mozilla.com/D290362
2026-04-01 11:20:49 +00:00
Emilio Cobos Álvarez 5016086e1a Bug 2025089 - Remove some includes from nsINode.h and Element.h. r=dom-core,dom-storage-reviewers,firefox-svg-reviewers,janv,smaug
Differential Revision: https://phabricator.services.mozilla.com/D289049
2026-03-22 23:45:55 +00:00
Sylvestre Ledru 9eb1a31a98 Bug 2023419 - Remove Emacs/Vim modelines from dom/ r=emilio,media-playback-reviewers,webidl,padenot
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287843
2026-03-16 21:02:32 +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
Denis Palmeiro 66b973dc4f Bug 1995614: Use atoms for attributes if available instead of expecting a StringBuffer. r=hsivonen,media-playback-reviewers,firefox-svg-reviewers,karlt,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D271244
2025-11-13 04:18:51 +00:00
serge-sans-paille 1667ec582b Bug 1995723 - Remove unused inclusion of mozilla/ArrayUtils.h r=necko-reviewers,application-update-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,firefox-svg-reviewers,layout-reviewers,gstoll,canaltinova,bytesized,alwu,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D269573
2025-10-23 07:30:37 +00:00
Emilio Cobos Álvarez 791917d8af Bug 1976665 - Sort headers in dom/. r=dom-core,media-playback-reviewers,webrtc-reviewers,dom-storage-reviewers,padenot,janv,smaug,jesup,jib
Most changes are automated. Relevant bit is dom/.clang-format. I had to
manually disable clang-format in a few places where importing external
files and so on that aren't self-contained, and fix a couple includes /
forward declarations.

Differential Revision: https://phabricator.services.mozilla.com/D256800
2025-08-05 11:47:34 +00:00
Sylvestre Ledru 8ae54ea4f9 Bug 1519636 - Reformat recent changes to the Google coding style r=geckoview-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,nalexander,gstoll,tcampbell,janv,julienw
Updated with clang-format version 19.1.7 (taskcluster-DYvBxDZJRVqTi8E7pTSJAQ)

Differential Revision: https://phabricator.services.mozilla.com/D249880
2025-05-17 19:11:13 +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
Emilio Cobos Álvarez b4f7162b1e Bug 1960923 - Make MathML metric a use counter. r=fredw
That gives us consistent numbers to compare against.

Differential Revision: https://phabricator.services.mozilla.com/D245744
2025-04-16 17:25:25 +00:00
Tom Schuster b8d11d463f Bug 1951893 - Remove unneeded StaticAtom suffixes. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D240598
2025-03-11 11:36:09 +00:00
serge-sans-paille 262f78c07f Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-28 08:21:19 +00:00
Alexandru Marc a5eb905bf4 Backed out changeset d92f391b3b0c (bug 1922838) for backing out bug 1915351 2024-10-25 16:42:33 +03:00
serge-sans-paille 07101ac24d Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 09:06:01 +00:00
Alexandru Marc 004e704b22 Backed out changeset 448597bce69d (bug 1922838) for causing build bustages. CLOSED TREE 2024-10-24 11:37:49 +03:00
serge-sans-paille 2c916d4973 Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 07:38:30 +00:00
serge-sans-paille 47517e859d Bug 1922563 - Reduce memory foot print of mozilla::dom::MathMLElement::MapGlobalMathMLAttributesInto()::values r=emilio
Use some kind of prefix table to avoid storing redundant string. Also
Avoid storing an array of enum when there's a direct mapping between
enum values and loop index.

This result in a reduction of 352 byte in the resulting binary, so this
may not be worth the effort, but it was great fun to write that patch.

Differential Revision: https://phabricator.services.mozilla.com/D224494
2024-10-14 19:46:41 +00:00
Butkovits Atila e923805964 Backed out changeset c518c29f1c31 (bug 1922563) for causing bustages at MathMLElement.cpp. CLOSED TREE 2024-10-14 20:36:15 +03:00
serge-sans-paille e0fb6ba5ed Bug 1922563 - Reduce memory foot print of mozilla::dom::MathMLElement::MapGlobalMathMLAttributesInto()::values r=emilio
Use some kind of prefix table to avoid storing redundant string. Also
Avoid storing an array of enum when there's a direct mapping between
enum values and loop index.

This result in a reduction of 352 byte in the resulting binary, so this
may not be worth the effort, but it was great fun to write that patch.

Differential Revision: https://phabricator.services.mozilla.com/D224494
2024-10-14 15:24:04 +00:00
pstanciu e05b5067d5 Backed out changeset 875fb891b6a9 (bug 1922563) for causing build bustages on MathMLElement.cpp CLOSED TREE 2024-10-14 15:11:22 +03:00
serge-sans-paille e786698b6d Bug 1922563 - Reduce memory foot print of mozilla::dom::MathMLElement::MapGlobalMathMLAttributesInto()::values r=emilio
Use some kind of prefix table to avoid storing redundant string. Also
Avoid storing an array of enum when there's a direct mapping between
enum values and loop index.

This result in a reduction of 352 byte in the resulting binary, so this
may not be worth the effort, but it was great fun to write that patch.

Differential Revision: https://phabricator.services.mozilla.com/D224494
2024-10-14 09:04:25 +00:00
Emilio Cobos Álvarez 1b1dfeb153 Bug 1922571 - Remove some unneeded use of compiler_specific.h outside of ipc. r=nika
We don't build with MSVC, so no need for any of this.

Differential Revision: https://phabricator.services.mozilla.com/D224503
2024-10-04 08:00:42 +00:00
Frédéric Wang 921f3c6ead Bug 1918308 - Remove dead code for legacy MathML color/background attributes. r=emilio
These attributes were deprecated in D43111, disabled in D89928 and
removed in D154087.

Differential Revision: https://phabricator.services.mozilla.com/D221990
2024-09-13 06:31:26 +00:00
Emilio Cobos Álvarez f9b44817e4 Bug 1899126 - Simplify text-transform representation. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D211731
2024-05-27 17:24:10 +00:00
Emilio Cobos Álvarez bf22d33f87 Bug 1895208 - Refactor IsFocusable checks to take flags rather than bool arguments. r=smaug
This doesn't change behavior on its own, but it's likely we want to make
the tab focusability more complicated in bug 1895184, and this will make
changes to this area less painful.

Differential Revision: https://phabricator.services.mozilla.com/D209525
2024-05-06 21:54:37 +00:00
Emilio Cobos Álvarez 45b669a6a7 Bug 1036966 - Make accessibility.tabfocus default to 7 on macOS too. r=morgan,settings-reviewers,mac-reviewers,mstange
Stop supporting following the system preference, but keep macOS users
able to switch to just text controls (accessibility.tabfocus=1) in the
settings.

Change the meaning of the "Use the tab key to move focus between form
controls and links" checkbox in the Firefox settings, which was
introduced in bug 1628476 to override the system setting.

The intention, I think was that this checkbox being off resulted in
"follow the system" behavior, but that didn't quite happen due to a bug
in the preferences code (this[1] won't unset the pref, because of
this[2], which means we'll just return 0).

This patch changes it so that the checkbox instead always ignores the
system setting. There will no longer be a Firefox setting (neither in
the UI nor on about:config) that means "follow system setting".

This allows us to somewhat simplify the approach compared to the
previous patch in D196110, and keep the accessibility.tabfocus working
as the source of truth without a migration.

In the future, we can think of migrating accessibility.tabfocus to a
boolean pref, which would allow us to do the cleanups to the preferences
code that D196110 did.

[1]: https://searchfox.org/mozilla-central/rev/f1532761de0b60337e42c6c3f525288a523dabef/browser/components/preferences/main.js#2252
[2]: https://searchfox.org/mozilla-central/rev/f1532761de0b60337e42c6c3f525288a523dabef/toolkit/content/preferencesBindings.js#450,483

Differential Revision: https://phabricator.services.mozilla.com/D208602
2024-05-03 23:10:47 +00:00
Tamas Szentpeteri 453ac165cb Backed out changeset 644738c3ccfe (bug 1036966) for causing mochitest failures in test_tabindex.html. CLOSED TREE 2024-05-03 04:18:36 +03:00
Emilio Cobos Álvarez 87eeb156af Bug 1036966 - Make accessibility.tabfocus default to 7 on macOS too. r=morgan,settings-reviewers,mac-reviewers,mstange
Stop supporting following the system preference, but keep macOS users
able to switch to just text controls (accessibility.tabfocus=1) in the
settings.

Change the meaning of the "Use the tab key to move focus between form
controls and links" checkbox in the Firefox settings, which was
introduced in bug 1628476 to override the system setting.

The intention, I think was that this checkbox being off resulted in
"follow the system" behavior, but that didn't quite happen due to a bug
in the preferences code (this[1] won't unset the pref, because of
this[2], which means we'll just return 0).

This patch changes it so that the checkbox instead always ignores the
system setting. There will no longer be a Firefox setting (neither in
the UI nor on about:config) that means "follow system setting".

This allows us to somewhat simplify the approach compared to the
previous patch in D196110, and keep the accessibility.tabfocus working
as the source of truth without a migration.

In the future, we can think of migrating accessibility.tabfocus to a
boolean pref, which would allow us to do the cleanups to the preferences
code that D196110 did.

[1]: https://searchfox.org/mozilla-central/rev/f1532761de0b60337e42c6c3f525288a523dabef/browser/components/preferences/main.js#2252
[2]: https://searchfox.org/mozilla-central/rev/f1532761de0b60337e42c6c3f525288a523dabef/toolkit/content/preferencesBindings.js#450,483

Differential Revision: https://phabricator.services.mozilla.com/D208602
2024-05-02 22:19:53 +00:00
Emilio Cobos Álvarez 7506fc5879 Bug 1881011 - Refactor UnbindFromTree to take a context argument. r=smaug
Much like BindToTree.

This will be useful because I need to pass more information through
UnbindFromTree() to speed up dir=auto for bug 1874040.

Differential Revision: https://phabricator.services.mozilla.com/D202215
2024-02-20 15:05:40 +00:00
Emilio Cobos Álvarez 71e771518b Bug 1868552 - Refactor nsIContent::IsFocusable for clarity. r=masayuki
Make it be output-only, not having that confusing in-out tab-index
parameter that is special for XUL to become focusable with
-moz-user-focus: normal. Instead, do that explicitly in
nsIFrame::IsFocusable().

Also, call it IsFocusableWithoutStyle(), since that's what it is.

Differential Revision: https://phabricator.services.mozilla.com/D195644
2023-12-08 11:34:06 +00:00
Stanca Serban 8d6a9ece7a Backed out 3 changesets (bug 1851970) for causing mochitests failures in browser_aboutNetError_csp_iframe.js.
Backed out changeset a2536c6c6c23 (bug 1851970)
Backed out changeset 23ddc229d1a1 (bug 1851970)
Backed out changeset b99a620a535c (bug 1851970)
2023-11-28 18:43:55 +02:00
Vincent Hilla 4a2ca2ff09 Bug 1851970 - Part 2: Activation behavior method for links. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D183991
2023-11-28 14:09:02 +00:00
Emilio Cobos Álvarez 18854ff8b5 Bug 1850238 - Make Link states not intrinsic. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D186877
2023-08-30 09:18:32 +00:00
Emilio Cobos Álvarez 682d47bd83 Bug 1850293 - Make INCREMENT_SCRIPT_LEVEL state non intrinsic. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D186894
2023-08-29 00:08:28 +00:00
Frederic Wang 413a0cb66a Bug 1847177 - Rewrite mochitests for MathML console message as WPT. r=emilio,flod
The warning message for deprecated math space values is tweaked a bit so
that the actual attribute value that triggered it is reported. This
provides correct message for 'negative*mathspace' values.

test_bug1845461.html, test_bug553917.html and test_bug827713-2.html are
rewritten as an internal testharness WPT test, with the following
modifications:

* Preferences are forced in the ini file, avoiding issues that happened
  in the past due to inconsistent values for Nightly and Beta.
  dom.use_components_shim is set to prevent the deprecation message for
  the Components object and confuse the test (bug 1845910).
  legacy_mathvariant_attribute and mathspace_names are disabled to
  to properly test deprecated mathvariant and math space values.

* Console messages are triggered inside an iframe, allowing to test
  multiple source codes for the same deprecation warning. In particular,
  all mathvariant and named space values are now tested.

* Helper testMessageForMarkup/testNoMessageForMarkup functions are
  introduced to easily test some markup and improve readability.
  The expected message is provided as a regexp argument for more
  flexibility and severity level (error or warning) is verified.

* It's not clear why the tests for InvalidChild don't test msup or why
  they use this specific number of children. Keep them but add new ones
  for msub/msub/msubsup with the usual number of children.

Differential Revision: https://phabricator.services.mozilla.com/D185399
2023-08-04 14:19:21 +00:00
Frederic Wang ef451ba1b0 Bug 1845461 - Add deprecation warning and use counter for deprecated mathvariant usages. r=emilio,flod
Differential Revision: https://phabricator.services.mozilla.com/D184561
2023-08-01 07:47:15 +00:00
Iulian Moraru d008a49ace Backed out changeset 9c19f2cfc93a (bug 1845461) for causing Bug 1845910. 2023-07-30 16:50:35 +03:00
Frederic Wang bad47dcc35 Bug 1845461 - Add deprecation warning and use counter for deprecated mathvariant usages. r=emilio,flod
Differential Revision: https://phabricator.services.mozilla.com/D184561
2023-07-28 03:22:47 +00:00
Natalia Csoregi 30236e6104 Backed out changeset b1b74e5913ac (bug 1845461) for causing failures on browser_misused_characters_in_strings.js. CLOSED TREE 2023-07-27 22:31:12 +03:00
Frederic Wang 8291a43b68 Bug 1845461 - Add deprecation warning and use counter for deprecated mathvariant usages. r=emilio,flod
Differential Revision: https://phabricator.services.mozilla.com/D184561
2023-07-27 17:24:45 +00:00
Frederic Wang 4d445d9a85 Bug 1788605: Align scriptlevel's syntax on MathML Core. r=emilio
The ToInteger function is not very strict, so scriptlevel parsing
currently accepts invalid values like "+-1", "--1", "+z1", "+ 1",
"2.0", "-3\"" or "200px". To fix that, we perform an extra check
during parsing to ensure that the part after the optional leading
sign is really an <unsigned> number (string of digits).

This patch also fixes some issues in attribute-mapping-002.html
(previously attached attribute not removed, not handling
none/mprescripts specially, gather checks in one loop) and add
more test cases such as the ones mentioned above. The situation of
leading/trailing whitespace is unclear, so testing for things like
" +1" and "+1 " is ignored for now.

Differential Revision: https://phabricator.services.mozilla.com/D156160
2023-07-26 09:59:14 +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