New issue
Advanced search Search tips

Issue 829214 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Cannot select first character of vertical text

Reported by glroyla...@gmail.com, Apr 5 2018

Issue description

UserAgent: 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.
 
zhhack.svg
661 bytes Download

Comment 1 by f...@opera.com, Apr 5 2018

Labels: OS-Linux OS-Mac
Status: Available (was: Unconfirmed)
Owner: f...@opera.com
Status: Assigned (was: Available)
Project Member

Comment 3 by bugdroid1@chromium.org, 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

Comment 4 by f...@opera.com, Apr 6 2018

Status: Fixed (was: Assigned)
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.
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.


Comment 6 by f...@opera.com, 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