Changeset 201498 in webkit
- Timestamp:
- May 30, 2016, 1:14:31 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 28 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/css3/flexbox/css-properties-expected.txt (modified) (3 diffs)
-
LayoutTests/css3/flexbox/css-properties.html (modified) (3 diffs)
-
LayoutTests/css3/parse-align-items-expected.txt (modified) (6 diffs)
-
LayoutTests/css3/parse-align-items.html (modified) (4 diffs)
-
LayoutTests/css3/parse-align-self-expected.txt (modified) (8 diffs)
-
LayoutTests/css3/parse-align-self.html (modified) (7 diffs)
-
LayoutTests/css3/parse-alignment-of-root-elements-expected.txt (added)
-
LayoutTests/css3/parse-alignment-of-root-elements.html (added)
-
LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt (modified) (1 diff)
-
LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt (modified) (1 diff)
-
LayoutTests/fast/css/parse-justify-items-expected.txt (modified) (6 diffs)
-
LayoutTests/fast/css/parse-justify-items.html (modified) (3 diffs)
-
LayoutTests/fast/css/parse-justify-self-expected.txt (modified) (3 diffs)
-
LayoutTests/fast/css/parse-justify-self.html (modified) (10 diffs)
-
LayoutTests/fast/css/resources/alignment-parsing-utils.js (modified) (1 diff)
-
LayoutTests/svg/css/getComputedStyle-basic-expected.txt (modified) (4 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/CSSComputedStyleDeclaration.cpp (modified) (4 diffs)
-
Source/WebCore/css/CSSParser.cpp (modified) (2 diffs)
-
Source/WebCore/css/CSSPrimitiveValueMappings.h (modified) (2 diffs)
-
Source/WebCore/css/CSSPropertyNames.in (modified) (1 diff)
-
Source/WebCore/css/StyleResolver.cpp (modified) (1 diff)
-
Source/WebCore/rendering/RenderBox.cpp (modified) (2 diffs)
-
Source/WebCore/rendering/RenderFlexibleBox.cpp (modified) (8 diffs)
-
Source/WebCore/rendering/RenderGrid.cpp (modified) (13 diffs)
-
Source/WebCore/rendering/style/RenderStyle.cpp (modified) (1 diff)
-
Source/WebCore/rendering/style/RenderStyle.h (modified) (2 diffs)
-
Source/WebCore/rendering/style/RenderStyleConstants.h (modified) (1 diff)
-
Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r201488 r201498 1 2016-05-30 Javier Fernandez <jfernandez@igalia.com> 2 3 [CSS Box Alignment] New CSS Value 'normal' for Self Alignment 4 https://bugs.webkit.org/show_bug.cgi?id=156254 5 6 Reviewed by Darin Adler. 7 8 Changes in the already defined tests for the alignment properties to 9 consider the new CSS value 'normal', which is the default for align-items 10 and the value to resolve 'auto' when there is no parent. 11 12 Added a new test to verify the Self-Alignment properties work as expected 13 with root elements. 14 15 * css3/flexbox/css-properties-expected.txt: 16 * css3/flexbox/css-properties.html: 17 * css3/parse-align-items-expected.txt: 18 * css3/parse-align-items.html: 19 * css3/parse-align-self-expected.txt: 20 * css3/parse-align-self.html: 21 * css3/parse-alignment-of-root-elements-expected.txt: Added. 22 * css3/parse-alignment-of-root-elements.html: Added. 23 * fast/css/getComputedStyle/computed-style-expected.txt: 24 * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: 25 * fast/css/parse-justify-items-expected.txt: 26 * fast/css/parse-justify-items.html: 27 * fast/css/parse-justify-self-expected.txt: 28 * fast/css/parse-justify-self.html: 29 * fast/css/resources/alignment-parsing-utils.js: 30 * svg/css/getComputedStyle-basic-expected.txt: 31 (checkBadValues): 32 * svg/css/getComputedStyle-basic-expected.txt: 33 1 34 2016-05-25 Skachkov Oleksandr <gskachkov@gmail.com> 2 35 -
trunk/LayoutTests/css3/flexbox/css-properties-expected.txt
r197503 r201498 30 30 PASS window.getComputedStyle(flexbox, null).webkitJustifyContent is "normal" 31 31 PASS flexbox.style.webkitAlignSelf is "" 32 PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is " start"33 PASS window.getComputedStyle(document.documentElement, null).webkitAlignSelf is " start"32 PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "normal" 33 PASS window.getComputedStyle(document.documentElement, null).webkitAlignSelf is "normal" 34 34 PASS flexbox.style.webkitAlignSelf is "" 35 PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is " start"35 PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "normal" 36 36 PASS flexbox.style.webkitAlignSelf is "auto" 37 PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is " start"37 PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "normal" 38 38 PASS flexbox.style.webkitAlignSelf is "flex-start" 39 39 PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "flex-start" … … 47 47 PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "baseline" 48 48 PASS flexbox.style.webkitAlignSelf is "" 49 PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is " start"50 PASS flexbox.style.webkitAlignItems is "" 51 PASS flexitem.style.webkitAlignSelf is "" 52 PASS window.getComputedStyle(flexbox, null).webkitAlignItems is " stretch"53 PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is " stretch"54 PASS flexbox.style.webkitAlignItems is "" 55 PASS flexitem.style.webkitAlignSelf is "" 56 PASS window.getComputedStyle(flexbox, null).webkitAlignItems is " stretch"57 PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is " stretch"58 PASS flexbox.style.webkitAlignItems is " auto"59 PASS flexitem.style.webkitAlignSelf is "" 60 PASS window.getComputedStyle(flexbox, null).webkitAlignItems is " stretch"61 PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is " stretch"49 PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "normal" 50 PASS flexbox.style.webkitAlignItems is "" 51 PASS flexitem.style.webkitAlignSelf is "" 52 PASS window.getComputedStyle(flexbox, null).webkitAlignItems is "normal" 53 PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "normal" 54 PASS flexbox.style.webkitAlignItems is "" 55 PASS flexitem.style.webkitAlignSelf is "" 56 PASS window.getComputedStyle(flexbox, null).webkitAlignItems is "normal" 57 PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "normal" 58 PASS flexbox.style.webkitAlignItems is "" 59 PASS flexitem.style.webkitAlignSelf is "" 60 PASS window.getComputedStyle(flexbox, null).webkitAlignItems is "normal" 61 PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "normal" 62 62 PASS flexbox.style.webkitAlignItems is "flex-start" 63 63 PASS flexitem.style.webkitAlignSelf is "" … … 77 77 PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "baseline" 78 78 PASS flexbox.style.webkitAlignItems is "" 79 PASS window.getComputedStyle(flexbox, null).webkitAlignItems is " stretch"80 PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is " stretch"81 PASS flexbox.style.webkitAlignItems is "" 82 PASS window.getComputedStyle(flexbox, null).webkitAlignItems is " auto"83 PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is " auto"79 PASS window.getComputedStyle(flexbox, null).webkitAlignItems is "normal" 80 PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "normal" 81 PASS flexbox.style.webkitAlignItems is "" 82 PASS window.getComputedStyle(flexbox, null).webkitAlignItems is "normal" 83 PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "normal" 84 84 PASS window.getComputedStyle(detachedFlexbox, null).webkitAlignSelf is "" 85 85 PASS window.getComputedStyle(detachedFlexItem, null).webkitAlignSelf is "" -
trunk/LayoutTests/css3/flexbox/css-properties.html
r197503 r201498 83 83 shouldBeEqualToString('flexbox.style.webkitAlignSelf', ''); 84 84 // The initial value is 'auto', which will be resolved depending on parent's style (except for the 'document' element). 85 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', ' start');86 shouldBeEqualToString('window.getComputedStyle(document.documentElement, null).webkitAlignSelf', ' start');85 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', 'normal'); 86 shouldBeEqualToString('window.getComputedStyle(document.documentElement, null).webkitAlignSelf', 'normal'); 87 87 88 88 flexbox.style.webkitAlignSelf = 'foo'; 89 89 shouldBeEqualToString('flexbox.style.webkitAlignSelf', ''); 90 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', ' start');90 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', 'normal'); 91 91 92 92 flexbox.style.webkitAlignSelf = 'auto'; 93 93 shouldBeEqualToString('flexbox.style.webkitAlignSelf', 'auto'); 94 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', ' start');94 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', 'normal'); 95 95 96 96 flexbox.style.webkitAlignSelf = 'flex-start'; … … 116 116 flexbox.style.webkitAlignSelf = ''; 117 117 shouldBeEqualToString('flexbox.style.webkitAlignSelf', ''); 118 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', ' start');118 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', 'normal'); 119 119 120 120 shouldBeEqualToString('flexbox.style.webkitAlignItems', ''); 121 121 shouldBeEqualToString('flexitem.style.webkitAlignSelf', ''); 122 // The initial value is 'auto', which will be resolved to ' stretch' in case of flexbox containers.123 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', ' stretch');124 shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', ' stretch');122 // The initial value is 'auto', which will be resolved to 'normal' in case of flexbox containers. 123 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', 'normal'); 124 shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', 'normal'); 125 125 126 126 flexbox.style.webkitAlignItems = 'foo'; 127 127 shouldBeEqualToString('flexbox.style.webkitAlignItems', ''); 128 128 shouldBeEqualToString('flexitem.style.webkitAlignSelf', ''); 129 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', 'stretch'); 130 shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', 'stretch'); 131 129 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', 'normal'); 130 shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', 'normal'); 131 132 // The 'auto' value is not valid for the align-items property. 132 133 flexbox.style.webkitAlignItems = 'auto'; 133 shouldBeEqualToString('flexbox.style.webkitAlignItems', ' auto');134 shouldBeEqualToString('flexbox.style.webkitAlignItems', ''); 134 135 shouldBeEqualToString('flexitem.style.webkitAlignSelf', ''); 135 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', ' stretch');136 shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', ' stretch');136 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', 'normal'); 137 shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', 'normal'); 137 138 138 139 flexbox.style.webkitAlignItems = 'flex-start'; … … 164 165 flexbox.style.webkitAlignItems = ''; 165 166 shouldBeEqualToString('flexbox.style.webkitAlignItems', ''); 166 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', ' stretch');167 shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', ' stretch');167 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', 'normal'); 168 shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', 'normal'); 168 169 169 170 flexbox.style.display = 'none'; 170 171 shouldBeEqualToString('flexbox.style.webkitAlignItems', ''); 171 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', ' auto');172 shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', ' auto');172 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', 'normal'); 173 shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', 'normal'); 173 174 flexbox.style.display = ''; 174 175 -
trunk/LayoutTests/css3/parse-align-items-expected.txt
r194104 r201498 27 27 28 28 Test initial value of align-items through JS 29 PASS getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is ' start'29 PASS getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is 'normal' 30 30 31 31 Test getting and setting align-items through JS … … 42 42 PASS element.style.webkitAlignItems is "self-start" 43 43 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "self-start" 44 PASS element.style.webkitAlignItems is " auto"45 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"46 PASS element.style.webkitAlignItems is " auto"47 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " stretch"48 PASS element.style.webkitAlignItems is " auto"49 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " stretch"44 PASS element.style.webkitAlignItems is "" 45 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 46 PASS element.style.webkitAlignItems is "" 47 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 48 PASS element.style.webkitAlignItems is "" 49 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 50 50 PASS element.style.webkitAlignItems is "self-end" 51 51 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "self-end" … … 53 53 Test bad combinations of align-items 54 54 PASS element.style.webkitAlignItems is "" 55 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"55 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 56 56 PASS element.style.webkitAlignItems is "" 57 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"57 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 58 58 PASS element.style.webkitAlignItems is "" 59 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"59 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 60 60 PASS element.style.webkitAlignItems is "" 61 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"61 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 62 62 PASS element.style.webkitAlignItems is "" 63 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"63 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 64 64 PASS element.style.webkitAlignItems is "" 65 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"65 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 66 66 PASS element.style.webkitAlignItems is "" 67 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"67 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 68 68 PASS element.style.webkitAlignItems is "" 69 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"69 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 70 70 PASS element.style.webkitAlignItems is "" 71 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"71 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 72 72 PASS element.style.webkitAlignItems is "" 73 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"73 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 74 74 PASS element.style.webkitAlignItems is "" 75 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"75 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 76 76 PASS element.style.webkitAlignItems is "" 77 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"77 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 78 78 PASS element.style.webkitAlignItems is "" 79 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"79 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 80 80 PASS element.style.webkitAlignItems is "" 81 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"81 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 82 82 PASS element.style.webkitAlignItems is "" 83 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"83 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 84 84 PASS element.style.webkitAlignItems is "" 85 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"85 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 86 86 PASS element.style.webkitAlignItems is "" 87 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"87 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 88 88 PASS element.style.webkitAlignItems is "" 89 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"89 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 90 90 PASS element.style.webkitAlignItems is "" 91 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"91 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 92 92 PASS element.style.webkitAlignItems is "" 93 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"93 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 94 94 PASS element.style.webkitAlignItems is "" 95 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"95 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 96 96 PASS element.style.webkitAlignItems is "" 97 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"97 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 98 98 PASS element.style.webkitAlignItems is "" 99 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"99 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 100 100 PASS element.style.webkitAlignItems is "" 101 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start" 101 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 102 PASS element.style.webkitAlignItems is "" 103 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 102 104 103 105 Test the value 'initial' … … 105 107 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "center" 106 108 PASS element.style.webkitAlignItems is "initial" 107 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " start"109 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 108 110 109 111 Test the value 'initial' for grid containers … … 111 113 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "left safe" 112 114 PASS element.style.webkitAlignItems is "initial" 113 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " stretch"115 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 114 116 115 117 Test the value 'initial' for flex containers … … 117 119 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "right unsafe" 118 120 PASS element.style.webkitAlignItems is "initial" 119 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is " stretch"121 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "normal" 120 122 121 123 Test the value 'inherit' -
trunk/LayoutTests/css3/parse-align-items.html
r200510 r201498 177 177 element = document.createElement("div"); 178 178 document.body.appendChild(element); 179 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-align-items')", "' start'");179 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-align-items')", "'normal'"); 180 180 181 181 debug(""); … … 201 201 checkValues(element, "webkitAlignItems", "-webkit-align-items", "self-start", "self-start"); 202 202 203 <!-- The 'auto' value is no valid for the align-items property. --> 204 element.style.webkitAlignItems = ""; 203 205 element.style.webkitAlignItems = "auto"; 204 checkValues(element, "webkitAlignItems", "-webkit-align-items", " auto", "start");206 checkValues(element, "webkitAlignItems", "-webkit-align-items", "", "normal"); 205 207 206 208 element.style.display = "-webkit-flex"; 207 209 element.style.webkitAlignItems = "auto"; 208 checkValues(element, "webkitAlignItems", "-webkit-align-items", " auto", "stretch");210 checkValues(element, "webkitAlignItems", "-webkit-align-items", "", "normal"); 209 211 210 212 element.style.display = "grid"; 211 213 element.style.webkitAlignItems = "auto"; 212 checkValues(element, "webkitAlignItems", "-webkit-align-items", " auto", "stretch");214 checkValues(element, "webkitAlignItems", "-webkit-align-items", "", "normal"); 213 215 214 216 element.style.webkitAlignItems = "self-end"; … … 220 222 document.body.appendChild(element); 221 223 224 checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "auto"); 222 225 checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "unsafe auto"); 223 226 checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "auto safe"); … … 248 251 debug("Test the value 'initial'"); 249 252 element.style.display = ""; 250 checkInitialValues(element, "webkitAlignItems", "-webkit-align-items", "center", " start");253 checkInitialValues(element, "webkitAlignItems", "-webkit-align-items", "center", "normal"); 251 254 252 255 debug(""); 253 256 debug("Test the value 'initial' for grid containers"); 254 element.style.display = " grid";255 checkInitialValues(element, "webkitAlignItems", "-webkit-align-items", "left safe", " stretch");257 element.style.display = "-webkit-grid"; 258 checkInitialValues(element, "webkitAlignItems", "-webkit-align-items", "left safe", "normal"); 256 259 257 260 debug(""); 258 261 debug("Test the value 'initial' for flex containers"); 259 262 element.style.display = "-webkit-flex"; 260 checkInitialValues(element, "webkitAlignItems", "-webkit-align-items", "right unsafe", " stretch");263 checkInitialValues(element, "webkitAlignItems", "-webkit-align-items", "right unsafe", "normal"); 261 264 262 265 debug(""); -
trunk/LayoutTests/css3/parse-align-self-expected.txt
r194104 r201498 27 27 28 28 Test initial value of align-self through JS 29 PASS getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is ' start'29 PASS getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is 'normal' 30 30 31 31 Test getting and setting align-self through JS … … 43 43 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "self-start" 44 44 PASS element.style.webkitAlignSelf is "auto" 45 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"45 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 46 46 PASS element.style.webkitAlignSelf is "auto" 47 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " stretch"47 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 48 48 PASS element.style.webkitAlignSelf is "auto" 49 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " stretch"49 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 50 50 PASS element.style.webkitAlignSelf is "self-end" 51 51 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "self-end" 52 52 53 Test 'auto' value resolution for the root node 54 PASS element.style.webkitAlignSelf is "auto" 55 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 56 53 57 Test bad combinations of align-self 54 58 PASS element.style.webkitAlignSelf is "" 55 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"59 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 56 60 PASS element.style.webkitAlignSelf is "" 57 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"61 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 58 62 PASS element.style.webkitAlignSelf is "" 59 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"63 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 60 64 PASS element.style.webkitAlignSelf is "" 61 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"65 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 62 66 PASS element.style.webkitAlignSelf is "" 63 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"67 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 64 68 PASS element.style.webkitAlignSelf is "" 65 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"69 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 66 70 PASS element.style.webkitAlignSelf is "" 67 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"71 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 68 72 PASS element.style.webkitAlignSelf is "" 69 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"73 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 70 74 PASS element.style.webkitAlignSelf is "" 71 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"75 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 72 76 PASS element.style.webkitAlignSelf is "" 73 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"77 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 74 78 PASS element.style.webkitAlignSelf is "" 75 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"79 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 76 80 PASS element.style.webkitAlignSelf is "" 77 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"81 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 78 82 PASS element.style.webkitAlignSelf is "" 79 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"83 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 80 84 PASS element.style.webkitAlignSelf is "" 81 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"85 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 82 86 PASS element.style.webkitAlignSelf is "" 83 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"87 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 84 88 PASS element.style.webkitAlignSelf is "" 85 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"89 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 86 90 PASS element.style.webkitAlignSelf is "" 87 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"91 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 88 92 PASS element.style.webkitAlignSelf is "" 89 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"93 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 90 94 PASS element.style.webkitAlignSelf is "" 91 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"95 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 92 96 PASS element.style.webkitAlignSelf is "" 93 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"97 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 94 98 PASS element.style.webkitAlignSelf is "" 95 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"99 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 96 100 PASS element.style.webkitAlignSelf is "" 97 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"101 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 98 102 PASS element.style.webkitAlignSelf is "" 99 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"103 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 100 104 PASS element.style.webkitAlignSelf is "" 101 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"105 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 102 106 103 107 Test the value 'initial' … … 105 109 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "center" 106 110 PASS element.style.webkitAlignSelf is "initial" 107 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " start"111 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 108 112 109 113 Test the value 'initial' for grid containers … … 111 115 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "left safe" 112 116 PASS element.style.webkitAlignSelf is "initial" 113 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " stretch"117 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 114 118 115 119 Test the value 'initial' for flex containers … … 117 121 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "right unsafe" 118 122 PASS element.style.webkitAlignSelf is "initial" 119 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " stretch"123 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 120 124 121 125 Test the value 'initial' for positioned elements … … 123 127 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "left" 124 128 PASS element.style.webkitAlignSelf is "initial" 125 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " auto"129 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 126 130 127 131 Test the value 'initial' for positioned elements in grid containers … … 129 133 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "right" 130 134 PASS element.style.webkitAlignSelf is "initial" 131 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " auto"135 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 132 136 133 137 Test the value 'initial' for positioned elements in grid containers … … 135 139 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "end" 136 140 PASS element.style.webkitAlignSelf is "initial" 137 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is " auto"141 PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "normal" 138 142 139 143 Test the value 'inherit' -
trunk/LayoutTests/css3/parse-align-self.html
r200510 r201498 61 61 #alignSelfSelfEndSafe { 62 62 -webkit-align-self: self-end safe; 63 }63 x} 64 64 65 65 #alignSelfSelfStartSafe { … … 176 176 element = document.createElement("div"); 177 177 document.body.appendChild(element); 178 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-align-self')", "' start'");178 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-align-self')", "'normal'"); 179 179 180 180 debug(""); … … 203 203 204 204 element.style.webkitAlignSelf = "auto"; 205 checkValues(element, "webkitAlignSelf", "-webkit-align-self", "auto", " start");205 checkValues(element, "webkitAlignSelf", "-webkit-align-self", "auto", "normal"); 206 206 207 207 container.style.display = "-webkit-flex"; 208 208 element.style.webkitAlignSelf = "auto"; 209 checkValues(element, "webkitAlignSelf", "-webkit-align-self", "auto", " stretch");209 checkValues(element, "webkitAlignSelf", "-webkit-align-self", "auto", "normal"); 210 210 211 211 container.style.display = "grid"; 212 212 element.style.webkitAlignSelf = "auto"; 213 checkValues(element, "webkitAlignSelf", "-webkit-align-self", "auto", " stretch");213 checkValues(element, "webkitAlignSelf", "-webkit-align-self", "auto", "normal"); 214 214 215 215 element.style.webkitAlignSelf = "self-end"; 216 216 checkValues(element, "webkitAlignSelf", "-webkit-align-self", "self-end", "self-end"); 217 218 debug(""); 219 debug("Test 'auto' value resolution for the root node"); 220 document.documentElement.style.webkitAlignSelf = "auto"; 221 checkValues(document.documentElement, "webkitAlignSelf", "-webkit-align-self", "auto", "normal"); 217 222 218 223 debug(""); … … 251 256 debug("Test the value 'initial'"); 252 257 container.style.display = ""; 253 checkInitialValues(element, "webkitAlignSelf", "-webkit-align-self", "center", " start");258 checkInitialValues(element, "webkitAlignSelf", "-webkit-align-self", "center", "normal"); 254 259 255 260 debug(""); 256 261 debug("Test the value 'initial' for grid containers"); 257 container.style.display = " grid";258 checkInitialValues(element, "webkitAlignSelf", "-webkit-align-self", "left safe", " stretch");262 container.style.display = "-webkit-grid"; 263 checkInitialValues(element, "webkitAlignSelf", "-webkit-align-self", "left safe", "normal"); 259 264 260 265 debug(""); 261 266 debug("Test the value 'initial' for flex containers"); 262 267 container.style.display = "-webkit-flex"; 263 checkInitialValues(element, "webkitAlignSelf", "-webkit-align-self", "right unsafe", " stretch");268 checkInitialValues(element, "webkitAlignSelf", "-webkit-align-self", "right unsafe", "normal"); 264 269 265 270 debug(""); … … 267 272 container.style.display = ""; 268 273 element.style.position = "absolute"; 269 checkInitialValues(element, "webkitAlignSelf", "-webkit-align-self", "left", " auto");274 checkInitialValues(element, "webkitAlignSelf", "-webkit-align-self", "left", "normal"); 270 275 271 276 debug(""); … … 273 278 container.style.display = "grid"; 274 279 element.style.position = "absolute"; 275 checkInitialValues(element, "webkitAlignSelf", "-webkit-align-self", "right", " auto");280 checkInitialValues(element, "webkitAlignSelf", "-webkit-align-self", "right", "normal"); 276 281 277 282 debug(""); … … 279 284 container.style.display = "-webkit-flex"; 280 285 element.style.position = "absolute"; 281 checkInitialValues(element, "webkitAlignSelf", "-webkit-align-self", "end", " auto");286 checkInitialValues(element, "webkitAlignSelf", "-webkit-align-self", "end", "normal"); 282 287 283 288 debug(""); -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
r200510 r201498 150 150 column-width: auto; 151 151 align-content: normal; 152 align-items: start;153 align-self: start;152 align-items: normal; 153 align-self: normal; 154 154 filter: none; 155 155 flex-direction: row; 156 156 flex-wrap: nowrap; 157 157 justify-content: normal; 158 justify-self: start;159 justify-items: start;158 justify-self: normal; 159 justify-items: normal; 160 160 -webkit-font-kerning: auto; 161 161 -webkit-font-smoothing: auto; -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
r200510 r201498 149 149 column-width: auto 150 150 align-content: normal 151 align-items: auto152 align-self: auto151 align-items: normal 152 align-self: normal 153 153 filter: none 154 154 flex-direction: row 155 155 flex-wrap: nowrap 156 156 justify-content: normal 157 justify-self: auto158 justify-items: auto157 justify-self: normal 158 justify-items: normal 159 159 -webkit-font-kerning: auto 160 160 -webkit-font-smoothing: auto -
trunk/LayoutTests/fast/css/parse-justify-items-expected.txt
r194104 r201498 33 33 34 34 Test initial value of justify-items through JS 35 PASS getComputedStyle(element, '').getPropertyValue('justify-items') is ' start'35 PASS getComputedStyle(element, '').getPropertyValue('justify-items') is 'normal' 36 36 37 37 Test getting and setting justify-items through JS … … 49 49 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "legacy left" 50 50 PASS element.style.justifyItems is "auto" 51 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"51 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 52 52 PASS element.style.justifyItems is "auto" 53 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " stretch"53 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 54 54 PASS element.style.justifyItems is "auto" 55 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "stretch" 56 PASS getComputedStyle(element, '').getPropertyValue('justify-items') is 'stretch' 57 PASS element.style.justifyItems is 'auto' 55 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 58 56 PASS element.style.justifyItems is "self-end" 59 57 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "self-end" … … 61 59 Test bad combinations of justify-items 62 60 PASS element.style.justifyItems is "" 63 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"61 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 64 62 PASS element.style.justifyItems is "" 65 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"63 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 66 64 PASS element.style.justifyItems is "" 67 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"65 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 68 66 PASS element.style.justifyItems is "" 69 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"67 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 70 68 PASS element.style.justifyItems is "" 71 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"69 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 72 70 PASS element.style.justifyItems is "" 73 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"71 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 74 72 PASS element.style.justifyItems is "" 75 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"73 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 76 74 PASS element.style.justifyItems is "" 77 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"75 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 78 76 PASS element.style.justifyItems is "" 79 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"77 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 80 78 PASS element.style.justifyItems is "" 81 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"79 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 82 80 PASS element.style.justifyItems is "" 83 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"81 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 84 82 PASS element.style.justifyItems is "" 85 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"83 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 86 84 PASS element.style.justifyItems is "" 87 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"85 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 88 86 PASS element.style.justifyItems is "" 89 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"87 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 90 88 PASS element.style.justifyItems is "" 91 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"89 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 92 90 PASS element.style.justifyItems is "" 93 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"91 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 94 92 PASS element.style.justifyItems is "" 95 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"93 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 96 94 PASS element.style.justifyItems is "" 97 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"95 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 98 96 PASS element.style.justifyItems is "" 99 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"97 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 100 98 PASS element.style.justifyItems is "" 101 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"99 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 102 100 PASS element.style.justifyItems is "" 103 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"101 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 104 102 PASS element.style.justifyItems is "" 105 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"103 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 106 104 PASS element.style.justifyItems is "" 107 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"105 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 108 106 PASS element.style.justifyItems is "" 109 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"107 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 110 108 111 109 Test the value 'initial' 112 PASS element.style.justifyItems is " center"113 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " center"110 PASS element.style.justifyItems is "legacy center" 111 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "legacy center" 114 112 PASS element.style.justifyItems is "initial" 115 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " start"113 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 116 114 117 115 Test the value 'initial' for grid containers … … 119 117 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "left safe" 120 118 PASS element.style.justifyItems is "initial" 121 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " stretch"119 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 122 120 123 121 Test the value 'initial' for flex containers … … 125 123 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "right unsafe" 126 124 PASS element.style.justifyItems is "initial" 127 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " stretch"125 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "normal" 128 126 129 127 Test the value 'inherit' … … 136 134 PASS element.style.justifyItems is "inherit" 137 135 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "left safe" 138 PASS element.style.justifyItems is " center unsafe"139 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " center unsafe"136 PASS element.style.justifyItems is "legacy center" 137 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "legacy center" 140 138 PASS element.style.justifyItems is "inherit" 141 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is " center unsafe"139 PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is "legacy center" 142 140 143 141 Test the value 'legacy' -
trunk/LayoutTests/fast/css/parse-justify-items.html
r200510 r201498 224 224 element = document.createElement("div"); 225 225 document.body.appendChild(element); 226 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-items')", "' start'");226 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-items')", "'normal'"); 227 227 228 228 debug(""); … … 249 249 250 250 element.style.justifyItems = "auto"; 251 checkValues(element, "justifyItems", "justify-items", "auto", " start");251 checkValues(element, "justifyItems", "justify-items", "auto", "normal"); 252 252 253 253 element.style.display = "flex"; 254 254 element.style.justifyItems = "auto"; 255 checkValues(element, "justifyItems", "justify-items", "auto", " stretch");255 checkValues(element, "justifyItems", "justify-items", "auto", "normal"); 256 256 257 257 element.style.display = "grid"; 258 258 element.style.justifyItems = "auto"; 259 checkValues(element, "justifyItems", "justify-items", "auto", "stretch"); 260 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-items')", "'stretch'"); 261 shouldBe("element.style.justifyItems", "'auto'"); 259 checkValues(element, "justifyItems", "justify-items", "auto", "normal"); 262 260 263 261 element.style.justifyItems = "self-end"; … … 297 295 debug("Test the value 'initial'"); 298 296 element.style.display = ""; 299 checkInitialValues(element, "justifyItems", "justify-items", " center", "start");297 checkInitialValues(element, "justifyItems", "justify-items", "legacy center", "normal"); 300 298 301 299 debug(""); 302 300 debug("Test the value 'initial' for grid containers"); 303 301 element.style.display = "grid"; 304 checkInitialValues(element, "justifyItems", "justify-items", "left safe", " stretch");302 checkInitialValues(element, "justifyItems", "justify-items", "left safe", "normal"); 305 303 306 304 debug(""); 307 305 debug("Test the value 'initial' for flex containers"); 308 element.style.display = " -webkit-flex";309 checkInitialValues(element, "justifyItems", "justify-items", "right unsafe", " stretch");306 element.style.display = "flex"; 307 checkInitialValues(element, "justifyItems", "justify-items", "right unsafe", "normal"); 310 308 311 309 debug(""); 312 310 debug("Test the value 'inherit'"); 313 parentElement = document.createElement("div");314 311 checkInheritValues("justifyItems", "justify-items", "end"); 315 312 checkInheritValues("justifyItems", "justify-items", "left safe"); 316 checkInheritValues("justifyItems", "justify-items", " center unsafe");313 checkInheritValues("justifyItems", "justify-items", "legacy center"); 317 314 318 315 debug(""); -
trunk/LayoutTests/fast/css/parse-justify-self-expected.txt
r194104 r201498 6 6 Test getting justify-self set through CSS 7 7 PASS getComputedStyle(justifySelfBaseline, '').getPropertyValue('justify-self') is 'baseline' 8 PASS getComputedStyle(justifySelfLastBaseline, '').getPropertyValue('justify-self') is 'last-baseline' 8 9 PASS getComputedStyle(justifySelfStretch, '').getPropertyValue('justify-self') is 'stretch' 9 10 PASS getComputedStyle(justifySelfStart, '').getPropertyValue('justify-self') is 'start' … … 14 15 PASS getComputedStyle(justifySelfLeft, '').getPropertyValue('justify-self') is 'left' 15 16 PASS getComputedStyle(justifySelfRight, '').getPropertyValue('justify-self') is 'right' 17 PASS getComputedStyle(justifySelfFlexStart, '').getPropertyValue('justify-self') is 'flex-start' 18 PASS getComputedStyle(justifySelfFlexEnd, '').getPropertyValue('justify-self') is 'flex-end' 16 19 PASS getComputedStyle(justifySelfEndUnsafe, '').getPropertyValue('justify-self') is 'end unsafe' 17 20 PASS getComputedStyle(justifySelfCenterUnsafe, '').getPropertyValue('justify-self') is 'center unsafe' … … 20 23 PASS getComputedStyle(justifySelfRightSafe, '').getPropertyValue('justify-self') is 'right safe' 21 24 PASS getComputedStyle(justifySelfLeftUnsafe, '').getPropertyValue('justify-self') is 'left unsafe' 25 PASS getComputedStyle(justifySelfFlexStartUnsafe, '').getPropertyValue('justify-self') is 'flex-start unsafe' 26 PASS getComputedStyle(justifySelfFlexEndSafe, '').getPropertyValue('justify-self') is 'flex-end safe' 22 27 23 28 Test initial value of justify-self through JS 24 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is ' start'29 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'normal' 25 30 26 31 Test getting and setting justify-self through JS 27 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'center' 28 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start unsafe' 29 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start' 32 PASS element.style.justifySelf is "center" 33 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "center" 34 PASS element.style.justifySelf is "start unsafe" 35 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "start unsafe" 36 PASS element.style.justifySelf is "flex-end safe" 37 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "flex-end safe" 38 PASS element.style.justifySelf is "right" 39 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "right" 40 PASS element.style.justifySelf is "center" 41 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "center" 42 PASS element.style.justifySelf is "self-start" 43 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "self-start" 44 PASS element.style.justifySelf is "auto" 45 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 46 PASS element.style.justifySelf is "auto" 47 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 48 PASS element.style.justifySelf is "auto" 49 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 50 PASS element.style.justifySelf is "self-end" 51 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "self-end" 30 52 31 53 Test bad combinations of justify-self 32 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start' 33 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start' 34 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start' 35 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start' 36 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start' 37 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start' 38 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start' 39 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start' 40 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start' 41 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start' 42 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start' 43 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start' 44 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start' 45 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start' 46 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start' 47 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start' 48 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start' 54 PASS element.style.justifySelf is "" 55 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 56 PASS element.style.justifySelf is "" 57 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 58 PASS element.style.justifySelf is "" 59 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 60 PASS element.style.justifySelf is "" 61 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 62 PASS element.style.justifySelf is "" 63 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 64 PASS element.style.justifySelf is "" 65 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 66 PASS element.style.justifySelf is "" 67 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 68 PASS element.style.justifySelf is "" 69 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 70 PASS element.style.justifySelf is "" 71 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 72 PASS element.style.justifySelf is "" 73 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 74 PASS element.style.justifySelf is "" 75 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 76 PASS element.style.justifySelf is "" 77 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 78 PASS element.style.justifySelf is "" 79 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 80 PASS element.style.justifySelf is "" 81 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 82 PASS element.style.justifySelf is "" 83 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 84 PASS element.style.justifySelf is "" 85 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 86 PASS element.style.justifySelf is "" 87 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 88 PASS element.style.justifySelf is "" 89 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 90 PASS element.style.justifySelf is "" 91 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 92 PASS element.style.justifySelf is "" 93 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 94 PASS element.style.justifySelf is "" 95 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 96 PASS element.style.justifySelf is "" 97 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 98 PASS element.style.justifySelf is "" 99 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 100 PASS element.style.justifySelf is "" 101 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 49 102 50 103 Test the value 'initial' 51 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'center' 52 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'start' 104 PASS element.style.justifySelf is "center" 105 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "center" 106 PASS element.style.justifySelf is "initial" 107 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 108 109 Test the value 'initial' for grid containers 110 PASS element.style.justifySelf is "left safe" 111 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "left safe" 112 PASS element.style.justifySelf is "initial" 113 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 114 115 Test the value 'initial' for flex containers 116 PASS element.style.justifySelf is "right unsafe" 117 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "right unsafe" 118 PASS element.style.justifySelf is "initial" 119 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 120 121 Test the value 'initial' for positioned elements 122 PASS element.style.justifySelf is "left" 123 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "left" 124 PASS element.style.justifySelf is "initial" 125 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 126 127 Test the value 'initial' for positioned elements in grid containers 128 PASS element.style.justifySelf is "right" 129 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "right" 130 PASS element.style.justifySelf is "initial" 131 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 132 133 Test the value 'initial' for positioned elements in grid containers 134 PASS element.style.justifySelf is "end" 135 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "end" 136 PASS element.style.justifySelf is "initial" 137 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "normal" 53 138 54 139 Test the value 'inherit' 55 PASS getComputedStyle(parentElement, '').getPropertyValue('justify-self') is 'end' 56 PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'end' 140 PASS element.style.justifySelf is "end" 141 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "end" 142 PASS element.style.justifySelf is "inherit" 143 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "end" 144 PASS element.style.justifySelf is "left safe" 145 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "left safe" 146 PASS element.style.justifySelf is "inherit" 147 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "left safe" 148 PASS element.style.justifySelf is "center unsafe" 149 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "center unsafe" 150 PASS element.style.justifySelf is "inherit" 151 PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is "center unsafe" 57 152 PASS successfullyParsed is true 58 153 -
trunk/LayoutTests/fast/css/parse-justify-self.html
r194104 r201498 7 7 } 8 8 9 #justifySelfLastBaseline { 10 justify-self: last-baseline; 11 } 12 9 13 #justifySelfStretch { 10 14 justify-self: stretch; … … 39 43 } 40 44 45 #justifySelfFlexStart { 46 justify-self: flex-start; 47 } 48 49 #justifySelfFlexEnd { 50 justify-self: flex-end; 51 } 52 41 53 #justifySelfEndUnsafe { 42 54 justify-self: end unsafe; … … 61 73 #justifySelfLeftUnsafe { 62 74 justify-self: left unsafe; 75 } 76 77 #justifySelfFlexStartUnsafe { 78 justify-self: flex-start unsafe; 79 } 80 81 #justifySelfFlexEndSafe { 82 justify-self: flex-end safe; 63 83 } 64 84 </style> … … 67 87 <body> 68 88 <div id="justifySelfBaseline"></div> 89 <div id="justifySelfLastBaseline"></div> 69 90 <div id="justifySelfStretch"></div> 70 91 <div id="justifySelfStart"></div> … … 75 96 <div id="justifySelfLeft"></div> 76 97 <div id="justifySelfRight"></div> 98 <div id="justifySelfFlexStart"></div> 99 <div id="justifySelfFlexEnd"></div> 77 100 78 101 <div id="justifySelfEndUnsafe"></div> … … 82 105 <div id="justifySelfRightSafe"></div> 83 106 <div id="justifySelfLeftUnsafe"></div> 107 <div id="justifySelfFlexStartUnsafe"></div> 108 <div id="justifySelfFlexEndSafe"></div> 109 <script src="resources/alignment-parsing-utils.js"></script> 84 110 <script> 85 111 description('Test that setting and getting justify-self works as expected'); … … 89 115 shouldBe("getComputedStyle(justifySelfBaseline, '').getPropertyValue('justify-self')", "'baseline'"); 90 116 117 var justifySelfLastBaseline = document.getElementById("justifySelfLastBaseline"); 118 shouldBe("getComputedStyle(justifySelfLastBaseline, '').getPropertyValue('justify-self')", "'last-baseline'"); 119 91 120 var justifySelfStretch = document.getElementById("justifySelfStretch"); 92 121 shouldBe("getComputedStyle(justifySelfStretch, '').getPropertyValue('justify-self')", "'stretch'"); … … 113 142 shouldBe("getComputedStyle(justifySelfRight, '').getPropertyValue('justify-self')", "'right'"); 114 143 144 var justifySelfFlexStart = document.getElementById("justifySelfFlexStart"); 145 shouldBe("getComputedStyle(justifySelfFlexStart, '').getPropertyValue('justify-self')", "'flex-start'"); 146 147 var justifySelfFlexEnd = document.getElementById("justifySelfFlexEnd"); 148 shouldBe("getComputedStyle(justifySelfFlexEnd, '').getPropertyValue('justify-self')", "'flex-end'"); 149 115 150 var justifySelfEndUnsafe = document.getElementById("justifySelfEndUnsafe"); 116 151 shouldBe("getComputedStyle(justifySelfEndUnsafe, '').getPropertyValue('justify-self')", "'end unsafe'"); … … 130 165 var justifySelfLeftUnsafe = document.getElementById("justifySelfLeftUnsafe"); 131 166 shouldBe("getComputedStyle(justifySelfLeftUnsafe, '').getPropertyValue('justify-self')", "'left unsafe'"); 167 168 var justifySelfFlexStartUnsafe = document.getElementById("justifySelfFlexStartUnsafe"); 169 shouldBe("getComputedStyle(justifySelfFlexStartUnsafe, '').getPropertyValue('justify-self')", "'flex-start unsafe'"); 170 171 var justifySelfFlexEndSafe = document.getElementById("justifySelfFlexEndSafe"); 172 shouldBe("getComputedStyle(justifySelfFlexEndSafe, '').getPropertyValue('justify-self')", "'flex-end safe'"); 132 173 133 174 debug(""); … … 135 176 element = document.createElement("div"); 136 177 document.body.appendChild(element); 137 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "' start'");178 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'normal'"); 138 179 139 180 debug(""); 140 181 debug("Test getting and setting justify-self through JS"); 182 container = document.createElement("div"); 141 183 element = document.createElement("div"); 142 document.body.appendChild(element); 184 container.appendChild(element); 185 document.body.appendChild(container); 143 186 element.style.justifySelf = "center"; 144 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'center'"); 145 187 checkValues(element, "justifySelf", "justify-self", "center", "center"); 188 189 element.style.justifySelf = "unsafe start"; 190 checkValues(element, "justifySelf", "justify-self", "start unsafe", "start unsafe"); 191 192 element.style.justifySelf = "flex-end safe"; 193 checkValues(element, "justifySelf", "justify-self", "flex-end safe", "flex-end safe"); 194 195 element.style.justifySelf = "right"; 196 checkValues(element, "justifySelf", "justify-self", "right", "right"); 197 198 element.style.justifySelf = "center"; 199 checkValues(element, "justifySelf", "justify-self", "center", "center"); 200 201 element.style.justifySelf = "self-start"; 202 checkValues(element, "justifySelf", "justify-self", "self-start", "self-start"); 203 204 element.style.justifySelf = "auto"; 205 checkValues(element, "justifySelf", "justify-self", "auto", "normal"); 206 207 container.style.display = "flex"; 208 element.style.justifySelf = "auto"; 209 checkValues(element, "justifySelf", "justify-self", "auto", "normal"); 210 211 container.style.display = "grid"; 212 element.style.justifySelf = "auto"; 213 checkValues(element, "justifySelf", "justify-self", "auto", "normal"); 214 215 element.style.justifySelf = "self-end"; 216 checkValues(element, "justifySelf", "justify-self", "self-end", "self-end"); 217 218 debug(""); 219 debug("Test bad combinations of justify-self"); 220 container = document.createElement("div"); 146 221 element = document.createElement("div"); 147 document.body.appendChild(element); 148 element.style.justifySelf = "unsafe start"; 149 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start unsafe'"); 150 151 element.style.justifySelf = "start"; 152 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start'"); 153 154 debug(""); 155 debug("Test bad combinations of justify-self"); 156 element = document.createElement("div"); 157 document.body.appendChild(element); 158 element.style.justifySelf = "start left"; 159 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start'"); 160 161 element.style.justifySelf = "baseline safe"; 162 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start'"); 163 164 element.style.justifySelf = "baseline center"; 165 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start'"); 166 167 element.style.justifySelf = "stretch unsafe"; 168 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start'"); 169 170 element.style.justifySelf = "stretch right"; 171 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start'"); 172 173 element.style.justifySelf = "unsafe unsafe"; 174 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start'"); 175 176 element.style.justifySelf = "unsafe"; 177 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start'"); 178 179 element.style.justifySelf = "unsafe safe"; 180 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start'"); 181 182 element.style.justifySelf = "center start"; 183 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start'"); 184 185 element.style.justifySelf = "stretch unsafe"; 186 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start'"); 187 188 element.style.justifySelf = "safe stretch"; 189 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start'"); 190 191 element.style.justifySelf = "baseline safe"; 192 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start'"); 193 194 element.style.justifySelf = "unsafe baseline"; 195 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start'"); 196 197 element.style.justifySelf = "unsafe safe"; 198 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start'"); 199 200 element.style.justifySelf = "unsafe safe left"; 201 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start'"); 202 203 element.style.justifySelf = "unsafe left safe"; 204 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start'"); 205 206 element.style.justifySelf = "left safe unsafe safe"; 207 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start'"); 222 container.appendChild(element); 223 document.body.appendChild(container); 224 225 checkBadValues(element, "justifySelf", "justify-self", "unsafe auto"); 226 checkBadValues(element, "justifySelf", "justify-self", "auto safe"); 227 checkBadValues(element, "justifySelf", "justify-self", "auto left"); 228 checkBadValues(element, "justifySelf", "justify-self", "baseline safe"); 229 checkBadValues(element, "justifySelf", "justify-self", "baseline center"); 230 checkBadValues(element, "justifySelf", "justify-self", "stretch unsafe"); 231 checkBadValues(element, "justifySelf", "justify-self", "stretch right"); 232 checkBadValues(element, "justifySelf", "justify-self", "unsafe unsafe"); 233 checkBadValues(element, "justifySelf", "justify-self", "unsafe safe"); 234 checkBadValues(element, "justifySelf", "justify-self", "center start"); 235 checkBadValues(element, "justifySelf", "justify-self", "stretch unsafe"); 236 checkBadValues(element, "justifySelf", "justify-self", "safe stretch"); 237 checkBadValues(element, "justifySelf", "justify-self", "baseline safe"); 238 checkBadValues(element, "justifySelf", "justify-self", "unsafe baseline"); 239 checkBadValues(element, "justifySelf", "justify-self", "unsafe safe left"); 240 checkBadValues(element, "justifySelf", "justify-self", "unsafe left safe"); 241 checkBadValues(element, "justifySelf", "justify-self", "left safe unsafe safe"); 242 checkBadValues(element, "justifySelf", "justify-self", "legacy start"); 243 checkBadValues(element, "justifySelf", "justify-self", "legacy end"); 244 checkBadValues(element, "justifySelf", "justify-self", "legacy right unsafe"); 245 checkBadValues(element, "justifySelf", "justify-self", "legacy auto"); 246 checkBadValues(element, "justifySelf", "justify-self", "legacy stretch"); 247 checkBadValues(element, "justifySelf", "justify-self", "legacy"); 248 checkBadValues(element, "justifySelf", "justify-self", "legacy left right"); 208 249 209 250 debug(""); 210 251 debug("Test the value 'initial'"); 211 element.style.justifySelf = "center"; 212 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'center'"); 213 element.style.justifySelf = "initial"; 214 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'start'"); 252 container.style.display = ""; 253 checkInitialValues(element, "justifySelf", "justify-self", "center", "normal"); 254 255 debug(""); 256 debug("Test the value 'initial' for grid containers"); 257 container.style.display = "grid"; 258 checkInitialValues(element, "justifySelf", "justify-self", "left safe", "normal"); 259 260 debug(""); 261 debug("Test the value 'initial' for flex containers"); 262 container.style.display = "flex"; 263 checkInitialValues(element, "justifySelf", "justify-self", "right unsafe", "normal"); 264 265 debug(""); 266 debug("Test the value 'initial' for positioned elements"); 267 container.style.display = ""; 268 element.style.position = "absolute"; 269 checkInitialValues(element, "justifySelf", "justify-self", "left", "normal"); 270 271 debug(""); 272 debug("Test the value 'initial' for positioned elements in grid containers"); 273 container.style.display = "grid"; 274 element.style.position = "absolute"; 275 checkInitialValues(element, "justifySelf", "justify-self", "right", "normal"); 276 277 debug(""); 278 debug("Test the value 'initial' for positioned elements in grid containers"); 279 container.style.display = "flex"; 280 element.style.position = "absolute"; 281 checkInitialValues(element, "justifySelf", "justify-self", "end", "normal"); 215 282 216 283 debug(""); 217 284 debug("Test the value 'inherit'"); 218 parentElement = document.createElement("div"); 219 document.body.appendChild(parentElement); 220 parentElement.style.justifySelf = "end"; 221 shouldBe("getComputedStyle(parentElement, '').getPropertyValue('justify-self')", "'end'"); 222 223 element = document.createElement("div"); 224 parentElement.appendChild(element); 225 element.style.justifySelf = "inherit"; 226 shouldBe("getComputedStyle(element, '').getPropertyValue('justify-self')", "'end'"); 285 checkInheritValues("justifySelf", "justify-self", "end"); 286 checkInheritValues("justifySelf", "justify-self", "left safe"); 287 checkInheritValues("justifySelf", "justify-self", "center unsafe"); 288 227 289 </script> 228 290 </body> -
trunk/LayoutTests/fast/css/resources/alignment-parsing-utils.js
r182613 r201498 9 9 function checkBadValues(element, property, propertyID, value) 10 10 { 11 var elementID = element.id || "element"; 12 var initialValue = eval("window.getComputedStyle(" + elementID + " , '').getPropertyValue('" + propertyID + "')"); 11 13 element.style[property] = value; 12 checkValues(element, property, propertyID, "", "start");14 checkValues(element, property, propertyID, "", initialValue); 13 15 } 14 16 -
trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
r200510 r201498 297 297 rect: style.getPropertyValue(align-content) : normal 298 298 rect: style.getPropertyCSSValue(align-content) : [object CSSValueList] 299 rect: style.getPropertyValue(align-items) : start299 rect: style.getPropertyValue(align-items) : normal 300 300 rect: style.getPropertyCSSValue(align-items) : [object CSSValueList] 301 rect: style.getPropertyValue(align-self) : start301 rect: style.getPropertyValue(align-self) : normal 302 302 rect: style.getPropertyCSSValue(align-self) : [object CSSValueList] 303 303 rect: style.getPropertyValue(filter) : none … … 309 309 rect: style.getPropertyValue(justify-content) : normal 310 310 rect: style.getPropertyCSSValue(justify-content) : [object CSSValueList] 311 rect: style.getPropertyValue(justify-self) : start311 rect: style.getPropertyValue(justify-self) : normal 312 312 rect: style.getPropertyCSSValue(justify-self) : [object CSSValueList] 313 rect: style.getPropertyValue(justify-items) : start313 rect: style.getPropertyValue(justify-items) : normal 314 314 rect: style.getPropertyCSSValue(justify-items) : [object CSSValueList] 315 315 rect: style.getPropertyValue(-webkit-font-kerning) : auto … … 831 831 g: style.getPropertyValue(align-content) : normal 832 832 g: style.getPropertyCSSValue(align-content) : [object CSSValueList] 833 g: style.getPropertyValue(align-items) : start833 g: style.getPropertyValue(align-items) : normal 834 834 g: style.getPropertyCSSValue(align-items) : [object CSSValueList] 835 g: style.getPropertyValue(align-self) : start835 g: style.getPropertyValue(align-self) : normal 836 836 g: style.getPropertyCSSValue(align-self) : [object CSSValueList] 837 837 g: style.getPropertyValue(filter) : none … … 843 843 g: style.getPropertyValue(justify-content) : normal 844 844 g: style.getPropertyCSSValue(justify-content) : [object CSSValueList] 845 g: style.getPropertyValue(justify-self) : start845 g: style.getPropertyValue(justify-self) : normal 846 846 g: style.getPropertyCSSValue(justify-self) : [object CSSValueList] 847 g: style.getPropertyValue(justify-items) : start847 g: style.getPropertyValue(justify-items) : normal 848 848 g: style.getPropertyCSSValue(justify-items) : [object CSSValueList] 849 849 g: style.getPropertyValue(-webkit-font-kerning) : auto -
trunk/Source/WebCore/ChangeLog
r201497 r201498 1 2016-05-30 Javier Fernandez <jfernandez@igalia.com> 2 3 [CSS Box Alignment] New CSS Value 'normal' for Self Alignment 4 https://bugs.webkit.org/show_bug.cgi?id=156254 5 6 Reviewed by Darin Adler. 7 8 The Box Alignment specification defines a new value 'normal' to be used 9 as default for the different layout models, which will define the 10 specific behavior for each case. This patch adds a new CSS value in the 11 parsing logic and adapts the Self Alignment properties to the new 12 value. 13 14 The 'auto' value is no longer valid for the 'align-items' property and 15 the Computed Value will be always the specified value. Hence, I removed 16 the StyleResolver logic because is not required now; the specific 17 behavior of the 'normal' value will be resolved at layout time. 18 19 Additionally, this patch updates the layout logic as well, for both 20 Flexbox and Grid layout models. 21 22 Test: css3/parse-alignment-of-root-elements.html 23 24 * css/CSSComputedStyleDeclaration.cpp: 25 (WebCore::resolveLegacyJustifyItems): Added. 26 (WebCore::resolveJustifyItemsAuto): Added. 27 (WebCore::resolveJustifySelfAuto): Added. 28 (WebCore::resolveAlignSelfAuto): Added. 29 (WebCore::valueForItemPositionWithOverflowAlignment): Using a StyleSelfAlignmentData argument. 30 (WebCore::ComputedStyleExtractor::propertyValue): Using the new resolving functions. 31 * css/CSSParser.cpp: 32 (WebCore::CSSParser::parseItemPositionOverflowPosition): A new value 'normal' is now valid. 33 * css/CSSPrimitiveValueMappings.h: 34 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Mappings for the new value 'normal'. 35 (WebCore::CSSPrimitiveValue::operator ItemPosition): Mappings for the new value 'normal'. 36 * css/CSSPropertyNames.in: 37 * css/StyleResolver.cpp: 38 (WebCore::StyleResolver::adjustRenderStyle): We don't need to resolve 'legacy" keyword. 39 * rendering/RenderBox.cpp: 40 (WebCore::flexItemHasStretchAlignment): 41 (WebCore::RenderBox::hasStretchedLogicalWidth): 42 * rendering/RenderFlexibleBox.cpp: 43 (WebCore::RenderFlexibleBox::styleDidChange): 44 (WebCore::RenderFlexibleBox::alignmentForChild): 45 (WebCore::contentAlignmentNormalBehaviorFlexibleBox): 46 (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): 47 (WebCore::RenderFlexibleBox::layoutColumnReverse): 48 (WebCore::RenderFlexibleBox::alignFlexLines): 49 (WebCore::RenderFlexibleBox::alignChildren): 50 * rendering/RenderGrid.cpp: 51 (WebCore::defaultAlignmentChangedToStretchInRowAxis): 52 (WebCore::defaultAlignmentChangedFromStretchInRowAxis): 53 (WebCore::defaultAlignmentChangedFromStretchInColumnAxis): 54 (WebCore::selfAlignmentChangedToStretchInRowAxis): 55 (WebCore::selfAlignmentChangedFromStretchInRowAxis): 56 (WebCore::selfAlignmentChangedFromStretchInColumnAxis): 57 (WebCore::contentAlignmentNormalBehaviorGrid): 58 (WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded): 59 (WebCore::RenderGrid::needToStretchChildLogicalHeight): 60 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded): 61 (WebCore::RenderGrid::columnAxisPositionForChild): 62 (WebCore::RenderGrid::rowAxisPositionForChild): 63 (WebCore::RenderGrid::columnAxisOffsetForChild): 64 (WebCore::RenderGrid::rowAxisOffsetForChild): 65 (WebCore::RenderGrid::computeContentPositionAndDistributionOffset): 66 * rendering/style/RenderStyle.cpp: 67 (WebCore::resolvedSelfAlignment): 68 (WebCore::RenderStyle::resolvedAlignItems): 69 (WebCore::RenderStyle::resolvedAlignSelf): 70 (WebCore::RenderStyle::resolvedJustifyItems): 71 (WebCore::RenderStyle::resolvedJustifySelf): 72 * rendering/style/RenderStyle.h: 73 * rendering/style/RenderStyleConstants.h: 74 * rendering/style/StyleRareNonInheritedData.cpp: 75 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): align-items uses now a different initial function. 76 1 77 2016-05-29 Brady Eidson <beidson@apple.com> 2 78 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r201290 r201498 2276 2276 } 2277 2277 2278 static ItemPosition resolveContainerAlignmentAuto(ItemPosition position, RenderObject* element) 2279 { 2280 if (position != ItemPositionAuto || !element) 2281 return position; 2282 2283 return element->style().isDisplayFlexibleOrGridBox() ? ItemPositionStretch : ItemPositionStart; 2284 } 2285 2286 static ItemPosition resolveSelfAlignmentAuto(ItemPosition position, OverflowAlignment& overflow, RenderObject* element) 2287 { 2288 if (position != ItemPositionAuto || !element || element->isOutOfFlowPositioned()) 2289 return position; 2290 2291 RenderBlock* parent = element->containingBlock(); 2292 if (!parent) 2293 return ItemPositionStart; 2294 2295 overflow = parent->style().alignItemsOverflowAlignment(); 2296 return resolveContainerAlignmentAuto(parent->style().alignItemsPosition(), parent); 2278 static StyleSelfAlignmentData resolveLegacyJustifyItems(const StyleSelfAlignmentData& data) 2279 { 2280 if (data.positionType() == LegacyPosition) 2281 return { data.position(), OverflowAlignmentDefault }; 2282 return data; 2283 } 2284 2285 static StyleSelfAlignmentData resolveJustifyItemsAuto(const StyleSelfAlignmentData& data, Node* parent) 2286 { 2287 if (data.position() != ItemPositionAuto) 2288 return data; 2289 2290 // If the inherited value of justify-items includes the 'legacy' keyword, 'auto' computes to the inherited value. 2291 const auto& inheritedValue = (!parent || !parent->computedStyle()) ? RenderStyle::initialDefaultAlignment() : parent->computedStyle()->justifyItems(); 2292 if (inheritedValue.positionType() == LegacyPosition) 2293 return inheritedValue; 2294 if (inheritedValue.position() == ItemPositionAuto) 2295 return resolveJustifyItemsAuto(inheritedValue, parent->parentNode()); 2296 return { ItemPositionNormal, OverflowAlignmentDefault }; 2297 } 2298 2299 static StyleSelfAlignmentData resolveJustifySelfAuto(const StyleSelfAlignmentData& data, Node* parent) 2300 { 2301 if (data.position() != ItemPositionAuto) 2302 return data; 2303 2304 // The 'auto' keyword computes to the computed value of justify-items on the parent or 'normal' if the box has no parent. 2305 if (!parent || !parent->computedStyle()) 2306 return { ItemPositionNormal, OverflowAlignmentDefault }; 2307 return resolveLegacyJustifyItems(resolveJustifyItemsAuto(parent->computedStyle()->justifyItems(), parent->parentNode())); 2308 } 2309 2310 static StyleSelfAlignmentData resolveAlignSelfAuto(const StyleSelfAlignmentData& data, Node* parent) 2311 { 2312 if (data.position() != ItemPositionAuto) 2313 return data; 2314 2315 // The 'auto' keyword computes to the computed value of align-items on the parent or 'normal' if the box has no parent. 2316 if (!parent || !parent->computedStyle()) 2317 return { ItemPositionNormal, OverflowAlignmentDefault }; 2318 return parent->computedStyle()->alignItems(); 2297 2319 } 2298 2320 … … 2377 2399 #endif 2378 2400 2379 static Ref Ptr<CSSValueList> valueForItemPositionWithOverflowAlignment(ItemPosition itemPosition, OverflowAlignment overflowAlignment, ItemPositionType positionType)2401 static Ref<CSSValueList> valueForItemPositionWithOverflowAlignment(const StyleSelfAlignmentData& data) 2380 2402 { 2381 2403 auto& cssValuePool = CSSValuePool::singleton(); 2382 RefPtr<CSSValueList>result = CSSValueList::createSpaceSeparated();2383 if ( positionType== LegacyPosition)2384 result ->append(CSSPrimitiveValue::createIdentifier(CSSValueLegacy));2385 result ->append(cssValuePool.createValue(itemPosition));2386 if ( overflowAlignment!= OverflowAlignmentDefault)2387 result ->append(cssValuePool.createValue(overflowAlignment));2388 ASSERT(result ->length() <= 2);2404 auto result = CSSValueList::createSpaceSeparated(); 2405 if (data.positionType() == LegacyPosition) 2406 result.get().append(cssValuePool.createIdentifierValue(CSSValueLegacy)); 2407 result.get().append(cssValuePool.createValue(data.position())); 2408 if (data.position() >= ItemPositionCenter && data.overflow() != OverflowAlignmentDefault) 2409 result.get().append(cssValuePool.createValue(data.overflow())); 2410 ASSERT(result.get().length() <= 2); 2389 2411 return result; 2390 2412 } 2391 2413 2392 static RefPtr<CSSValueList> valueForContentPositionAndDistributionWithOverflowAlignment(const StyleContentAlignmentData& data) 2393 { 2394 RefPtr<CSSValueList> result = CSSValueList::createSpaceSeparated(); 2414 static Ref<CSSValueList> valueForContentPositionAndDistributionWithOverflowAlignment(const StyleContentAlignmentData& data) 2415 { 2416 auto& cssValuePool = CSSValuePool::singleton(); 2417 auto result = CSSValueList::createSpaceSeparated(); 2395 2418 if (data.distribution() != ContentDistributionDefault) 2396 result ->append(CSSPrimitiveValue::create(data.distribution()));2419 result.get().append(cssValuePool.createValue(data.distribution())); 2397 2420 if (data.distribution() == ContentDistributionDefault || data.position() != ContentPositionNormal) 2398 result ->append(CSSPrimitiveValue::create(data.position()));2421 result.get().append(cssValuePool.createValue(data.position())); 2399 2422 if ((data.position() >= ContentPositionCenter || data.distribution() != ContentDistributionDefault) && data.overflow() != OverflowAlignmentDefault) 2400 result ->append(CSSPrimitiveValue::create(data.overflow()));2401 ASSERT(result ->length() > 0);2402 ASSERT(result ->length() <= 3);2423 result.get().append(cssValuePool.createValue(data.overflow())); 2424 ASSERT(result.get().length() > 0); 2425 ASSERT(result.get().length() <= 3); 2403 2426 return result; 2404 2427 } … … 2780 2803 return valueForContentPositionAndDistributionWithOverflowAlignment(style->alignContent()); 2781 2804 case CSSPropertyAlignItems: 2782 return valueForItemPositionWithOverflowAlignment(resolveContainerAlignmentAuto(style->alignItemsPosition(), renderer), style->alignItemsOverflowAlignment(), NonLegacyPosition); 2783 case CSSPropertyAlignSelf: { 2784 OverflowAlignment overflow = style->alignSelfOverflowAlignment(); 2785 ItemPosition alignSelf = resolveSelfAlignmentAuto(style->alignSelfPosition(), overflow, renderer); 2786 return valueForItemPositionWithOverflowAlignment(alignSelf, overflow, NonLegacyPosition); 2787 } 2805 return valueForItemPositionWithOverflowAlignment(style->alignItems()); 2806 case CSSPropertyAlignSelf: 2807 return valueForItemPositionWithOverflowAlignment(resolveAlignSelfAuto(style->alignSelf(), styledNode->parentNode())); 2788 2808 case CSSPropertyFlex: 2789 2809 return getCSSPropertyValuesForShorthandProperties(flexShorthand()); … … 2803 2823 return valueForContentPositionAndDistributionWithOverflowAlignment(style->justifyContent()); 2804 2824 case CSSPropertyJustifyItems: 2805 return valueForItemPositionWithOverflowAlignment(resolveContainerAlignmentAuto(style->justifyItemsPosition(), renderer), style->justifyItemsOverflowAlignment(), style->justifyItemsPositionType()); 2806 case CSSPropertyJustifySelf: { 2807 OverflowAlignment overflow = style->justifySelfOverflowAlignment(); 2808 ItemPosition justifySelf = resolveSelfAlignmentAuto(style->justifySelfPosition(), overflow, renderer); 2809 return valueForItemPositionWithOverflowAlignment(justifySelf, overflow, NonLegacyPosition); 2810 } 2825 return valueForItemPositionWithOverflowAlignment(resolveJustifyItemsAuto(style->justifyItems(), styledNode->parentNode())); 2826 case CSSPropertyJustifySelf: 2827 return valueForItemPositionWithOverflowAlignment(resolveJustifySelfAuto(style->justifySelf(), styledNode->parentNode())); 2811 2828 case CSSPropertyOrder: 2812 2829 return cssValuePool.createValue(style->order(), CSSPrimitiveValue::CSS_NUMBER); -
trunk/Source/WebCore/css/CSSParser.cpp
r201441 r201498 3424 3424 bool CSSParser::parseItemPositionOverflowPosition(CSSPropertyID propId, bool important) 3425 3425 { 3426 // auto | stretch | <baseline-position> | [<item-position> && <overflow-position>? ]3426 // auto | normal | stretch | <baseline-position> | [<item-position> && <overflow-position>? ] 3427 3427 // <baseline-position> = baseline | last-baseline; 3428 3428 // <item-position> = center | start | end | self-start | self-end | flex-start | flex-end | left | right; 3429 // <overflow-position> = true | safe3429 // <overflow-position> = unsafe | safe 3430 3430 3431 3431 CSSParserValue* value = m_valueList->current(); … … 3433 3433 return false; 3434 3434 3435 if (value->id == CSSValueAuto || value->id == CSSValueStretch || isBaselinePositionKeyword(value->id)) { 3435 if (value->id == CSSValueAuto || value->id == CSSValueNormal || value->id == CSSValueStretch || isBaselinePositionKeyword(value->id)) { 3436 // align-items property does not allow the 'auto' value. 3437 if (value->id == CSSValueAuto && propId == CSSPropertyAlignItems) 3438 return false; 3436 3439 if (m_valueList->next()) 3437 3440 return false; -
trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h
r200510 r201498 5119 5119 m_value.valueID = CSSValueAuto; 5120 5120 break; 5121 case ItemPositionNormal: 5122 m_value.valueID = CSSValueNormal; 5123 break; 5121 5124 case ItemPositionStretch: 5122 5125 m_value.valueID = CSSValueStretch; … … 5163 5166 case CSSValueAuto: 5164 5167 return ItemPositionAuto; 5168 case CSSValueNormal: 5169 return ItemPositionNormal; 5165 5170 case CSSValueStretch: 5166 5171 return ItemPositionStretch; -
trunk/Source/WebCore/css/CSSPropertyNames.in
r200769 r201498 469 469 align-content [Initial=initialContentAlignment, Converter=ContentAlignmentData] 470 470 -webkit-align-content = align-content 471 align-items [Initial=initial SelfAlignment, Converter=SelfOrDefaultAlignmentData]471 align-items [Initial=initialDefaultAlignment, Converter=SelfOrDefaultAlignmentData] 472 472 -webkit-align-items = align-items 473 473 align-self [Initial=initialSelfAlignment, Converter=SelfOrDefaultAlignmentData] -
trunk/Source/WebCore/css/StyleResolver.cpp
r201441 r201498 1010 1010 style.setDisplay(BLOCK); 1011 1011 } 1012 1013 // If the inherited value of justify-items includes the legacy keyword, 'auto'1014 // computes to the the inherited value.1015 if (parentStyle.justifyItemsPositionType() == LegacyPosition && style.justifyItemsPosition() == ItemPositionAuto)1016 style.setJustifyItems(parentStyle.justifyItems());1017 1012 } 1018 1013 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r201407 r201498 2520 2520 { 2521 2521 auto parent = flexitem.parent(); 2522 return RenderStyle::resolveAlignment(parent->style(), flexitem.style(), ItemPositionStretch) == ItemPositionStretch;2522 return flexitem.style().resolvedAlignSelf(parent->style(), ItemPositionStretch).position() == ItemPositionStretch; 2523 2523 } 2524 2524 … … 2548 2548 } 2549 2549 if (containingBlock->isHorizontalWritingMode() != isHorizontalWritingMode()) 2550 return RenderStyle::resolveAlignment(containingBlock->style(), style, ItemPositionStretch) == ItemPositionStretch;2551 return RenderStyle::resolveJustification(containingBlock->style(), style, ItemPositionStretch) == ItemPositionStretch;2550 return style.resolvedAlignSelf(containingBlock->style(), ItemPositionStretch).position() == ItemPositionStretch; 2551 return style.resolvedJustifySelf(containingBlock->style(), ItemPositionStretch).position() == ItemPositionStretch; 2552 2552 } 2553 2553 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r201218 r201498 40 40 namespace WebCore { 41 41 42 static constexpr ItemPosition selfAlignmentNormalBehaviorFlexibleBox = ItemPositionStretch; 43 42 44 struct RenderFlexibleBox::LineContext { 43 45 LineContext(LayoutUnit crossAxisOffset, LayoutUnit crossAxisExtent, size_t numberOfChildren, LayoutUnit maxAscent) … … 232 234 RenderBlock::styleDidChange(diff, oldStyle); 233 235 234 if (oldStyle && (oldStyle->alignItemsPosition() == ItemPositionStretch || oldStyle->alignItemsPosition() == ItemPositionAuto)&& diff == StyleDifferenceLayout) {236 if (oldStyle && oldStyle->resolvedAlignItems(selfAlignmentNormalBehaviorFlexibleBox).position() == ItemPositionStretch && diff == StyleDifferenceLayout) { 235 237 // Flex items that were previously stretching need to be relayed out so we can compute new available cross axis space. 236 238 // This is only necessary for stretching since other alignment values don't change the size of the box. 239 auto& newStyle = style(); 237 240 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) { 238 ItemPosition previousAlignment = RenderStyle::resolveAlignment(*oldStyle, child->style(), ItemPositionStretch); 239 if (previousAlignment == ItemPositionStretch && previousAlignment != RenderStyle::resolveAlignment(style(), child->style(), ItemPositionStretch)) 241 auto& childStyle = child->style(); 242 auto previousAlignment = childStyle.resolvedAlignSelf(*oldStyle, selfAlignmentNormalBehaviorFlexibleBox).position(); 243 if (previousAlignment == ItemPositionStretch && previousAlignment != childStyle.resolvedAlignSelf(newStyle, selfAlignmentNormalBehaviorFlexibleBox).position()) 240 244 child->setChildNeedsLayout(MarkOnlyThis); 241 245 } … … 1047 1051 ItemPosition RenderFlexibleBox::alignmentForChild(RenderBox& child) const 1048 1052 { 1049 ItemPosition align = RenderStyle::resolveAlignment(style(), child.style(), ItemPositionStretch);1053 ItemPosition align = child.style().resolvedAlignSelf(style(), selfAlignmentNormalBehaviorFlexibleBox).position(); 1050 1054 1051 1055 if (align == ItemPositionBaseline && hasOrthogonalFlow(child)) … … 1095 1099 } 1096 1100 1097 static const StyleContentAlignmentData& normalValueBehaviorFlexibleBox()1101 static const StyleContentAlignmentData& contentAlignmentNormalBehaviorFlexibleBox() 1098 1102 { 1099 1103 // The justify-content property applies along the main axis, but since flexing … … 1109 1113 ASSERT(childSizes.size() == children.size()); 1110 1114 1111 ContentPosition position = style().resolvedJustifyContentPosition(normalValueBehaviorFlexibleBox());1112 ContentDistributionType distribution = style().resolvedJustifyContentDistribution(normalValueBehaviorFlexibleBox());1115 auto position = style().resolvedJustifyContentPosition(contentAlignmentNormalBehaviorFlexibleBox()); 1116 auto distribution = style().resolvedJustifyContentDistribution(contentAlignmentNormalBehaviorFlexibleBox()); 1113 1117 1114 1118 size_t numberOfChildrenForJustifyContent = numberOfInFlowPositionedChildren(children); … … 1193 1197 void RenderFlexibleBox::layoutColumnReverse(const OrderedFlexItemList& children, LayoutUnit crossAxisOffset, LayoutUnit availableFreeSpace) 1194 1198 { 1195 ContentPosition position = style().resolvedJustifyContentPosition(normalValueBehaviorFlexibleBox());1196 ContentDistributionType distribution = style().resolvedJustifyContentDistribution(normalValueBehaviorFlexibleBox());1199 auto position = style().resolvedJustifyContentPosition(contentAlignmentNormalBehaviorFlexibleBox()); 1200 auto distribution = style().resolvedJustifyContentDistribution(contentAlignmentNormalBehaviorFlexibleBox()); 1197 1201 1198 1202 // This is similar to the logic in layoutAndPlaceChildren, except we place the children … … 1251 1255 void RenderFlexibleBox::alignFlexLines(Vector<LineContext>& lineContexts) 1252 1256 { 1253 ContentPosition position = style().resolvedAlignContentPosition( normalValueBehaviorFlexibleBox());1254 ContentDistributionType distribution = style().resolvedAlignContentDistribution( normalValueBehaviorFlexibleBox());1257 ContentPosition position = style().resolvedAlignContentPosition(contentAlignmentNormalBehaviorFlexibleBox()); 1258 ContentDistributionType distribution = style().resolvedAlignContentDistribution(contentAlignmentNormalBehaviorFlexibleBox()); 1255 1259 1256 1260 if (!isMultiline() || position == ContentPositionFlexStart) … … 1314 1318 switch (alignmentForChild(*child)) { 1315 1319 case ItemPositionAuto: 1320 case ItemPositionNormal: 1316 1321 ASSERT_NOT_REACHED(); 1317 1322 break; -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r201399 r201498 40 40 41 41 static const int infinity = -1; 42 static constexpr ItemPosition selfAlignmentNormalBehavior = ItemPositionStretch; 42 43 43 44 class GridTrack { … … 265 266 static inline bool defaultAlignmentChangedToStretchInRowAxis(const RenderStyle& oldStyle, const RenderStyle& newStyle) 266 267 { 267 return !defaultAlignmentIsStretch(oldStyle.justifyItems Position()) && defaultAlignmentIsStretch(newStyle.justifyItemsPosition());268 return !defaultAlignmentIsStretch(oldStyle.justifyItems().position()) && defaultAlignmentIsStretch(newStyle.justifyItems().position()); 268 269 } 269 270 270 271 static inline bool defaultAlignmentChangedFromStretchInRowAxis(const RenderStyle& oldStyle, const RenderStyle& newStyle) 271 272 { 272 return defaultAlignmentIsStretch(oldStyle.justifyItems Position()) && !defaultAlignmentIsStretch(newStyle.justifyItemsPosition());273 return defaultAlignmentIsStretch(oldStyle.justifyItems().position()) && !defaultAlignmentIsStretch(newStyle.justifyItems().position()); 273 274 } 274 275 275 276 static inline bool defaultAlignmentChangedFromStretchInColumnAxis(const RenderStyle& oldStyle, const RenderStyle& newStyle) 276 277 { 277 return defaultAlignmentIsStretch(oldStyle.alignItems Position()) && !defaultAlignmentIsStretch(newStyle.alignItemsPosition());278 return defaultAlignmentIsStretch(oldStyle.alignItems().position()) && !defaultAlignmentIsStretch(newStyle.alignItems().position()); 278 279 } 279 280 280 281 static inline bool selfAlignmentChangedToStretchInRowAxis(const RenderStyle& oldStyle, const RenderStyle& newStyle, const RenderStyle& childStyle) 281 282 { 282 return RenderStyle::resolveJustification(oldStyle, childStyle, ItemPositionStretch) != ItemPositionStretch283 && RenderStyle::resolveJustification(newStyle, childStyle, ItemPositionStretch) == ItemPositionStretch;283 return childStyle.resolvedJustifySelf(oldStyle, selfAlignmentNormalBehavior).position() != ItemPositionStretch 284 && childStyle.resolvedJustifySelf(newStyle, selfAlignmentNormalBehavior).position() == ItemPositionStretch; 284 285 } 285 286 286 287 static inline bool selfAlignmentChangedFromStretchInRowAxis(const RenderStyle& oldStyle, const RenderStyle& newStyle, const RenderStyle& childStyle) 287 288 { 288 return RenderStyle::resolveJustification(oldStyle, childStyle, ItemPositionStretch) == ItemPositionStretch289 && RenderStyle::resolveJustification(newStyle, childStyle, ItemPositionStretch) != ItemPositionStretch;289 return childStyle.resolvedJustifySelf(oldStyle, selfAlignmentNormalBehavior).position() == ItemPositionStretch 290 && childStyle.resolvedJustifySelf(newStyle, selfAlignmentNormalBehavior).position() != ItemPositionStretch; 290 291 } 291 292 292 293 static inline bool selfAlignmentChangedFromStretchInColumnAxis(const RenderStyle& oldStyle, const RenderStyle& newStyle, const RenderStyle& childStyle) 293 294 { 294 return RenderStyle::resolveAlignment(oldStyle, childStyle, ItemPositionStretch) == ItemPositionStretch295 && RenderStyle::resolveAlignment(newStyle, childStyle, ItemPositionStretch) != ItemPositionStretch;295 return childStyle.resolvedAlignSelf(oldStyle, selfAlignmentNormalBehavior).position() == ItemPositionStretch 296 && childStyle.resolvedAlignSelf(newStyle, selfAlignmentNormalBehavior).position() != ItemPositionStretch; 296 297 } 297 298 … … 1512 1513 } 1513 1514 1514 static const StyleContentAlignmentData& normalValueBehaviorGrid()1515 static const StyleContentAlignmentData& contentAlignmentNormalBehaviorGrid() 1515 1516 { 1516 1517 static const StyleContentAlignmentData normalBehavior = {ContentPositionNormal, ContentDistributionStretch}; … … 1523 1524 if (!freeSpace 1524 1525 || freeSpace.value() <= 0 1525 || (direction == ForColumns && style().resolvedJustifyContentDistribution( normalValueBehaviorGrid()) != ContentDistributionStretch)1526 || (direction == ForRows && style().resolvedAlignContentDistribution( normalValueBehaviorGrid()) != ContentDistributionStretch))1526 || (direction == ForColumns && style().resolvedJustifyContentDistribution(contentAlignmentNormalBehaviorGrid()) != ContentDistributionStretch) 1527 || (direction == ForRows && style().resolvedAlignContentDistribution(contentAlignmentNormalBehaviorGrid()) != ContentDistributionStretch)) 1527 1528 return; 1528 1529 … … 1804 1805 bool RenderGrid::needToStretchChildLogicalHeight(const RenderBox& child) const 1805 1806 { 1806 if ( RenderStyle::resolveAlignment(style(), child.style(), ItemPositionStretch) != ItemPositionStretch)1807 if (child.style().resolvedAlignSelf(style(), selfAlignmentNormalBehavior).position() != ItemPositionStretch) 1807 1808 return false; 1808 1809 … … 1853 1854 bool hasAutoSizeInColumnAxis = isHorizontalMode ? childStyle.height().isAuto() : childStyle.width().isAuto(); 1854 1855 bool allowedToStretchChildAlongColumnAxis = hasAutoSizeInColumnAxis && !childStyle.marginBeforeUsing(&gridStyle).isAuto() && !childStyle.marginAfterUsing(&gridStyle).isAuto(); 1855 if (allowedToStretchChildAlongColumnAxis && RenderStyle::resolveAlignment(gridStyle, childStyle, ItemPositionStretch) == ItemPositionStretch) {1856 if (allowedToStretchChildAlongColumnAxis && childStyle.resolvedAlignSelf(style(), selfAlignmentNormalBehavior).position() == ItemPositionStretch) { 1856 1857 // TODO (lajava): If the child has orthogonal flow, then it already has an override height set, so use it. 1857 1858 // TODO (lajava): grid track sizing and positioning do not support orthogonal modes yet. … … 1934 1935 bool hasSameWritingMode = child.style().writingMode() == style().writingMode(); 1935 1936 1936 switch ( RenderStyle::resolveAlignment(style(), child.style(), ItemPositionStretch)) {1937 switch (child.style().resolvedAlignSelf(style(), selfAlignmentNormalBehavior).position()) { 1937 1938 case ItemPositionSelfStart: 1938 1939 // If orthogonal writing-modes, this computes to 'start'. … … 1970 1971 return GridAxisStart; 1971 1972 case ItemPositionAuto: 1973 case ItemPositionNormal: 1972 1974 break; 1973 1975 } … … 1983 1985 bool isLTR = style().isLeftToRightDirection(); 1984 1986 1985 switch ( RenderStyle::resolveJustification(style(), child.style(), ItemPositionStretch)) {1987 switch (child.style().resolvedJustifySelf(style(), selfAlignmentNormalBehavior).position()) { 1986 1988 case ItemPositionSelfStart: 1987 1989 // For orthogonal writing-modes, this computes to 'start' … … 2012 2014 return GridAxisStart; 2013 2015 case ItemPositionAuto: 2016 case ItemPositionNormal: 2014 2017 break; 2015 2018 } … … 2041 2044 endOfRow -= guttersSize(ForRows, 2) + m_offsetBetweenRows; 2042 2045 LayoutUnit childBreadth = child.logicalHeight() + child.marginLogicalHeight(); 2043 LayoutUnit offsetFromStartPosition = computeOverflowAlignmentOffset(RenderStyle::resolveAlignmentOverflow(style(), child.style()), endOfRow - startOfRow, childBreadth); 2046 auto overflow = child.style().resolvedAlignSelf(style(), selfAlignmentNormalBehavior).overflow(); 2047 LayoutUnit offsetFromStartPosition = computeOverflowAlignmentOffset(overflow, endOfRow - startOfRow, childBreadth); 2044 2048 return startPosition + (axisPosition == GridAxisEnd ? offsetFromStartPosition : offsetFromStartPosition / 2); 2045 2049 } … … 2073 2077 endOfColumn -= guttersSize(ForColumns, 2) + m_offsetBetweenColumns; 2074 2078 LayoutUnit childBreadth = child.logicalWidth() + child.marginLogicalWidth(); 2075 LayoutUnit offsetFromStartPosition = computeOverflowAlignmentOffset(RenderStyle::resolveJustificationOverflow(style(), child.style()), endOfColumn - startOfColumn, childBreadth); 2079 auto overflow = child.style().resolvedJustifySelf(style(), selfAlignmentNormalBehavior).overflow(); 2080 LayoutUnit offsetFromStartPosition = computeOverflowAlignmentOffset(overflow, endOfColumn - startOfColumn, childBreadth); 2076 2081 return startPosition + (axisPosition == GridAxisEnd ? offsetFromStartPosition : offsetFromStartPosition / 2); 2077 2082 } … … 2135 2140 { 2136 2141 bool isRowAxis = direction == ForColumns; 2137 ContentPosition position = isRowAxis ? style().resolvedJustifyContentPosition(normalValueBehaviorGrid()) : style().resolvedAlignContentPosition(normalValueBehaviorGrid());2138 ContentDistributionType distribution = isRowAxis ? style().resolvedJustifyContentDistribution(normalValueBehaviorGrid()) : style().resolvedAlignContentDistribution(normalValueBehaviorGrid());2142 auto position = isRowAxis ? style().resolvedJustifyContentPosition(contentAlignmentNormalBehaviorGrid()) : style().resolvedAlignContentPosition(contentAlignmentNormalBehaviorGrid()); 2143 auto distribution = isRowAxis ? style().resolvedJustifyContentDistribution(contentAlignmentNormalBehaviorGrid()) : style().resolvedAlignContentDistribution(contentAlignmentNormalBehaviorGrid()); 2139 2144 // If <content-distribution> value can't be applied, 'position' will become the associated 2140 2145 // <content-position> fallback value. 2141 ContentAlignmentDatacontentAlignment = contentDistributionOffset(availableFreeSpace, position, distribution, numberOfGridTracks);2146 auto contentAlignment = contentDistributionOffset(availableFreeSpace, position, distribution, numberOfGridTracks); 2142 2147 if (contentAlignment.isValid()) 2143 2148 return contentAlignment; 2144 2149 2145 OverflowAlignmentoverflow = isRowAxis ? style().justifyContentOverflowAlignment() : style().alignContentOverflowAlignment();2150 auto overflow = isRowAxis ? style().justifyContentOverflowAlignment() : style().alignContentOverflowAlignment(); 2146 2151 if (availableFreeSpace <= 0 && overflow == OverflowAlignmentSafe) 2147 2152 return {0, 0}; -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r201290 r201498 191 191 } 192 192 193 static inline StyleSelfAlignmentData resolveAlignmentData(const RenderStyle& parentStyle, const RenderStyle& childStyle, ItemPosition resolvedAutoPositionForRenderer) 194 { 195 // The auto keyword computes to the parent's align-items computed value, or to "stretch", if not set or "auto". 196 if (childStyle.alignSelfPosition() == ItemPositionAuto) 197 return (parentStyle.alignItemsPosition() == ItemPositionAuto) ? StyleSelfAlignmentData(resolvedAutoPositionForRenderer, OverflowAlignmentDefault) : parentStyle.alignItems(); 198 return childStyle.alignSelf(); 199 } 200 201 static inline StyleSelfAlignmentData resolveJustificationData(const RenderStyle& parentStyle, const RenderStyle& childStyle, ItemPosition resolvedAutoPositionForRenderer) 202 { 203 // The auto keyword computes to the parent's justify-items computed value, or to "stretch", if not set or "auto". 204 if (childStyle.justifySelfPosition() == ItemPositionAuto) 205 return (parentStyle.justifyItemsPosition() == ItemPositionAuto) ? StyleSelfAlignmentData(resolvedAutoPositionForRenderer, OverflowAlignmentDefault) : parentStyle.justifyItems(); 206 return childStyle.justifySelf(); 207 } 208 209 ItemPosition RenderStyle::resolveAlignment(const RenderStyle& parentStyle, const RenderStyle& childStyle, ItemPosition resolvedAutoPositionForRenderer) 210 { 211 return resolveAlignmentData(parentStyle, childStyle, resolvedAutoPositionForRenderer).position(); 212 } 213 214 OverflowAlignment RenderStyle::resolveAlignmentOverflow(const RenderStyle& parentStyle, const RenderStyle& childStyle) 215 { 216 return resolveAlignmentData(parentStyle, childStyle, ItemPositionStretch).overflow(); 217 } 218 219 ItemPosition RenderStyle::resolveJustification(const RenderStyle& parentStyle, const RenderStyle& childStyle, ItemPosition resolvedAutoPositionForRenderer) 220 { 221 return resolveJustificationData(parentStyle, childStyle, resolvedAutoPositionForRenderer).position(); 222 } 223 224 OverflowAlignment RenderStyle::resolveJustificationOverflow(const RenderStyle& parentStyle, const RenderStyle& childStyle) 225 { 226 return resolveJustificationData(parentStyle, childStyle, ItemPositionStretch).overflow(); 193 static StyleSelfAlignmentData resolvedSelfAlignment(const StyleSelfAlignmentData& value, ItemPosition normalValueBehavior) 194 { 195 ASSERT(value.position() != ItemPositionAuto); 196 if (value.position() == ItemPositionNormal) 197 return { normalValueBehavior, OverflowAlignmentDefault }; 198 return value; 199 } 200 201 StyleSelfAlignmentData RenderStyle::resolvedAlignItems(ItemPosition normalValueBehaviour) const 202 { 203 return resolvedSelfAlignment(alignItems(), normalValueBehaviour); 204 } 205 206 StyleSelfAlignmentData RenderStyle::resolvedAlignSelf(const RenderStyle& parentStyle, ItemPosition normalValueBehaviour) const 207 { 208 // The auto keyword computes to the parent's align-items computed value. 209 // We will return the behaviour of 'normal' value if needed, which is specific of each layout model. 210 if (alignSelfPosition() == ItemPositionAuto) 211 return parentStyle.resolvedAlignItems(normalValueBehaviour); 212 return resolvedSelfAlignment(alignSelf(), normalValueBehaviour); 213 } 214 215 StyleSelfAlignmentData RenderStyle::resolvedJustifyItems(ItemPosition normalValueBehaviour) const 216 { 217 // FIXME: justify-items 'auto' value is allowed only to provide the 'legacy' keyword's behavior, which it's still not implemented for layout. 218 // "If the inherited value of justify-items includes the legacy keyword, auto computes to the inherited value." 219 // https://drafts.csswg.org/css-align/#justify-items-property 220 if (justifyItemsPosition() == ItemPositionAuto) 221 return { normalValueBehaviour, OverflowAlignmentDefault }; 222 223 return resolvedSelfAlignment(justifyItems(), normalValueBehaviour); 224 } 225 226 StyleSelfAlignmentData RenderStyle::resolvedJustifySelf(const RenderStyle& parentStyle, ItemPosition normalValueBehaviour) const 227 { 228 // The auto keyword computes to the parent's justify-items computed value. 229 // We will return the behaviour of 'normal' value if needed, which is specific of each layout model. 230 if (justifySelfPosition() == ItemPositionAuto) 231 return parentStyle.resolvedJustifyItems(normalValueBehaviour); 232 return resolvedSelfAlignment(justifySelf(), normalValueBehaviour); 227 233 } 228 234 -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r201086 r201498 509 509 ContentPosition resolvedAlignContentPosition(const StyleContentAlignmentData& normalValueBehavior) const; 510 510 ContentDistributionType resolvedAlignContentDistribution(const StyleContentAlignmentData& normalValueBehavior) const; 511 static ItemPosition resolveAlignment(const RenderStyle& parentStyle, const RenderStyle& childStyle, ItemPosition resolvedAutoPositionForRenderer);512 static OverflowAlignment resolveAlignmentOverflow(const RenderStyle& parentStyle, const RenderStyle& childStyle);513 static ItemPosition resolveJustification(const RenderStyle& parentStyle, const RenderStyle& childStyle, ItemPosition resolvedAutoPositionForRenderer);514 static OverflowAlignment resolveJustificationOverflow(const RenderStyle& parentStyle, const RenderStyle& childStyle);511 StyleSelfAlignmentData resolvedAlignItems(ItemPosition normalValueBehaviour) const; 512 StyleSelfAlignmentData resolvedAlignSelf(const RenderStyle& parentStyle, ItemPosition normalValueBehaviour) const; 513 StyleSelfAlignmentData resolvedJustifyItems(ItemPosition normalValueBehaviour) const; 514 StyleSelfAlignmentData resolvedJustifySelf(const RenderStyle& parentStyle, ItemPosition normalValueBehaviour) const; 515 515 516 516 enum IsAtShadowBoundary { … … 2005 2005 static int initialOrder() { return 0; } 2006 2006 static StyleSelfAlignmentData initialSelfAlignment() { return StyleSelfAlignmentData(ItemPositionAuto, OverflowAlignmentDefault); } 2007 static StyleSelfAlignmentData initialDefaultAlignment() { return StyleSelfAlignmentData(ItemPositionNormal, OverflowAlignmentDefault); } 2007 2008 static StyleContentAlignmentData initialContentAlignment() { return StyleContentAlignmentData(ContentPositionNormal, ContentDistributionDefault, OverflowAlignmentDefault); } 2008 2009 static EFlexDirection initialFlexDirection() { return FlowRow; } -
trunk/Source/WebCore/rendering/style/RenderStyleConstants.h
r200182 r201498 255 255 enum EFlexDirection { FlowRow, FlowRowReverse, FlowColumn, FlowColumnReverse }; 256 256 enum EFlexWrap { FlexNoWrap, FlexWrap, FlexWrapReverse }; 257 enum ItemPosition { ItemPositionAuto, ItemPositionStretch, ItemPositionBaseline, ItemPositionLastBaseline, ItemPositionCenter, ItemPositionStart, ItemPositionEnd, ItemPositionSelfStart, ItemPositionSelfEnd, ItemPositionFlexStart, ItemPositionFlexEnd, ItemPositionLeft, ItemPositionRight};258 enum OverflowAlignment { OverflowAlignmentDefault, OverflowAlignmentUnsafe, OverflowAlignmentSafe};259 enum ItemPositionType { NonLegacyPosition, LegacyPosition};260 enum ContentPosition { ContentPositionNormal, ContentPositionBaseline, ContentPositionLastBaseline, ContentPositionCenter, ContentPositionStart, ContentPositionEnd, ContentPositionFlexStart, ContentPositionFlexEnd, ContentPositionLeft, ContentPositionRight};261 enum ContentDistributionType { ContentDistributionDefault, ContentDistributionSpaceBetween, ContentDistributionSpaceAround, ContentDistributionSpaceEvenly, ContentDistributionStretch};257 enum ItemPosition { ItemPositionAuto, ItemPositionNormal, ItemPositionStretch, ItemPositionBaseline, ItemPositionLastBaseline, ItemPositionCenter, ItemPositionStart, ItemPositionEnd, ItemPositionSelfStart, ItemPositionSelfEnd, ItemPositionFlexStart, ItemPositionFlexEnd, ItemPositionLeft, ItemPositionRight }; 258 enum OverflowAlignment { OverflowAlignmentDefault, OverflowAlignmentUnsafe, OverflowAlignmentSafe }; 259 enum ItemPositionType { NonLegacyPosition, LegacyPosition }; 260 enum ContentPosition { ContentPositionNormal, ContentPositionBaseline, ContentPositionLastBaseline, ContentPositionCenter, ContentPositionStart, ContentPositionEnd, ContentPositionFlexStart, ContentPositionFlexEnd, ContentPositionLeft, ContentPositionRight }; 261 enum ContentDistributionType { ContentDistributionDefault, ContentDistributionSpaceBetween, ContentDistributionSpaceAround, ContentDistributionSpaceEvenly, ContentDistributionStretch }; 262 262 263 263 enum ETextSecurity { -
trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
r201086 r201498 76 76 , m_regionThread(RenderStyle::initialRegionThread()) 77 77 , m_alignContent(RenderStyle::initialContentAlignment()) 78 , m_alignItems(RenderStyle::initial SelfAlignment())78 , m_alignItems(RenderStyle::initialDefaultAlignment()) 79 79 , m_alignSelf(RenderStyle::initialSelfAlignment()) 80 80 , m_justifyContent(RenderStyle::initialContentAlignment())
Note:
See TracChangeset
for help on using the changeset viewer.