New issue
Advanced search Search tips

Issue 637310 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Compat



Sign in to add a comment

SVG <use> elements not reflecting changes to referenced element (class change)

Reported by mail.vi...@gmail.com, Aug 12 2016

Issue description

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

Example URL:
http://jsbin.com/yereraxoxe/edit?html,output

Steps to reproduce the problem:
1. On PC or Mac Chrome, navigate to the above JSBin example. It contains a real-world example of an SVG clip path filled with an image.
2. Hover over the image. The mouse cursor should change to a four-way move arrow, due to the CSS rule.
3. Click the image. The 'transform' style is removed from the DIV, so the cursor should immediately change back to a default arrow.

What is the expected behavior?
In step 3, cursor should immediately change back to a default arrow.

What went wrong?
In step 3, the cursor remains a four-way move arrow, even though the CSS rule that sets the move arrow no longer applies.

Does it occur on multiple sites: N/A

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 53.0.2785.57  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 22.0 r0

I have not been able to reproduce this issue in any other browser.

In Chrome Developer Tools, if you inspect the Computed value for the 'cursor' CSS property of the <image> element, before the click, it shows 'move', and after the click, it shows 'auto' as expected, but the cursor itself does not reflect this change.

The example is from a real document opened in a web-based WYSIWYG app; the incorrect cursor causes a major usability issue in Chrome.

The image has been base64-inlined for convenience, but the issue occurs even if the image is an external URL.
 

Comment 1 by f...@opera.com, Aug 15 2016

Components: Blink>SVG
Labels: -OS-Windows
Status: Available (was: Unconfirmed)
Summary: SVG <use> elements not reflecting changes to referenced element (class change) (was: Wrong cursor over SVG clip path filled with image, following class change)
This is similar to  issue 166438  or  issue 484552 . Replacing the <use> with the referenced <image> makes the problem go away - somehow indicating that style for the <use> shadow tree is not getting notified/updated when the class of the referenced element is changed/updated.

Simplified TC without interactivity required: https://jsfiddle.net/2qnLj2ot/
Owner: ericwilligers@chromium.org
Status: Started (was: Available)
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 19 2016

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

commit 98eafa054ec08b60ab06632b39c543982c20dfdc
Author: ericwilligers <ericwilligers@chromium.org>
Date: Fri Aug 19 04:25:49 2016

CSS: SVG use elements replicate updates to style

When an SVG element's style is being updated, shadow instances created by <use> elements must also be updated.

We weren't previously propagating the change until the the next time the <use> element's style happened to be recalculated.

For example, this bug has been reported with style updates due to a pseudo-class change, a class change or a CSS animation.

BUG= 166438 , 355359 , 484552 , 637310 

Review-Url: https://codereview.chromium.org/2251073002
Cr-Commit-Position: refs/heads/master@{#413048}

[add] https://crrev.com/98eafa054ec08b60ab06632b39c543982c20dfdc/third_party/WebKit/LayoutTests/animations/css-animation-affects-use-elements-expected.html
[add] https://crrev.com/98eafa054ec08b60ab06632b39c543982c20dfdc/third_party/WebKit/LayoutTests/animations/css-animation-affects-use-elements.html
[add] https://crrev.com/98eafa054ec08b60ab06632b39c543982c20dfdc/third_party/WebKit/LayoutTests/animations/css-composite-animation-affects-use-elements-expected.html
[add] https://crrev.com/98eafa054ec08b60ab06632b39c543982c20dfdc/third_party/WebKit/LayoutTests/animations/css-composite-animation-affects-use-elements.html
[add] https://crrev.com/98eafa054ec08b60ab06632b39c543982c20dfdc/third_party/WebKit/LayoutTests/svg/css/use-replicates-changes-class-expected.html
[add] https://crrev.com/98eafa054ec08b60ab06632b39c543982c20dfdc/third_party/WebKit/LayoutTests/svg/css/use-replicates-changes-class.html
[add] https://crrev.com/98eafa054ec08b60ab06632b39c543982c20dfdc/third_party/WebKit/LayoutTests/svg/css/use-replicates-changes-inline-expected.html
[add] https://crrev.com/98eafa054ec08b60ab06632b39c543982c20dfdc/third_party/WebKit/LayoutTests/svg/css/use-replicates-changes-inline.html
[add] https://crrev.com/98eafa054ec08b60ab06632b39c543982c20dfdc/third_party/WebKit/LayoutTests/svg/css/use-replicates-changes-pseudo-expected.html
[add] https://crrev.com/98eafa054ec08b60ab06632b39c543982c20dfdc/third_party/WebKit/LayoutTests/svg/css/use-replicates-changes-pseudo.html
[modify] https://crrev.com/98eafa054ec08b60ab06632b39c543982c20dfdc/third_party/WebKit/Source/core/dom/Node.cpp
[modify] https://crrev.com/98eafa054ec08b60ab06632b39c543982c20dfdc/third_party/WebKit/Source/core/svg/SVGElement.cpp
[modify] https://crrev.com/98eafa054ec08b60ab06632b39c543982c20dfdc/third_party/WebKit/Source/core/svg/SVGElement.h

Status: Fixed (was: Started)
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 25 2016

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

commit 464a055cb87833a40d439b13ae4b8e560322a576
Author: fs <fs@opera.com>
Date: Thu Aug 25 08:17:31 2016

Simplify SMIL animation CSS property updates

After https://codereview.chromium.org/2251073002 we should no longer
need to walk any <use> instances "manually", since setNeedsStyleRecalc
does that already. This should also avoid the potential double-work
because of this.

TEST=svg/W3C-SVG-1.1/animate-elem-30-t.svg
TEST=svg/W3C-SVG-1.1/animate-elem-40-t.svg

BUG= 166438 , 355359 , 484552 , 637310 

Review-Url: https://codereview.chromium.org/2270363004
Cr-Commit-Position: refs/heads/master@{#414358}

[modify] https://crrev.com/464a055cb87833a40d439b13ae4b8e560322a576/third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp

Sign in to add a comment