[css-align] Adapt self-alignment properties to the new baseline syntax
authorjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Mar 2017 22:01:11 +0000 (22:01 +0000)
committerjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Mar 2017 22:01:11 +0000 (22:01 +0000)
commitc05b2b335e3942cbf17d37e4d5a39a456a93534f
treeaaf974e97e24240048291d6984e81df04837a2f2
parent179afead67188569915e7f738f4e07dbdee9fb00
[css-align] Adapt self-alignment properties to the new baseline syntax
https://bugs.webkit.org/show_bug.cgi?id=170235

Reviewed by David Hyatt.

Source/WebCore:

The baseline-position syntax has changed recently, so we need to update
the CSS properties using the old syntax. This patch address only the
self-alignment (align-self and justify-self) and default-alignment
(align-items and justify-items).

The content-distribution properties (align-content and justify-content)
will be updated in a follow up patch.

The new baseline syntax is "[first | last ]? baseline" which implies
modifying the parsing and computed value logic.

There are several layout tests affected by this change, so I'll update
them accordingly.

No new tests, just added/modified some cases to the tests we already have using the new baseline values.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForItemPositionWithOverflowAlignment):
* css/CSSValueKeywords.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData):
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeBaselineKeyword):
(WebCore::consumeSelfPositionOverflowPosition):

LayoutTests:

Added new cases to the alignment properties parsing tests so that we can verify the new
baseline-alignment syntax is parsed as expected.
Additionally, I modified the tests so that they use the testharness format.

* css3/parse-align-items-expected.txt:
* css3/parse-align-items.html:
* css3/parse-align-self-expected.txt:
* css3/parse-align-self.html:
* css3/resources/alignment-parsing-utils-th.js:
(checkValues):
* fast/css/parse-justify-items-expected.txt:
* fast/css/parse-justify-items.html:
* fast/css/parse-justify-self-expected.txt:
* fast/css/parse-justify-self.html:
* fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js.
(checkValues):
(checkBadValues):
(checkInitialValues):
(checkInheritValues):
(checkLegacyValues):
(checkSupportedValues):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/css3/parse-align-items-expected.txt
LayoutTests/css3/parse-align-items.html
LayoutTests/css3/parse-align-self-expected.txt
LayoutTests/css3/parse-align-self.html
LayoutTests/css3/resources/alignment-parsing-utils-th.js
LayoutTests/fast/css/parse-justify-items-expected.txt
LayoutTests/fast/css/parse-justify-items.html
LayoutTests/fast/css/parse-justify-self-expected.txt
LayoutTests/fast/css/parse-justify-self.html
LayoutTests/fast/css/resources/alignment-parsing-utils-th.js [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/css/StyleBuilderConverter.h
Source/WebCore/css/parser/CSSPropertyParser.cpp