'alignContent' defaults to 'flex-start' instead of 'stretch' ;
This commit is contained in:
@@ -371,13 +371,13 @@ var layoutTestUtils = (function() {
|
|||||||
div.style.display = 'flex';
|
div.style.display = 'flex';
|
||||||
div.style.flexDirection = 'column';
|
div.style.flexDirection = 'column';
|
||||||
div.style.alignItems = 'flex-start';
|
div.style.alignItems = 'flex-start';
|
||||||
div.style.alignContent = 'stretch';
|
div.style.alignContent = 'flex-start';
|
||||||
|
|
||||||
var span = document.createElement('span');
|
var span = document.createElement('span');
|
||||||
span.style.display = 'flex';
|
span.style.display = 'flex';
|
||||||
span.style.flexDirection = 'column';
|
span.style.flexDirection = 'column';
|
||||||
span.style.alignItems = 'flex-start';
|
span.style.alignItems = 'flex-start';
|
||||||
span.style.alignContent = 'stretch';
|
span.style.alignContent = 'flex-start';
|
||||||
span.innerText = text;
|
span.innerText = text;
|
||||||
|
|
||||||
div.appendChild(span);
|
div.appendChild(span);
|
||||||
|
@@ -35,7 +35,7 @@ static bool eq(float a, float b) {
|
|||||||
|
|
||||||
void init_css_node(css_node_t *node) {
|
void init_css_node(css_node_t *node) {
|
||||||
node->style.align_items = CSS_ALIGN_STRETCH;
|
node->style.align_items = CSS_ALIGN_STRETCH;
|
||||||
node->style.align_content = CSS_ALIGN_STRETCH;
|
node->style.align_content = CSS_ALIGN_FLEX_START;
|
||||||
|
|
||||||
// Some of the fields default to undefined and not 0
|
// Some of the fields default to undefined and not 0
|
||||||
node->style.dimensions[CSS_WIDTH] = CSS_UNDEFINED;
|
node->style.dimensions[CSS_WIDTH] = CSS_UNDEFINED;
|
||||||
|
@@ -148,7 +148,7 @@ var computeLayout = (function() {
|
|||||||
if ('alignContent' in node.style) {
|
if ('alignContent' in node.style) {
|
||||||
return node.style.alignContent;
|
return node.style.alignContent;
|
||||||
}
|
}
|
||||||
return 'stretch';
|
return 'flex-start';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAlignItem(node, child) {
|
function getAlignItem(node, child) {
|
||||||
|
@@ -15,7 +15,7 @@ public class CSSStyle {
|
|||||||
|
|
||||||
public CSSFlexDirection flexDirection = CSSFlexDirection.COLUMN;
|
public CSSFlexDirection flexDirection = CSSFlexDirection.COLUMN;
|
||||||
public CSSJustify justifyContent = CSSJustify.FLEX_START;
|
public CSSJustify justifyContent = CSSJustify.FLEX_START;
|
||||||
public CSSAlign alignContent = CSSAlign.STRETCH;
|
public CSSAlign alignContent = CSSAlign.FLEX_START;
|
||||||
public CSSAlign alignItems = CSSAlign.STRETCH;
|
public CSSAlign alignItems = CSSAlign.STRETCH;
|
||||||
public CSSAlign alignSelf = CSSAlign.AUTO;
|
public CSSAlign alignSelf = CSSAlign.AUTO;
|
||||||
public CSSPositionType positionType = CSSPositionType.RELATIVE;
|
public CSSPositionType positionType = CSSPositionType.RELATIVE;
|
||||||
|
Reference in New Issue
Block a user