Use NGBidiParagraph for Canvas measureText
The Canvas [text-preparation-algorithm] requires to run bidi algorithm using |TextDirection|, without |ComputedStyle|. In LayoutNG, |NGBidiParagraph| splits the text into bidi runs and compute bidi levels. This patch changes |NGBidiParagraph| so that Canvas code can use it without |ComputedStyle|. This patch changes |TextMetrics| to use |NGBidiParagraph| to resolve bidi levels, and measur each run. [text-preparation-algorithm]: https://html.spec.whatwg.org/multipage/canvas.html#text-preparation-algorithm Bug: 1010893 Change-Id: I46d8e5e3fd9e76910e86a5be71f9d7247911fbb1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2196086Reviewed-by:Fernando Serboncini <fserb@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#771602}
Showing
Please register or sign in to comment