[mathml] Simplification and cleanup in stretchy operator shaper code
This CL improves the stretchy operator shaper code after more testing in MathML layout. The following changes are performed: * Add an OUT Metrics parameter to StretchyOperatorShaper::Shape and improve this function. As discussed in [1], it is expected that LayoutNG algorithms perform both text shaping and measurements, and pass the shape result to the painter classes, so it is not necessary to have a separate GetMetrics method. * Remove GetGlyphStretchSize and ToMetrics helper functions since they are now only used in only one place. * Remove the stretch axis direction parameter from the version of CreateForStretchyMathOperator that outputs a single glyph since MathML only supports horizontal mode and vertical operators still correspond to horizontal text. * Improve code documentation and update tests. [1] https://chromium-review.googlesource.com/c/chromium/src/+/2051923 Bug: 6606 Change-Id: Icc755adf9460ac59b68e0d904c062296700fd3c0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2144110Reviewed-by:Koji Ishii <kojii@chromium.org> Commit-Queue: Frédéric Wang <fwang@igalia.com> Cr-Commit-Position: refs/heads/master@{#758495}
Showing
Please register or sign in to comment