Fix invalid nul character in KeyCode accelerator
A recent change in RenderText caused a regression while showing command accelerators on MAC (see: http://crbug.com/1016676). The change in RenderText is replacing the embedded control characters with their equivalent unicode visual pictures. This change should not cause that regression. By digging into the code, we found that some strings are incorrectly providing string with embedded nul character. These controls characters doesn't have 'glyphs' in font and will triggers expensive font fallbacks before faling to find the appropriate font. This CL is removing the leading \0 character from Accelerator::KeyCodeToMacSymbol(...) R=robliao@chromium.org,ellyjones@chromium.org CC=thomasanderson@chromium.org Bug: 1016676 Change-Id: Iaf3de8e5aec4de4e63e09f1071bf27768d0762d8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1876468Reviewed-by:Alexei Svitkine <asvitkine@chromium.org> Reviewed-by:
Elly Fong-Jones <ellyjones@chromium.org> Reviewed-by:
Scott Violet <sky@chromium.org> Auto-Submit: Etienne Bergeron <etienneb@chromium.org> Commit-Queue: Etienne Bergeron <etienneb@chromium.org> Cr-Commit-Position: refs/heads/master@{#708799}
Showing
Please register or sign in to comment