New issue
Advanced search Search tips

Issue 902839 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

SVG word-spacing property ignores trailing/leading white spaces

Reported by ajizzleb...@gmail.com, Nov 7

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36

Steps to reproduce the problem:
1. Navigate to https://codepen.io/AJizzzleBizzle/pen/zMrrvR?editors=1101 (files also zipped up and attached)
2. Specified 'word-spacing' property violations have been highlighted
3. 

What is the expected behavior?
Leading/trailing text/tspan white spaces should be expanded/contracted as per the intra-line white spaces, according to the specified 'word-spacing' value.

For selection purposes, all white spaces throughout line should expand to fill available extra room for 'word-spacing' values greater than the white space original width - and shrink down for values less than the original width (reducing to zero-width then expanding again in the opposite direction at negative specified values)  

What went wrong?
Leading white spaces ignore 'word-spacing' property.

Any white spaces that do adhere to 'word-spacing' property are not expanded as in MS Edge implementation, leaving gaps when entire line is selected.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 70.0.3538.77  Channel: stable
OS Version: 10.0
Flash Version: 

Closest working implementation is MS Edge, although negative 'word-spacing' is not supported.
 
word-spacing-leading-space-bug.zip
1.8 KB Download
Labels: Needs-Triage-M70
Screenshot of violations
SS.png
97.5 KB View Download
Labels: OS-Android OS-Linux OS-Mac
Status: Available (was: Unconfirmed)
Cc: susan.boorgula@chromium.org
Labels: Triaged-ET Target-72 FoundIn-72 M-72
ajizzlebizzle@ Thanks for the issue.

Able to reproduce the issue on Windows 10, Mac OS 10.13.6 and Ubuntu 17.10 on the latest Stable 70.0.3538.77 and the latest Canary 72.0.3604.0.

This is a Non-Regression issue as this is observed from M-60 chrome builds.
Hence marking this as Untriaged for further updates from Dev.

Thanks..
902839-M60.PNG
131 KB View Download
Labels: FoundIn-71 FoundIn-70
Project Member

Comment 6 by bugdroid1@chromium.org, Nov 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/56aec4bdbfb7f81b00009aa702be81ace6a20665

commit 56aec4bdbfb7f81b00009aa702be81ace6a20665
Author: Fredrik Söderquist <fs@opera.com>
Date: Thu Nov 08 17:54:39 2018

Handle word-spacing for leading white space on SVG text

SVGTextLayoutEngineSpacing checking if the current and last characters
were non-nuls before attempting to apply word-spacing. This would mean
that we'd never add word-spacing at the beginning of a text box.
Remove the checks for non-nuls.

Bug: 902839
Change-Id: I751e1bd1317f7411960d137b7e55a3b83e8cb0df
Reviewed-on: https://chromium-review.googlesource.com/c/1326156
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#606528}
[add] https://crrev.com/56aec4bdbfb7f81b00009aa702be81ace6a20665/third_party/WebKit/LayoutTests/svg/text/word-spacing-leading-ws-expected.html
[add] https://crrev.com/56aec4bdbfb7f81b00009aa702be81ace6a20665/third_party/WebKit/LayoutTests/svg/text/word-spacing-leading-ws.html
[modify] https://crrev.com/56aec4bdbfb7f81b00009aa702be81ace6a20665/third_party/blink/renderer/core/layout/svg/svg_text_layout_engine_spacing.cc

Sign in to add a comment