Omit default value when serializing font-feature-settings
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Apr 2018 12:08:45 +0000 (12:08 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Apr 2018 12:08:45 +0000 (12:08 +0000)
commit72305a9debd3a9266c2ecadb71dd673474914d63
tree079fddb2db515eac044782ed0fa7798ab9d8d566
parentfaaec8cfb216e11235a4af780a826061f440eb01
Omit default value when serializing font-feature-settings
https://bugs.webkit.org/show_bug.cgi?id=182382

Patch by Chris Nardi <cnardi@chromium.org> on 2018-04-20
Reviewed by Myles C. Maxfield.

Source/WebCore:

According to the shortest-serialization principle [1], values should be omitted if their omission
wouldn't change the value of reparsing. As "1"/"on" is the default value for font-feature-settings,
omit this when serializing, matching the behavior of Firefox and Chrome.

[1]: https://github.com/w3c/csswg-drafts/issues/1564

Updated css3/font-feature-settings-parsing.html, fast/css/inherited-properties-rare-text.html,
and fast/text/font-face-javascript.html.

* css/CSSFontFeatureValue.cpp:
(WebCore::CSSFontFeatureValue::customCSSText const):

LayoutTests:

Update tests to omit default value when serializing.

* css3/font-feature-settings-parsing-expected.txt:
* css3/font-feature-settings-parsing.html:
* fast/css/inherited-properties-rare-text-expected.txt:
* fast/text/font-face-javascript-expected.txt:
* fast/text/font-face-javascript.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/font-feature-settings-parsing-expected.txt
LayoutTests/css3/font-feature-settings-parsing.html
LayoutTests/fast/css/inherited-properties-rare-text-expected.txt
LayoutTests/fast/text/font-face-javascript-expected.txt
LayoutTests/fast/text/font-face-javascript.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSFontFeatureValue.cpp