Don't adopt a null FontSelector in CanvasRenderingContext2D::setFont()
This function does the following: 1. Create a temporary ComputedStyle |font_style| 2. Make |font_style| adopt its current FontSelector, which is always nullptr at the call site 3. Use StyleResolver::ComputeFont() to resolve font-related properties, which overrides the FontSelector of |font_style| with the underlying document's FontSelector This isn't correct, as it switches the FontSelector of |font_style|, while ComputeFont() can already use the document's FontSelector. The null FontSelector is actually never used. Hence, this patch removes the adoption of null FontSelector. Bug: 1049295 Change-Id: I2d3b2d1affd9317c6535933c1e4cc2421f5be1c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2103258Reviewed-by:Fernando Serboncini <fserb@chromium.org> Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/master@{#750625}
Showing
Please register or sign in to comment