Cannot select first character of vertical text
Reported by
glroyla...@gmail.com,
Apr 5 2018
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36 Steps to reproduce the problem: 1. load SVG file with vertical text into browser 2. try to select first two characters of a vertical string 3. What is the expected behavior? Easy to use mouse to select the initial character of a vertical string What went wrong? cannot get first character in a click drag selection. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 65.0.3325.181 Channel: stable OS Version: 10.0 Flash Version: Also, try double clicking a character in a vertical string. If the cursor is slightly to the left, it selects the character, but if cursor is slightly to the right, it selects the next character. Edge and Firefox give reasonable behavior.
,
Apr 5 2018
,
Apr 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d8b3831c9e40a94962bd820f0c319f6c933b0e7f commit d8b3831c9e40a94962bd820f0c319f6c933b0e7f Author: Fredrik Söderquist <fs@opera.com> Date: Fri Apr 06 09:21:40 2018 [PE] Improve SVG text selection for vertical text We were previously always using the "left edge" of the fragment bounding box when computing the position within the fragment. This works poorly for vertical text. Use "top edge" for the vertical case instead. Bug: 829214 Change-Id: I52e0aeffa95d05b1c86cd6aeca5dde7a886db486 Reviewed-on: https://chromium-review.googlesource.com/997792 Commit-Queue: Fredrik Söderquist <fs@opera.com> Reviewed-by: Stephen Chenney <schenney@chromium.org> Reviewed-by: Philip Rogers <pdr@chromium.org> Cr-Commit-Position: refs/heads/master@{#548722} [add] https://crrev.com/d8b3831c9e40a94962bd820f0c319f6c933b0e7f/third_party/WebKit/LayoutTests/svg/text/select-text-vertical.html [modify] https://crrev.com/d8b3831c9e40a94962bd820f0c319f6c933b0e7f/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
,
Apr 6 2018
I believe the double-click thing mentioned should've been fixed as well (at least it appears so...) Depending on which "logical half" of the glyph the double-clicking takes place, either the glyph itself will be included or it won't. This should be consistent with the horizontal case though AFAICT. I did notice some other bad behavior though, but I'll handle that elsewhere.
,
Apr 6 2018
Thank you very much. Could one of you take a look at the systemLanguage bug: https://bugs.chromium.org/p/chromium/issues/detail?id=732063 https://jsfiddle.net/8z06cfx2/21/ It should be a quick fix: systemLanguage is incorrectly parsed as a space delimited list (like class) rather than a comma separated list.
,
Apr 6 2018
Yes, fixing the parsing is easy... (two ' ' to ',' pretty much) but finding a way of storing the data (single bit!) to tell you whether it should be a ',' or a ' ' is slightly more time consuming. (SVGTests exists on almost all SVGElements, so that single bit - which amounts to 4 bytes in practice - is costly if you don't play your cards right...) It's back on the radar now though... |
|||
►
Sign in to add a comment |
|||
Comment 1 by f...@opera.com
, Apr 5 2018Status: Available (was: Unconfirmed)