[mathml] Fix dictionary category for unknown operators with explicit form
MathMLOperatorElement::ComputeDictionaryCategory was wrongly implemented in [1] and returns an unknown category for an operator that is not in the dictionary AND has an explicit form attribute. This caused a crash when the function was finally used in [2] and [3]. This CL fixes that mistake and adds a DCHECK after the unique call to ComputeDictionaryCategory to ensure the category is not unknown. Additionally, the documentation of the corresponding low-level platform/text API is updated to make clear it never returns an unknown category. WPT tests are added, one of them contains an munderover whose base is an operator outside the dictionary with an explicit form, allowing to ensure no crash happens for the code added in [2] [3]. Another one verifies default operator spacing and will cover the code added in [4]. [1] https://chromium-review.googlesource.com/c/chromium/src/+/2368362 [2] https://chromium-review.googlesource.com/c/chromium/src/+/2390760 [3] https://chromium-review.googlesource.com/c/chromium/src/+/2383023 [4] https://chromium-review.googlesource.com/c/chromium/src/+/2390652 Bug: 6606, 1124617 Change-Id: Ic6ba0b663d14634ca5c66070a5b3cfc2eaa3d198 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2390633Reviewed-by:Rob Buis <rbuis@igalia.com> Reviewed-by:
Ian Kilpatrick <ikilpatrick@chromium.org> Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org> Cr-Commit-Position: refs/heads/master@{#804559}
Showing
Please register or sign in to comment