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

Issue 616341 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Shorthand serialization should check for variable references in longhands

Project Member Reported by timloh@chromium.org, Jun 1 2016

Issue description

If any subproperty of a shorthand has been set to a variable reference, the shorthand should serialize as empty string. StylePropertySerializer::commonShorthandChecks needs to handle this case.

> $0.style.cssText = 'margin: 1px 2px; margin-top: var(--x);'
"margin: 1px 2px; margin-top: var(--x);"
> $0.style.margin
"var(--x) 2px 1px" (should be "")
> $0.style.cssText
"margin: var(--x) 2px 1px;" (should have all longhands separately)

Firefox handles the above case correctly.
 

Comment 1 by ramy...@samsung.com, Jun 22 2016

Owner: ramy...@samsung.com
Status: Assigned (was: Available)
Would like to work on this.
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 22 2016

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

commit 2d82848bccbc6dbd246cbc329401774f97f5fa1c
Author: ramya.v <ramya.v@samsung.com>
Date: Wed Jun 22 13:16:32 2016

Shorthand serialization should check for var in longhands.

If any subproperty of a shorthand has been set to a variable
reference, shorthand is serialized as empty string.

BUG= 616341 

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

[modify] https://crrev.com/2d82848bccbc6dbd246cbc329401774f97f5fa1c/third_party/WebKit/LayoutTests/fast/css/cssText-shorthand.html
[modify] https://crrev.com/2d82848bccbc6dbd246cbc329401774f97f5fa1c/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp

Comment 3 by ramy...@samsung.com, Jun 23 2016

Status: Fixed (was: Assigned)

Sign in to add a comment