New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 750220 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Not working on Chrome any more
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug-Regression



Sign in to add a comment

CSS style is corrupted after assigning it o element.style.cssText

Reported by jsnj...@gmail.com, Jul 28 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

Example URL:
https://jsnjack.github.io/style

Steps to reproduce the problem:
1. Open https://jsnjack.github.io/style
2. Try to reassign style for #container element (you can also see that the style is corrupted in the developer toolbar)

What is the expected behavior?
Style returned by element.style.cssText should be correct

What went wrong?
According to the https://developer.mozilla.org/en/docs/Web/CSS/CSS_Background_and_Borders/Using_CSS_multiple_backgrounds the background-color should be in the last "background". However, after passing style to the cssText, it is the first one.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: Version 60.0.3112.78 (Official Build) (64-bit)  Channel: n/a
OS Version: Fedora 26
Flash Version: Shockwave Flash 26.0 r0
 

Comment 1 by woxxom@gmail.com, Jul 28 2017

Broken in 45.0.2440.0
Bisect info: 335604 (good) - 335608 (bad)
https://chromium.googlesource.com/chromium/src/+log/be09337f..0488bc2e?pretty=fuller

Suspecting r335608 "Roll src/third_party/WebKit 07f3823:a463c65 (svn 197612:197616)"
Blink log: https://chromium.googlesource.com/chromium/blink/+log/07f3823..a463c65?pretty=fuller

In Blink log suspecting https://crrev.com/1183633002
"Rewrite and squash StylePropertySerializer::getLayeredShorthandValue."

Comment 2 by rbyers@chromium.org, Jul 28 2017

Components: -Blink Blink>CSS
Labels: -Type-Bug Hotlist-Interop Type-Bug-Regression
Owner: meade@chromium.org
Status: Untriaged (was: Unconfirmed)
Confirmed I get two yellow boxes in Firefox 54, Edge 15 and Safari 10, but only one in Chrome. I didn't dig into the test case at all, but I agree that https://crrev.com/1183633002 back from 2015 seems plausible.  Eddy, PTAL
Status: Assigned (was: Untriaged)
Labels: Update-Weekly
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 21 2017

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

commit ffc49c5aaee683112e525aa26f92043e8f9f51ab
Author: Eddy Mead <meade@chromium.org>
Date: Tue Nov 21 07:41:30 2017

Fix serialization bug for background shorthand.

The background color was appearing in both the 0th and the last layer,
instead of only the last layer, where it belongs.

Bug:  750220 
Change-Id: Iffb9734f6c05b1a95681eefcabbb1e14f8a8d70f
Reviewed-on: https://chromium-review.googlesource.com/780127
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: meade_UTC10 <meade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518168}
[modify] https://crrev.com/ffc49c5aaee683112e525aa26f92043e8f9f51ab/third_party/WebKit/LayoutTests/fast/css/background-serialize.html
[modify] https://crrev.com/ffc49c5aaee683112e525aa26f92043e8f9f51ab/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp

Comment 6 by meade@chromium.org, Nov 21 2017

Status: Fixed (was: Assigned)

Comment 7 by jsnj...@gmail.com, Nov 22 2017

Thanks for fixing it! In which Chrome version the fix is going to land? 

Comment 8 by woxxom@gmail.com, Nov 22 2017

Landed in 64.0.3275.0, not merged to any previous versions yet.

Comment 9 by jsnj...@gmail.com, Nov 22 2017

okay, thanks again!

Sign in to add a comment