Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align definition of numbers with CSS #23

Closed
fred-wang opened this issue Feb 22, 2019 · 7 comments
Closed

Align definition of numbers with CSS #23

fred-wang opened this issue Feb 22, 2019 · 7 comments
Labels
compatibility Issues affecting backward compatibility css / html5 Issues related to CSS or HTML5 interoperability MathML Core Issues affecting the MathML Core specification MathML 4 Issues affecting the MathML 4 specification need specification update Issues requiring specification changes

Comments

@fred-wang
Copy link

fred-wang commented Feb 22, 2019

"The definition of numbers is also not very accurate in the MathML
recommendation compared to HTML5. One has to check the RelaxNG schemas
and the predefined RelaxNG types to know the exact syntax. Again, it
think it would be best to rely on the HTML5 definitions. For example,
<math><mspace width="1E1em" height="10em" mathbackground="red"/></math>
draws a red square in WebKit but Gecko says "1E1em" is invalid.

https://www.w3.org/TR/html5/infrastructure.html#numbers"

original report: https://lists.w3.org/Archives/Public/www-math/2016Aug/0000.html

@fred-wang fred-wang added MathML Core Issues affecting the MathML Core specification MathML 4 Issues affecting the MathML 4 specification css / html5 Issues related to CSS or HTML5 interoperability labels Feb 22, 2019
@NSoiffer
Copy link
Contributor

NSoiffer commented Mar 4, 2019

I agree that MathML should align it's number parsing with HTML5. Looking at the referenced HTML spec, it appears that attributes can only be pos/neg decimal integers/floating point numbers. They can't be hex or octal except in colors. In looking at the MathML spec itself, it doesn't seem to allow hex digits anywhere except in colors (search for "hexadecimal"), so it seems like they are in alignment in at least intent. The RelaxNG schema might be off.

I'm pretty sure that MathML 3 made an attempt to align its basic syntax parsing with HTML5. Of course, it might not have been perfect in doing so.

@fred-wang fred-wang added the compatibility Issues affecting backward compatibility label Mar 20, 2019
@fred-wang
Copy link
Author

The definitions are given here ; I think it corresponds to the RelaxNG schema.
https://mathml-refresh.github.io/mathml/chapter2.html#id.2.1.5.1

In particular for "number":

an optional prefix of "-" (U+002D), followed by an unsigned number, representing a terminating decimal number (a type of rational number)

Not that this does not allow values like 1.3139E2.

I reopened this since we need to update the specs/relaxng schema and write WPT tests for this.

cc @bkardell

@fred-wang fred-wang added need resolution Issues needing resolution at MathML Refresh CG meeting need implementation update need specification update Issues requiring specification changes and removed need resolution Issues needing resolution at MathML Refresh CG meeting labels May 16, 2019
@fred-wang
Copy link
Author

See https://lists.w3.org/Archives/Public/public-mathml4/2019May/0006.html
I don't have the minutes from this week.

Keeping "need resolution" for now. I think we agreed someone should go over the list of number attributes and check carefully.

@fred-wang fred-wang added the need resolution Issues needing resolution at MathML Refresh CG meeting label May 16, 2019
@fred-wang
Copy link
Author

"fw: Numbers like "5." is allowed in MathML currently, but not in CSS. Can
we align? Resolved to align. Since the values are parsed by CSS, we should
follow the CSS spec (as opposed to HTML)"

@fred-wang fred-wang added need tests Issues related to writing WPT tests and removed need resolution Issues needing resolution at MathML Refresh CG meeting labels Jun 3, 2019
@fred-wang
Copy link
Author

Consensus was to follow CSS.

@fred-wang
Copy link
Author

Core spec now relies on

  • non-negative-integer value as defined in [HTML5]
  • length-percentage value as defined in [CSS-VALUES-4]

But some attributes still refer to MathML3

fred-wang added a commit to web-platform-tests/wpt that referenced this issue Jul 18, 2019
…core.

Basically things like "7.em", "-7.em" or "5" are now invalid.

w3c/mathml#24
w3c/mathml#23
jgraham pushed a commit to web-platform-tests/wpt that referenced this issue Jul 18, 2019
…core.

Basically things like "7.em", "-7.em" or "5" are now invalid.

w3c/mathml#24
w3c/mathml#23
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Jul 24, 2019
… some numbers are invalid in …, a=testonly

Automatic update from web-platform-tests
Update MathML tests for lengths now that some numbers are invalid in core.

Basically things like "7.em", "-7.em" or "5" are now invalid.

w3c/mathml#24
w3c/mathml#23

--

wpt-commits: a7bec3cae6324dfadbc93705eb8b119d550e094a
wpt-pr: 17908
xeonchen pushed a commit to xeonchen/gecko that referenced this issue Jul 25, 2019
… some numbers are invalid in …, a=testonly

Automatic update from web-platform-tests
Update MathML tests for lengths now that some numbers are invalid in core.

Basically things like "7.em", "-7.em" or "5" are now invalid.

w3c/mathml#24
w3c/mathml#23

--

wpt-commits: a7bec3cae6324dfadbc93705eb8b119d550e094a
wpt-pr: 17908
@fred-wang fred-wang changed the title Align definition of numbers with HTML5 Align definition of numbers with CSS Aug 21, 2019
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Aug 22, 2019
…. r=emilio

See w3c/mathml#23
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/wIjm9JjVHNg

This commit introduces a new preference option
mathml.legacy_number_syntax.disabled to disable legacy MathML numbers
(e.g. "1234.") that are not supported by CSS. This feature is now disabled by
default.

* test_bug553917.html is updated to check that such legacy values now cause an
  error message to be logged into the console when the feature is disabled.
* Legacy MathML features are now disabled for WPT mathml test in a global
  __dir__.ini file. Removing legacy numbers allow to pass
  mathml/relations/css-styling/lengths-2.html

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

--HG--
extra : moz-landing-system : lando
xeonchen pushed a commit to xeonchen/gecko that referenced this issue Aug 22, 2019
…. r=emilio

See w3c/mathml#23
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/wIjm9JjVHNg

This commit introduces a new preference option
mathml.legacy_number_syntax.disabled to disable legacy MathML numbers
(e.g. "1234.") that are not supported by CSS. This feature is now disabled by
default.

* test_bug553917.html is updated to check that such legacy values now cause an
  error message to be logged into the console when the feature is disabled.
* Legacy MathML features are now disabled for WPT mathml test in a global
  __dir__.ini file. Removing legacy numbers allow to pass
  mathml/relations/css-styling/lengths-2.html

Differential Revision: https://phabricator.services.mozilla.com/D42907
natechapin pushed a commit to natechapin/wpt that referenced this issue Aug 23, 2019
…core.

Basically things like "7.em", "-7.em" or "5" are now invalid.

w3c/mathml#24
w3c/mathml#23
@fred-wang
Copy link
Author

We have tests for that, so closing.

@fred-wang fred-wang removed the need tests Issues related to writing WPT tests label Sep 16, 2019
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 4, 2019
… some numbers are invalid in …, a=testonly

Automatic update from web-platform-tests
Update MathML tests for lengths now that some numbers are invalid in core.

Basically things like "7.em", "-7.em" or "5" are now invalid.

w3c/mathml#24
w3c/mathml#23

--

wpt-commits: a7bec3cae6324dfadbc93705eb8b119d550e094a
wpt-pr: 17908

UltraBlame original commit: ac0176e866080ef838ca94c26e556216aefcecfa
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 4, 2019
…. r=emilio

See w3c/mathml#23
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/wIjm9JjVHNg

This commit introduces a new preference option
mathml.legacy_number_syntax.disabled to disable legacy MathML numbers
(e.g. "1234.") that are not supported by CSS. This feature is now disabled by
default.

* test_bug553917.html is updated to check that such legacy values now cause an
  error message to be logged into the console when the feature is disabled.
* Legacy MathML features are now disabled for WPT mathml test in a global
  __dir__.ini file. Removing legacy numbers allow to pass
  mathml/relations/css-styling/lengths-2.html

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

UltraBlame original commit: 8637163553058a09e835ee6d8e53a09735b1b1ec
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 4, 2019
… some numbers are invalid in …, a=testonly

Automatic update from web-platform-tests
Update MathML tests for lengths now that some numbers are invalid in core.

Basically things like "7.em", "-7.em" or "5" are now invalid.

w3c/mathml#24
w3c/mathml#23

--

wpt-commits: a7bec3cae6324dfadbc93705eb8b119d550e094a
wpt-pr: 17908

UltraBlame original commit: ac0176e866080ef838ca94c26e556216aefcecfa
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 4, 2019
… some numbers are invalid in …, a=testonly

Automatic update from web-platform-tests
Update MathML tests for lengths now that some numbers are invalid in core.

Basically things like "7.em", "-7.em" or "5" are now invalid.

w3c/mathml#24
w3c/mathml#23

--

wpt-commits: a7bec3cae6324dfadbc93705eb8b119d550e094a
wpt-pr: 17908

UltraBlame original commit: ac0176e866080ef838ca94c26e556216aefcecfa
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 4, 2019
…. r=emilio

See w3c/mathml#23
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/wIjm9JjVHNg

This commit introduces a new preference option
mathml.legacy_number_syntax.disabled to disable legacy MathML numbers
(e.g. "1234.") that are not supported by CSS. This feature is now disabled by
default.

* test_bug553917.html is updated to check that such legacy values now cause an
  error message to be logged into the console when the feature is disabled.
* Legacy MathML features are now disabled for WPT mathml test in a global
  __dir__.ini file. Removing legacy numbers allow to pass
  mathml/relations/css-styling/lengths-2.html

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

UltraBlame original commit: 8637163553058a09e835ee6d8e53a09735b1b1ec
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 4, 2019
…. r=emilio

See w3c/mathml#23
and https://groups.google.com/forum/#!topic/mozilla.dev.platform/wIjm9JjVHNg

This commit introduces a new preference option
mathml.legacy_number_syntax.disabled to disable legacy MathML numbers
(e.g. "1234.") that are not supported by CSS. This feature is now disabled by
default.

* test_bug553917.html is updated to check that such legacy values now cause an
  error message to be logged into the console when the feature is disabled.
* Legacy MathML features are now disabled for WPT mathml test in a global
  __dir__.ini file. Removing legacy numbers allow to pass
  mathml/relations/css-styling/lengths-2.html

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

UltraBlame original commit: 8637163553058a09e835ee6d8e53a09735b1b1ec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Issues affecting backward compatibility css / html5 Issues related to CSS or HTML5 interoperability MathML Core Issues affecting the MathML Core specification MathML 4 Issues affecting the MathML 4 specification need specification update Issues requiring specification changes
Projects
None yet
Development

No branches or pull requests

2 participants