Skip to content
Permalink
Browse files
[css-align][css-grid] Overflow alignment value 'true' renamed to 'uns…
…afe'

https://bugs.webkit.org/show_bug.cgi?id=152251

Source/WebCore:

Reviewed by Darin Adler.

The 'True' Overflow Alignment keyword is now defined in the Box Alignment
specification as 'Unsafe'.

This patch applies the required changes in the CSS parsing logic, as well
Grid Layout specific codebase, so it complies with the last version of the
spec.

No new tests, no change in functionality.

* css/CSSParser.cpp:
(WebCore::isAlignmentOverflowKeyword):
(WebCore::CSSParser::parseItemPositionOverflowPosition):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator OverflowAlignment):
* css/CSSValueKeywords.in:
* rendering/RenderGrid.cpp:
(WebCore::computeOverflowAlignmentOffset):
* rendering/style/RenderStyleConstants.h:

LayoutTests:

The 'True' Overflow Alignment keyword is known now as 'Unsafe', so adapting
layout tests using such keyword.

Reviewed by Darin Adler.

* css3/overwrite-content-alignment-expected.txt:
* css3/overwrite-content-alignment.html:
* css3/overwrite-self-alignment-expected.txt:
* css3/overwrite-self-alignment.html:
* css3/parse-align-content-expected.txt:
* css3/parse-align-content.html:
* css3/parse-align-items-expected.txt:
* css3/parse-align-items.html:
* css3/parse-align-self-expected.txt:
* css3/parse-align-self.html:
* css3/parse-justify-content-expected.txt:
* css3/parse-justify-content.html:
* fast/css-grid-layout/grid-align-justify-overflow.html:
* fast/css-grid-layout/grid-content-alignment-overflow.html:
* 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:


Canonical link: https://commits.webkit.org/170411@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
javifernandez committed Dec 15, 2015
1 parent e46e242 commit 1438746432f0001813fc0a56b48d78637a154c86
Showing with 382 additions and 326 deletions.
  1. +29 −0 LayoutTests/ChangeLog
  2. +1 −1 LayoutTests/css3/overwrite-content-alignment-expected.txt
  3. +2 −2 LayoutTests/css3/overwrite-content-alignment.html
  4. +1 −1 LayoutTests/css3/overwrite-self-alignment-expected.txt
  5. +3 −3 LayoutTests/css3/overwrite-self-alignment.html
  6. +12 −12 LayoutTests/css3/parse-align-content-expected.txt
  7. +48 −48 LayoutTests/css3/parse-align-content.html
  8. +11 −11 LayoutTests/css3/parse-align-items-expected.txt
  9. +34 −34 LayoutTests/css3/parse-align-items.html
  10. +11 −11 LayoutTests/css3/parse-align-self-expected.txt
  11. +34 −34 LayoutTests/css3/parse-align-self.html
  12. +12 −12 LayoutTests/css3/parse-justify-content-expected.txt
  13. +46 −46 LayoutTests/css3/parse-justify-content.html
  14. +11 −11 LayoutTests/fast/css-grid-layout/grid-align-justify-overflow.html
  15. +8 −8 LayoutTests/fast/css-grid-layout/grid-content-alignment-overflow.html
  16. +11 −11 LayoutTests/fast/css/parse-justify-items-expected.txt
  17. +34 −34 LayoutTests/fast/css/parse-justify-items.html
  18. +4 −4 LayoutTests/fast/css/parse-justify-self-expected.txt
  19. +27 −27 LayoutTests/fast/css/parse-justify-self.html
  20. +1 −1 LayoutTests/fast/repaint/align-items-overflow-change.html
  21. +2 −2 LayoutTests/fast/repaint/align-self-overflow-change.html
  22. +1 −1 LayoutTests/fast/repaint/justify-items-overflow-change.html
  23. +2 −2 LayoutTests/fast/repaint/justify-self-overflow-change.html
  24. +27 −0 Source/WebCore/ChangeLog
  25. +2 −2 Source/WebCore/css/CSSParser.cpp
  26. +5 −5 Source/WebCore/css/CSSPrimitiveValueMappings.h
  27. +1 −1 Source/WebCore/css/CSSValueKeywords.in
  28. +1 −1 Source/WebCore/rendering/RenderGrid.cpp
  29. +1 −1 Source/WebCore/rendering/style/RenderStyleConstants.h
@@ -1,3 +1,32 @@
2015-12-15 Javier Fernandez <jfernandez@igalia.com>

[css-align][css-grid] Overflow alignment value 'true' renamed to 'unsafe'
https://bugs.webkit.org/show_bug.cgi?id=152251

The 'True' Overflow Alignment keyword is known now as 'Unsafe', so adapting
layout tests using such keyword.

Reviewed by Darin Adler.

* css3/overwrite-content-alignment-expected.txt:
* css3/overwrite-content-alignment.html:
* css3/overwrite-self-alignment-expected.txt:
* css3/overwrite-self-alignment.html:
* css3/parse-align-content-expected.txt:
* css3/parse-align-content.html:
* css3/parse-align-items-expected.txt:
* css3/parse-align-items.html:
* css3/parse-align-self-expected.txt:
* css3/parse-align-self.html:
* css3/parse-justify-content-expected.txt:
* css3/parse-justify-content.html:
* fast/css-grid-layout/grid-align-justify-overflow.html:
* fast/css-grid-layout/grid-content-alignment-overflow.html:
* 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:

2015-12-14 Ryan Haddad <ryanhaddad@apple.com>

Re-enabling passing test fast/viewport/ios/width-is-device-width.html, which was accidentally skipped with r194058.
@@ -3,7 +3,7 @@ Test overwriting justify-content and align-content works as expected
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS getComputedStyle(childOfDefaultParent, '').getPropertyValue('justify-content') is "flex-end true"
PASS getComputedStyle(childOfDefaultParent, '').getPropertyValue('justify-content') is "flex-end unsafe"
PASS getComputedStyle(childOfDefaultParent, '').getPropertyValue('align-content') is "center safe"
PASS getComputedStyle(childOfParentId, '').getPropertyValue('justify-content') is "space-between"
PASS getComputedStyle(childOfParentId, '').getPropertyValue('align-content') is "space-around"
@@ -5,7 +5,7 @@
}
.parent .child {
display: -webkit-flex;
justify-content: flex-end true;
justify-content: flex-end unsafe;
align-content: center safe;
}
#parentId .child {
@@ -25,7 +25,7 @@
description('Test overwriting justify-content and align-content works as expected');

var childOfDefaultParent = document.getElementById("childOfDefaultParent");
shouldBeEqualToString("getComputedStyle(childOfDefaultParent, '').getPropertyValue('justify-content')", "flex-end true");
shouldBeEqualToString("getComputedStyle(childOfDefaultParent, '').getPropertyValue('justify-content')", "flex-end unsafe");
shouldBeEqualToString("getComputedStyle(childOfDefaultParent, '').getPropertyValue('align-content')", "center safe");

var childOfParentId = document.getElementById("childOfParentId");
@@ -5,7 +5,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE

PASS getComputedStyle(parent, '').getPropertyValue('justify-items') is "center"
PASS getComputedStyle(parent, '').getPropertyValue('align-items') is "stretch"
PASS getComputedStyle(childOfDefaultParent, '').getPropertyValue('justify-self') is "flex-end true"
PASS getComputedStyle(childOfDefaultParent, '').getPropertyValue('justify-self') is "flex-end unsafe"
PASS getComputedStyle(childOfDefaultParent, '').getPropertyValue('align-self') is "flex-start safe"
PASS getComputedStyle(childOfParentId, '').getPropertyValue('justify-self') is "center"
PASS getComputedStyle(childOfParentId, '').getPropertyValue('align-self') is "stretch"
@@ -2,12 +2,12 @@
<style>
.parent {
display: -webkit-flex;
justify-items: flex-end true;
justify-items: flex-end unsafe;
align-items: flex-start safe;
}
.parent .child {
display: -webkit-flex;
justify-self: flex-end true;
justify-self: flex-end unsafe;
align-self: flex-start safe;
}
#parentId {
@@ -35,7 +35,7 @@
shouldBeEqualToString("getComputedStyle(parent, '').getPropertyValue('align-items')", "stretch");

var childOfDefaultParent = document.getElementById("childOfDefaultParent");
shouldBeEqualToString("getComputedStyle(childOfDefaultParent, '').getPropertyValue('justify-self')", "flex-end true");
shouldBeEqualToString("getComputedStyle(childOfDefaultParent, '').getPropertyValue('justify-self')", "flex-end unsafe");
shouldBeEqualToString("getComputedStyle(childOfDefaultParent, '').getPropertyValue('align-self')", "flex-start safe");

var childOfParentId = document.getElementById("childOfParentId");
@@ -18,22 +18,22 @@ PASS getComputedStyle(alignContentLeft, '').getPropertyValue('align-content') is
PASS getComputedStyle(alignContentRight, '').getPropertyValue('align-content') is "right"
PASS getComputedStyle(alignContentFlexStart, '').getPropertyValue('align-content') is "flex-start"
PASS getComputedStyle(alignContentFlexEnd, '').getPropertyValue('align-content') is "flex-end"
PASS getComputedStyle(alignContentEndTrue, '').getPropertyValue('align-content') is "end true"
PASS getComputedStyle(alignContentCenterTrue, '').getPropertyValue('align-content') is "center true"
PASS getComputedStyle(alignContentEndUnsafe, '').getPropertyValue('align-content') is "end unsafe"
PASS getComputedStyle(alignContentCenterUnsafe, '').getPropertyValue('align-content') is "center unsafe"
PASS getComputedStyle(alignContentRightSafe, '').getPropertyValue('align-content') is "right safe"
PASS getComputedStyle(alignContentLeftTrue, '').getPropertyValue('align-content') is "left true"
PASS getComputedStyle(alignContentFlexStartTrue, '').getPropertyValue('align-content') is "flex-start true"
PASS getComputedStyle(alignContentLeftUnsafe, '').getPropertyValue('align-content') is "left unsafe"
PASS getComputedStyle(alignContentFlexStartUnsafe, '').getPropertyValue('align-content') is "flex-start unsafe"
PASS getComputedStyle(alignContentFlexEndSafe, '').getPropertyValue('align-content') is "flex-end safe"
PASS getComputedStyle(alignContentSpaceBetweenLeft, '').getPropertyValue('align-content') is "space-between left"
PASS getComputedStyle(alignContentSpaceAroundCenter, '').getPropertyValue('align-content') is "space-around center"
PASS getComputedStyle(alignContentSpaceEvenlyRight, '').getPropertyValue('align-content') is "space-evenly right"
PASS getComputedStyle(alignContentStretchStartSafe, '').getPropertyValue('align-content') is "stretch start safe"
PASS getComputedStyle(alignContentSpaceAroundEndTrue, '').getPropertyValue('align-content') is "space-around end true"
PASS getComputedStyle(alignContentSpaceAroundEndUnsafe, '').getPropertyValue('align-content') is "space-around end unsafe"
PASS getComputedStyle(alignContentSpaceEvenlyFlexStartSafe, '').getPropertyValue('align-content') is "space-evenly flex-start safe"
PASS getComputedStyle(alignContentSpaceBetweenSafe, '').getPropertyValue('align-content') is "start"
PASS getComputedStyle(alignContentSpaceBetweenStretch, '').getPropertyValue('align-content') is "start"
PASS getComputedStyle(alignContentSafe, '').getPropertyValue('align-content') is "start"
PASS getComputedStyle(alignContentRightSafeTrue, '').getPropertyValue('align-content') is "start"
PASS getComputedStyle(alignContentRightSafeUnsafe, '').getPropertyValue('align-content') is "start"
PASS getComputedStyle(alignContentCenterLeft, '').getPropertyValue('align-content') is "start"

Test initial value of align-content through JS
@@ -42,16 +42,16 @@ PASS getComputedStyle(element, '').getPropertyValue('align-content') is "start"
Test getting and setting align-content through JS
PASS element.style.alignContent is "center"
PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is "center"
PASS element.style.alignContent is "start true"
PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is "start true"
PASS element.style.alignContent is "start unsafe"
PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is "start unsafe"
PASS element.style.alignContent is "flex-end safe"
PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is "flex-end safe"
PASS element.style.alignContent is "space-between right safe"
PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is "space-between right safe"
PASS element.style.alignContent is "stretch center"
PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is "stretch center"
PASS element.style.alignContent is "right true"
PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is "right true"
PASS element.style.alignContent is "right unsafe"
PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is "right unsafe"
PASS element.style.alignContent is "auto"
PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is "start"
PASS element.style.alignContent is "auto"
@@ -118,8 +118,8 @@ PASS element.style.alignContent is "initial"
PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is "start"

Test the value 'initial' for flex containers
PASS element.style.alignContent is "right true"
PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is "right true"
PASS element.style.alignContent is "right unsafe"
PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is "right unsafe"
PASS element.style.alignContent is "initial"
PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is "stretch"

0 comments on commit 1438746

Please sign in to comment.