Граф коммитов

160 Коммитов

Автор SHA1 Сообщение Дата
sskcvqikf c53abb7b6e Bug 1797012 - Change NS_STYLE_MATH_STYLE_* macros to enum StyleMathStyle. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D160016
2022-10-24 17:47:34 +00:00
Marian-Vasile Laza e80c0a7ce7 Backed out changeset f39d284f4db7 (bug 1797012) for causing wpt failures on frac-1.html. CLOSED TREE 2022-10-24 15:46:12 +03:00
sskcvqikf 15eb00a7bf Bug 1797012 - Change NS_STYLE_MATH_STYLE_* macros to enum StyleMathStyle. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D160016
2022-10-24 09:29:05 +00:00
Frederic Wang 36b880a97d Bug 1795630 - Export MathML crashtests to WPT. r=emilio
This commit moves crash tests from dom/mathml and layout/mathml into
testing/web-platform/tests/mathml/crashtests/mozilla, trying to do only
minimal changes (i.e. use 'test-wait' instead of 'reftest-wait' and
fix whitespace errors). lint errors are ignored for usage of
setTimeout as well as the invalid XML file testing bug 289180.

Regarding 400157.xhtml, it uses special powers to trigger a
zoom changes. It could probably be tweaked to convert to a mochitest or
rely on a different dynamic change. However, this was testing a crash for
the `<mfenced>` element in nsMathMLmfencedFrame whose code has been
completely removed, so it's now hard to reproduce the original crash.
Also that makes the test no longer very useful, so we just remove it.

Differential Revision: https://phabricator.services.mozilla.com/D159491
2022-10-18 04:21:41 +00:00
Cristian Tuns daaaf0a3af Backed out changeset f792a9947d0f (bug 1795630) for causing lint failures CLOSED TREE 2022-10-17 14:32:24 -04:00
Frederic Wang 5cbb8bbec5 Bug 1795630 - Export MathML crashtests to WPT. r=emilio
This commit moves crash tests from dom/mathml and layout/mathml into
testing/web-platform/tests/mathml/crashtests/mozilla, trying to do only
minimal changes (i.e. use 'test-wait' instead of 'reftest-wait').

The exception is 400157.xhtml which uses special powers to trigger a
zoom changes. It could probably be tweaked to convert to a mochitest or
rely on a different dynamic change. However, this was testing a crash for
the `<mfenced>` element in nsMathMLmfencedFrame whose code has been
completely removed, so it's now hard to reproduce the original crash.
Also that makes the test no longer very useful, so we just remove it.

Differential Revision: https://phabricator.services.mozilla.com/D159491
2022-10-17 17:16:33 +00:00
Frederic Wang 097a3d7648 Bug 1793452 - Remove flags PARSE_ALLOW_UNITLESS and CONVERT_UNITLESS_TO_PERCENT. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D158547
2022-10-07 12:57:08 +00:00
criss 49eaaa607e 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 535f75ea9e 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
2022-09-15 08:14:49 +00:00
Frederic Wang df0d17b174 Bug 1783841 - Remove MathML preferences deprecated_style_attributes and mathsize_names. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D154087
2022-08-11 10:20:41 +00:00
Iulian Moraru e0ce4ec1ed Backed out changeset bcc86b98d4f9 (bug 1783841) for causing reftest mathml related failures. CLOSED TREE 2022-08-09 19:23:24 +03:00
Frederic Wang db39310640 Bug 1783841 - Remove MathML preferences deprecated_style_attributes and mathsize_names. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D154087
2022-08-09 14:12:48 +00:00
Emilio Cobos Álvarez 9fc2aa47fc Bug 1773558 - Move fixed-point font types to Rust. r=layout-reviewers,jfkthame
Now that cbindgen and rust support const generics, it seems more simple.

This centralizes all the relevant font constants etc in rust and avoids
conversions when going from rust to C++ and vice versa.

Differential Revision: https://phabricator.services.mozilla.com/D148847
2022-06-13 00:59:23 +00:00
Noemi Erli 841e350bc4 Backed out changeset 7585591a9bad (bug 1773558) for causing failures in system-fonts.html 2022-06-12 19:02:33 +03:00
Emilio Cobos Álvarez e441089ca0 Bug 1773558 - Move fixed-point font types to Rust. r=layout-reviewers,jfkthame
Now that cbindgen and rust support const generics, it seems more simple.

This centralizes all the relevant font constants etc in rust and avoids
conversions when going from rust to C++ and vice versa.

Differential Revision: https://phabricator.services.mozilla.com/D148847
2022-06-12 10:48:58 +00:00
Emilio Cobos Álvarez 255763ef57 Bug 1773070 - Unify Gecko and Servo EventState/ElementState bits. r=smaug
Add a dom/base/rust crate called just "dom" where we can share these.

Most of the changes are automatic:

  s/mozilla::EventStates/mozilla::dom::ElementState/
  s/EventStates/ElementState/
  s/NS_EVENT_STATE_/ElementState::/
  s/NS_DOCUMENT_STATE_/DocumentState::/

And so on. This requires a new cbindgen version to avoid ugly casts for
large shifts.

Differential Revision: https://phabricator.services.mozilla.com/D148537
2022-06-07 23:09:52 +00:00
Emilio Cobos Álvarez 691bb32824 Bug 1762109 - Remove no longer needed method declaration.
MANUAL PUSH: Bustage fix CLOSED TREE
2022-03-31 17:02:08 +02:00
Emilio Cobos Álvarez 881f8f938a Bug 1762109 - Make the XLink setup a bit saner. r=smaug
Make Link and SVGAElement agree on XLink handling, and make it more
explicit that SVGAElement needs to be a bit more special for SMIL.

Remove dead MathML XLink code.

Differential Revision: https://phabricator.services.mozilla.com/D142546
2022-03-31 14:33:57 +00:00
Emilio Cobos Álvarez 1ce0975b8e Bug 1761493 - Make Gecko internally consistent wrt what a link is. r=smaug
This is mostly edge-casey, but see bug 1757156 for an example where it's
causing some issues (granted, they could use `href="#"` or something
instead of an empty href).

It feels weird if a link looks like a link (because the CSS definition
of a link matches, which is "has an href") but then mostly doesn't
behave as a link.

We can't navigate anywhere if we don't have a valid URI but maybe JS
handles the relevant events as in bug 1757156.

Use the CSS definition (has href) since that's interoperable across
browsers. This should also make some stuff much faster (since checking
'is link' is now just a bit check instead of a virtual call).

(Awaiting try results, if no tests need adjustments then I need to write
some)

Differential Revision: https://phabricator.services.mozilla.com/D142107
2022-03-30 17:34:31 +00:00
Emilio Cobos Álvarez b975e781a1 Bug 1747922 - Rename StyleMathMLMathVariant -> StyleMathVariant.
MANUAL PUSH: Trivial rename.
2021-12-30 02:35:54 +01:00
Neia Finch b205467245 Bug 1747922 - Replace MathML font constants with enum r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D134802
2021-12-30 00:34:27 +00:00
somdatta 98b05fd89a Bug 1586014- Factor out RecompileScriptEventListeners r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D129974
2021-11-04 18:24:58 +00:00
Masayuki Nakano 25a3c48305 Bug 1732845 - Add `nsINode::IsInDesignMode()` to check whether the node is directly in design mode r=smaug
There are a lot of check of `Document`'s editable state **with** comments. This
means that it's unclear for developers that only `Document` node is editable in
design mode.

Additionally, there are some points which use composed document rather than
uncomposed document even though the raw API uses uncomposed document. Comparing
with the other browsers, checking uncomposed document is compatible behavior,
i.e., nodes in shadow trees are not editable unless `contenteditable`.

Therefore, `nsINode` should have a method to check whether it's in design mode
or not.

Note that it may be called with a node in UA widget.  Therefore, this patch
adds new checks if it's in UA widget subtree or native anonymous subtree,
checking whether it's in design mode with its host.

Differential Revision: https://phabricator.services.mozilla.com/D126764
2021-10-12 03:14:43 +00:00
Emilio Cobos Álvarez 039592f4d8 Bug 1682003 - Avoid UTF-8 -> UTF-16 conversion during CSSOM serialization. r=heycam
This lifts a bunch of string conversions higher up the stack, but allows
us to make the servo code use utf-8 unconditionally, and seemed faster
in my benchmarking (see comment 0).

It should also make a bunch of attribute setters faster too (like
setting .cssText), now that we use UTF8String for them (we couldn't
because we couldn't specify different string types for the getter and
setters).

Differential Revision: https://phabricator.services.mozilla.com/D99590
2020-12-17 14:04:35 +00:00
Simon Giesecke 6fac745ea4 Bug 1673931 - Remove dependency of BindingUtils.h on Document.h.
Differential Revision: https://phabricator.services.mozilla.com/D95048

Depends on D95047
2020-11-23 16:08:03 +00:00
Simon Giesecke 971b645fe3 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
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Frederic Wang 3a9862e638 Bug 1667719: Add preferences, warnings and telemetry for the scriptminsize and scriptsizemultiplier attributes. r=emilio
These attributes have been removed from MathML Core and their use case
could be handled by other ways:
1. Rely on font.minimum-size.x-math and/or improve CSS math-depth to avoid
  that the font-size due to math-depth change becomes very small.
2. Implement support for the OpenType MATH parameters to customize the
  scaling factor and/or improve math-depth to accept float values, so that
  people can customize the automatic scaling down.

This patch is a tentative to remove these attributes. They will be disabled
under a preference flag on nightly and have warning/telemetry on other
channels. Note that the effect of the default scriptminsize (8pt) is not
disabled from cascade.rs's handle_mathml_scriptlevel_if_needed yet. This
part will require more care (see bug 1548471).

Differential Revision: https://phabricator.services.mozilla.com/D91569
2020-09-28 14:12:27 +00:00
Frederic Wang 42b117ee83 Bug 1667527 - Implement CSS parsing for the math-depth property r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D91500
2020-09-28 10:42:49 +00:00
Frederic Wang 0eebca3c33 Bug 1667118 - Rename -moz-math-script-level to math-depth. r=emilio
This renames the internal -moz-math-script-level property in order to
prepare for full math-depth support. Currently, the property is guarded
under a disabled-by-default flag, so there should be no observable
behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D91285
2020-09-26 03:04:56 +00:00
Narcis Beleuzu 679469fad8 Backed out changeset 239f29a99c4f (bug 1667118) for bc failure on browser_parsable_css.js . CLOSED TREE 2020-09-25 23:39:15 +03:00
Frederic Wang 5461921d85 Bug 1667118 - Rename -moz-math-script-level to math-depth. r=emilio
This renames the internal -moz-math-script-level property in order to
prepare for full math-depth support. Currently, the property is guarded
under a disabled-by-default flag, so there should be no observable
behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D91285
2020-09-25 18:37:39 +00:00
Mihai Alexandru Michis cc04d2696e Backed out changeset b08319695e21 (bug 1667118) for causing xpcshell failures in test_css-properties-db.js
CLOSED TREE
2020-09-25 16:40:33 +03:00
Frederic Wang eb4b491896 Bug 1667118 - Rename -moz-math-script-level to math-depth. r=emilio
This renames the internal -moz-math-script-level property in order to
prepare for full math-depth support. Currently, the property is guarded
under a disabled-by-default flag, so there should be no observable
behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D91285
2020-09-25 12:04:53 +00:00
Razvan Maries ed260c95a0 Backed out changeset 08538390d573 (bug 1667118) for perma failures on test_css-properties-db.js. CLOSED TREE 2020-09-25 00:12:10 +03:00
Frederic Wang c828ccef71 Bug 1667118 - Rename -moz-math-script-level to math-depth. r=emilio
This renames the internal -moz-math-script-level property in order to
prepare for full math-depth support. Currently, the property is guarded
under a disabled-by-default flag, so there should be no observable
behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D91285
2020-09-24 18:44:41 +00:00
Frederic Wang 7ef35cabad Bug 1666075 - Implement displaystyle attribute on all MathML elements. r=emilio
Gecko implements the displaystyle attribute as defined by MathML 3 i.e.
only on the math, mstyle and mtable elements. This commit follows MathML
Core and instead define it as a global attribute mapped to math-style.
See https://mathml-refresh.github.io/mathml-core/#the-displaystyle-and-scriptlevel-attributes

Differential Revision: https://phabricator.services.mozilla.com/D90786
2020-09-24 15:34:17 +00:00
Frederic Wang 4f44f0d754 Bug 1664467: Remove runtime preferences for legacy MathML lengths. r=emilio
This commit remove the following preferences, which have been
disabled since Firefox 70:
- mathml.nonzero_unitless_lengths.disabled
- mathml.legacy_number_syntax.disabled

These are edge syntaxes for MathML3 lengths that don't align well
with CSS and we haven't received any bug report about it since they
were disabled. Tests are updated to treat attributes using such
values as invalid.

update tests

Differential Revision: https://phabricator.services.mozilla.com/D89920
2020-09-11 19:48:07 +00:00
Simon Giesecke d39b639f56 Bug 1652942 - Remove some unnecessary includes of Element.h. r=smaug
Depends on D83632

Differential Revision: https://phabricator.services.mozilla.com/D83633
2020-07-15 13:55:24 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Philipp Zech 169b68c745 Bug 1636205 - Remove StyleFontSize enum from nsStyleConsts.h. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D77511
2020-06-17 11:08:44 +00:00
Philipp Zech 46da657360 Bug 1635160 - Convert style-font #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D73728
2020-05-07 08:32:27 +00:00
Edgar Chen 6a2699f75b Bug 1128054 - Part 3: Invalid tabindex attribute should not make an element focusable; r=smaug
See https://html.spec.whatwg.org/#attr-tabindex.

Depends on D68209

Differential Revision: https://phabricator.services.mozilla.com/D68210

--HG--
extra : moz-landing-system : lando
2020-04-04 20:03:09 +00:00
Sean Feng 6d144fcf0d Bug 1377999 - Make MathML nodes to adapt the DOMArena changes r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D57702

--HG--
extra : moz-landing-system : lando
2020-03-17 14:53:25 +00:00
Simon Giesecke 1ee2c28687 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/mathml. r=smaug
Depends on D66017

Differential Revision: https://phabricator.services.mozilla.com/D66018

--HG--
extra : moz-landing-system : lando
2020-03-09 15:21:21 +00:00
Emilio Cobos Álvarez a25126cd0d Bug 1611181 - Make direction use an enum class. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D60857

--HG--
extra : moz-landing-system : lando
2020-01-24 11:46:14 +00:00