Commit 08ddbcb0 authored by Chris Nardi's avatar Chris Nardi Committed by Commit Bot

Serialize font-variation-settings with double-quotes

According to the CSSOM spec [1], all strings should be serialized with
double-quotes. The axis name in font-variation-settings was previously
serialized with single-quotes; change this to double-quotes to match
the spec and non-WebKit browsers.

[1]: https://drafts.csswg.org/cssom/#common-serializing-idioms

Bug: 806412
Change-Id: Ib0da551c2799a9dc4e273ac150972a7bd5c7a34f
Reviewed-on: https://chromium-review.googlesource.com/900843Reviewed-by: default avatarRune Lillesveen <futhark@chromium.org>
Commit-Queue: Chris Nardi <cnardi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534803}
parent 8aa9d3c3
var validWriteExpectations = [ "normal",
"'abcd' 1",
"'abcd' 0, 'efgh' 1",
"'abcd' 0.3, 'efgh' 1.4",
"'abcd' -1000, 'efgh' -10000",
"'abcd' 0.3, 'abcd' 0.4, 'abcd' 0.5, 'abcd' 0.6, 'abcd' 0.7" ];
'"abcd" 1',
'"abcd" 0, "efgh" 1',
'"abcd" 0.3, "efgh" 1.4',
'"abcd" -1000, "efgh" -10000',
'"abcd" 0.3, "abcd" 0.4, "abcd" 0.5, "abcd" 0.6, "abcd" 0.7' ];
var writeInvalidExpectations = ["none",
"'abc' 1",
......
......@@ -4,6 +4,7 @@
#include "core/css/CSSFontVariationValue.h"
#include "core/css/CSSMarkup.h"
#include "platform/wtf/text/StringBuilder.h"
namespace blink {
......@@ -15,9 +16,8 @@ CSSFontVariationValue::CSSFontVariationValue(const AtomicString& tag,
String CSSFontVariationValue::CustomCSSText() const {
StringBuilder builder;
builder.Append('\'');
builder.Append(tag_);
builder.Append("' ");
SerializeString(tag_, builder);
builder.Append(' ');
builder.AppendNumber(value_);
return builder.ToString();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment