New issue
Advanced search Search tips

Issue 827921 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Serialize the font property as a shorthand

Project Member Reported by cnardi@chromium.org, Apr 2 2018

Issue description

There is a comment in StylePropertySerializer on why the font property is not serialized as a shorthand, citing web-incompatibility, but all major browsers do the opposite and serialize as a shorthand. We should change to match the other browsers.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 3 2018

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

commit aa8304925672de76f13fcd46d49f305d98e636b6
Author: Chris Nardi <cnardi@chromium.org>
Date: Tue Apr 03 03:00:01 2018

Serialize font shorthand like any other shorthand

The font shorthand had a short-circuit in StylePropertySerializer, which
meant that it was never serialized as a shorthand for style.cssText,
citing reasons of web incompatibility. However, it appears that all
other major browsers serialize font as a shorthand instead of having
style.cssText expand to all properties. Remove this short-circuit to
match other browsers.

Bug:  827921 
Change-Id: I4d522b41a6153808b6b8dab17831afdd8315fdc3
Reviewed-on: https://chromium-review.googlesource.com/989834
Commit-Queue: Chris Nardi <cnardi@chromium.org>
Reviewed-by: Timothy Loh <timloh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547607}
[add] https://crrev.com/aa8304925672de76f13fcd46d49f305d98e636b6/third_party/WebKit/LayoutTests/external/wpt/css/cssom/font-shorthand-serialization.html
[modify] https://crrev.com/aa8304925672de76f13fcd46d49f305d98e636b6/third_party/WebKit/LayoutTests/external/wpt/css/cssom/serialize-variable-reference-expected.txt
[modify] https://crrev.com/aa8304925672de76f13fcd46d49f305d98e636b6/third_party/WebKit/LayoutTests/external/wpt/css/cssom/serialize-variable-reference.html
[modify] https://crrev.com/aa8304925672de76f13fcd46d49f305d98e636b6/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-style-whitelist-expected.txt
[modify] https://crrev.com/aa8304925672de76f13fcd46d49f305d98e636b6/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp

Status: Fixed (was: Started)

Sign in to add a comment