New issue
Advanced search Search tips

Issue 835855 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 825239
Owner: ----
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Changing CSS backgroundPosition within a custom element (WebComponent) stopped working correctily

Reported by micbu...@gmail.com, Apr 23 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36

Steps to reproduce the problem:
1. Go to : https://g200kg.github.io/webaudio-controls/2.0/sample1.html
2. Be sure the zoom is 100%, click and drag some knobs (they are custom elements v1 with CSS inside)
3. Zoom in or out: when you turn knobs, display is incorrect

What is the expected behavior?
The knobs (subimage of a big image/sprite) should turn in place. They do turn in place with other browsers or with Chrome 65.

What went wrong?
I don't know. I've tried this: http://jsbin.com/keqafoc/edit?html,js,console,output with the same sprite image used by knobs and it works correctly with chrome 66. I guess that something went bas with Chrome 66 when such a code is within a custom element.

Did this work before? Yes Chrome 65

Does this work in other browsers? Yes

Chrome version: 66.0.3359.117  Channel: stable
OS Version: OS X 10.12.6
Flash Version:
 
Cc: hongchan@chromium.org
Here's what it looks like with M66.
image.png
50.0 KB View Download
It specifically breaks at the zoom level of 110%.
Components: Blink>HTML>CustomElements Blink>CSS
Status: Available (was: Unconfirmed)
Developers are suspicious about the malfunction of "background-size" css property.

Comment 5 by micbu...@gmail.com, Apr 23 2018

error.png
926 KB View Download
Cc: chrishtr@chromium.org
Components: Blink>Paint
Status: Untriaged (was: Available)

Comment 8 by micbu...@gmail.com, Apr 23 2018

Removing / resetting this property fixed temporaly the bad behavior...

Comment 9 by micbu...@gmail.com, Apr 23 2018

If you try with https://mainline.i3s.unice.fr/AmpSim4/ where the knob sizes is 69 not 64 like in the previous example, you will see that removing background-size makes things worse. The value is computed in JS in the webaudiocontrols lib depending on the size of the sprite image, number of sprites and the sprite size. I used a console.log to print the values, they are correct and the behavior is ok on other browsers… Not on chrome 66. But the problem is related to these CSS properties, for sure.
Mergedinto: 825239
Status: Duplicate (was: Untriaged)
You're using a very tall skinny sprite map with % position calculations, which blows up any numerical error in computing positions. I'm working on a fix now, but avoiding regressing other cases is proving hard.

Comment 11 by gait...@gmail.com, Apr 24 2018

I have pushed a workaround which uses 'px' instead of '%' for URL of reproduce step. Please use https://g200kg.github.io/webaudio-controls/test20180305/sample1.html for checking if necessary.

Sign in to add a comment