Serialization of custom props in longhand should be "" not value of shorthand
Reported by
gwhi...@gmail.com,
Feb 1 2017
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 Steps to reproduce the problem: 1. Open https://jsfiddle.net/ok8uwunf/ 2. Look at value displayed in target element What is the expected behavior? The value should be "" since the variable substitution hasn't occurred What went wrong? It seems that Blink doesn't follow this line of the spec: "Pending-substitution values must be serialized as the empty string, if an API allows them to be observed." Since we are looking at specified style, this needs to be an empty string. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 55.0.2883.87 Channel: n/a OS Version: 10.0 Flash Version: Shockwave Flash 24.0 r0 Firefox: no repro Edge: no repro Webkit: Repro
,
Feb 1 2017
,
Feb 12 2017
,
Nov 27 2017
,
Dec 6 2017
,
Apr 4 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/84ddde74a06ce9722953405b94d720b36e3dccef commit 84ddde74a06ce9722953405b94d720b36e3dccef Author: Chris Nardi <cnardi@chromium.org> Date: Wed Apr 04 05:46:35 2018 [cssom] Do not serialize shorthands with pending-substitution values According to the spec [1], shorthands with pending-substitution values should be serialized as empty strings. Only shorthands which were specified with explicit var() references should be serialized to the original value. Update our implementation to match this. [1]: https://drafts.csswg.org/css-variables/#variables-in-shorthands Bug: 687653 Change-Id: Icb3acdcc88452a32077fe7f67ecc6c3614b4d91c Reviewed-on: https://chromium-review.googlesource.com/994734 Reviewed-by: Timothy Loh <timloh@chromium.org> Commit-Queue: Chris Nardi <cnardi@chromium.org> Cr-Commit-Position: refs/heads/master@{#547991} [delete] https://crrev.com/71d65441b6c5409be898a817066b60d063380aa9/third_party/WebKit/LayoutTests/external/wpt/css/css-variables/variable-definition-border-shorthand-serialize-expected.txt [delete] https://crrev.com/71d65441b6c5409be898a817066b60d063380aa9/third_party/WebKit/LayoutTests/external/wpt/css/css-variables/vars-border-shorthand-serialize-expected.txt [delete] https://crrev.com/71d65441b6c5409be898a817066b60d063380aa9/third_party/WebKit/LayoutTests/external/wpt/css/cssom/shorthand-serialization-expected.txt [modify] https://crrev.com/84ddde74a06ce9722953405b94d720b36e3dccef/third_party/WebKit/LayoutTests/fast/css/variables/longhand-pending-shorthand-substitution.html [modify] https://crrev.com/84ddde74a06ce9722953405b94d720b36e3dccef/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
,
Apr 5 2018
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by timloh@chromium.org
, Feb 1 2017