[mathml] Use ASCII case-insensitiveness to validate mathsize and dir #20807
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The mathsize and dir attributes are defined modulo ASCII
case-insensitive equivalence and are mapped to CSS font-size and
direction properties [1] [2]. Since the CSS keywords are themselves
defined modulo ASCII case-insensitive equivalence [3], there is not need
to filter out other (Unicode) case-insensitive equivalent keywords
(e.g. "ſmall") in the MathML Code, they will be rejected by the CSS
parser.
This CL replaces DeprecatedEqualIgnoringCase with EqualIgnoringASCIICase
and adds tests to ensure that (Unicode) case-insensitive equivalent
strings remain disallowed.
[1] https://mathml-refresh.github.io/mathml-core/#global-attributes
[2] w3c/mathml#178
[3] https://www.w3.org/TR/css-values-4/#keywords
Bug: 6606
Bug: 627682
Change-Id: Ice84368c8cc7e8fff9faccb454c23fad87b99d59
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1970615
Reviewed-by: Kent Tamura <[email protected]>
Commit-Queue: Frédéric Wang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#725481}