New issue
Advanced search Search tips

Issue 601036 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Wrong SVG text activation with active elements underneath

Reported by krzyszto...@gmail.com, Apr 6 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36

Steps to reproduce the problem:
1. Load http://jsfiddle.net/ryy4ju6y/1/
2. Observe areas of mouse over to highlight texts
3. Click onto text to toggle pointer-events of background
4. Observe disabilities in hovering texts

What is the expected behavior?
Text should be highlighted when entering text BBox, independently on transformations applied to text and independently on activity allowed in shapes underneath

What went wrong?
Texts are highlighted after entering areas different than BBox.
This effect depends on activity (pointer-events flag) allowed in shapes underneath.
This effect depends on transformations applied to and around of texts.
This effect can lead to situation when small text cannot be pointed.

Did this work before? N/A 

Chrome version: 49.0.2623.110  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 21.0 r0

Other browsers (Firefox, Internet Explorer, Opera) behave properly.
 

Comment 1 by f...@opera.com, Apr 7 2016

Components: -UI Blink>SVG
Labels: -OS-Windows OS-All
Status: Available (was: Unconfirmed)
Thanks for a great test!

Looks like the issue with selection has been fixed recently (possibly  issue 466617 ), since that part works on trunk.

The remaining issue is likely similar, but probably on the text root itself.
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 9 2016

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

commit d44cc5eb0dd3240a5feef91f4ec09b5ae1ac5e5c
Author: fs <fs@opera.com>
Date: Sat Apr 09 20:40:24 2016

Only hit-test SVG <text> foreground

<text> doesn't have/paint any background, so performing hit-tests for
the various background is a both a waste of time, and gives rise to bugs
in some cases where poor precision renders false positives.
This also matches what LayoutSVGShape does (and <text> is a "graphics
element" just like the basic shapes.)
Rework the 'pointer-events: bounding-box' check to not rely on
nodeAtPoint. It's now somewhat consistent with how containers (<g>) are
handled.
This also affects how hit-testing works w/ 'textLength' ("artificial"
spaces will no longer be considered part of the <text> - this matches
the Firefox behavior.) Adjust svg/animations/svgenum-animation-3.html
to cater to this change in behavior.

BUG= 601036 

Review URL: https://codereview.chromium.org/1870983002

Cr-Commit-Position: refs/heads/master@{#386308}

[modify] https://crrev.com/d44cc5eb0dd3240a5feef91f4ec09b5ae1ac5e5c/third_party/WebKit/LayoutTests/svg/animations/script-tests/svgenum-animation-3.js
[add] https://crrev.com/d44cc5eb0dd3240a5feef91f4ec09b5ae1ac5e5c/third_party/WebKit/LayoutTests/svg/hittest/text-small-font-size-expected.txt
[add] https://crrev.com/d44cc5eb0dd3240a5feef91f4ec09b5ae1ac5e5c/third_party/WebKit/LayoutTests/svg/hittest/text-small-font-size.html
[modify] https://crrev.com/d44cc5eb0dd3240a5feef91f4ec09b5ae1ac5e5c/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp

Comment 3 by f...@opera.com, Apr 9 2016

Owner: f...@opera.com
Status: Fixed (was: Available)
My issue is marked as fixed, but I don't know in which version and when I'm supposed to have my example work properly. In my Chrome version 50.0.2661.94 m it still doesn't work.

Comment 5 by f...@opera.com, May 4 2016

The fix is in 52 (just barely missed 51)

Sign in to add a comment