From e6539d822d45b3a188a76ad6918aa08e7ca211b1 Mon Sep 17 00:00:00 2001 From: "tony@chromium.org" Date: Mon, 22 Oct 2012 21:32:01 +0000 Subject: [PATCH] [CherryPick] WebKit does not support 'flex-wrap: nowrap' [Title] [CherryPick] WebKit does not support 'flex-wrap: nowrap' [Issue] TWEB-969, TWEB-1006 [Problem] The flex-wrap attribute value expected "nowrap" but got "none". [Cause] The spec was changed from "none" to "nowrap", and the Webkit code for that modified in 2012.10, but it didn't come in to Tizen. [Solution] Cherry-pick the opensource patch. [Cherry-Picker] KyungTae Kim WebKit does not support 'flex-wrap: nowrap' https://bugs.webkit.org/show_bug.cgi?id=99924 Reviewed by Ojan Vafai. Source/WebCore: The spec changed back from using none to nowrap for the single-line flexbox case. http://dev.w3.org/csswg/css3-flexbox/#flex-wrap-property No new tests, covered by css3/flexbox/css-properties.html and others. * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EFlexWrap): * css/CSSValueKeywords.in: * rendering/RenderBox.cpp: (WebCore::isStretchingColumnFlexItem): (WebCore::RenderBox::sizesLogicalWidthToFitContent): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::isMultiline): * rendering/style/RenderStyle.h: * rendering/style/RenderStyleConstants.h: LayoutTests: Update expectations (find and replace none with nowrap). * css3/flexbox/css-properties-expected.txt: * css3/flexbox/css-properties.html: * fast/css/getComputedStyle/computed-style-expected.txt: * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: * svg/css/getComputedStyle-basic-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132136 268f45cc-cd09-0410-ab3c-d52691b4dbfc Conflicts: LayoutTests/ChangeLog Source/WebCore/ChangeLog Source/WebCore/css/CSSPrimitiveValueMappings.h Source/WebCore/rendering/RenderBox.cpp Change-Id: Ia3124cfc785c722276c324f396e26ab1596d2392 --- .../css3/flexbox/css-properties-expected.txt | 72 +++++++++++----------- LayoutTests/css3/flexbox/css-properties.html | 20 +++--- .../getComputedStyle/computed-style-expected.txt | 2 +- .../computed-style-without-renderer-expected.txt | 2 +- .../svg/css/getComputedStyle-basic-expected.txt | 4 +- Source/WebCore/css/CSSParser.cpp | 2 +- Source/WebCore/css/CSSPrimitiveValueMappings.h | 10 +-- Source/WebCore/css/CSSValueKeywords.in | 2 +- Source/WebCore/rendering/RenderBox.cpp | 4 +- Source/WebCore/rendering/RenderFlexibleBox.cpp | 2 +- Source/WebCore/rendering/style/RenderStyle.h | 2 +- .../WebCore/rendering/style/RenderStyleConstants.h | 2 +- 12 files changed, 62 insertions(+), 62 deletions(-) diff --git a/LayoutTests/css3/flexbox/css-properties-expected.txt b/LayoutTests/css3/flexbox/css-properties-expected.txt index 7e504e7..40bcdae 100644 --- a/LayoutTests/css3/flexbox/css-properties-expected.txt +++ b/LayoutTests/css3/flexbox/css-properties-expected.txt @@ -88,25 +88,25 @@ PASS window.getComputedStyle(flexbox, null).webkitFlexDirection is "column" PASS flexbox.style.webkitFlexDirection is "column-reverse" PASS window.getComputedStyle(flexbox, null).webkitFlexDirection is "column-reverse" PASS flexbox.style.webkitFlexWrap is "" -PASS window.getComputedStyle(flexbox, null).webkitFlexWrap is "none" +PASS window.getComputedStyle(flexbox, null).webkitFlexWrap is "nowrap" PASS flexbox.style.webkitFlexWrap is "" -PASS flexbox.style.webkitFlexWrap is "none" -PASS window.getComputedStyle(flexbox, null).webkitFlexWrap is "none" +PASS flexbox.style.webkitFlexWrap is "nowrap" +PASS window.getComputedStyle(flexbox, null).webkitFlexWrap is "nowrap" PASS flexbox.style.webkitFlexWrap is "wrap" PASS window.getComputedStyle(flexbox, null).webkitFlexWrap is "wrap" PASS flexbox.style.webkitFlexWrap is "wrap-reverse" PASS window.getComputedStyle(flexbox, null).webkitFlexWrap is "wrap-reverse" PASS flexbox.style.webkitFlexFlow is "" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row none" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row nowrap" PASS flexbox.style.webkitFlexFlow is "" PASS flexbox.style.webkitFlexFlow is "" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row none" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row nowrap" PASS flexbox.style.webkitFlexFlow is "" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row none" -PASS flexbox.style.webkitFlexFlow is "none" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row none" -PASS flexbox.style.webkitFlexFlow is "none" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row none" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row nowrap" +PASS flexbox.style.webkitFlexFlow is "nowrap" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row nowrap" +PASS flexbox.style.webkitFlexFlow is "nowrap" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row nowrap" PASS flexbox.style.webkitFlexFlow is "wrap" PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row wrap" PASS flexbox.style.webkitFlexFlow is "wrap" @@ -116,13 +116,13 @@ PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row wrap-reverse" PASS flexbox.style.webkitFlexFlow is "wrap-reverse" PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row wrap-reverse" PASS flexbox.style.webkitFlexFlow is "row" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row none" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row nowrap" PASS flexbox.style.webkitFlexFlow is "row" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row none" -PASS flexbox.style.webkitFlexFlow is "row none" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row none" -PASS flexbox.style.webkitFlexFlow is "row none" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row none" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row nowrap" +PASS flexbox.style.webkitFlexFlow is "row nowrap" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row nowrap" +PASS flexbox.style.webkitFlexFlow is "row nowrap" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row nowrap" PASS flexbox.style.webkitFlexFlow is "row wrap" PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row wrap" PASS flexbox.style.webkitFlexFlow is "row wrap" @@ -132,13 +132,13 @@ PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row wrap-reverse" PASS flexbox.style.webkitFlexFlow is "row wrap-reverse" PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row wrap-reverse" PASS flexbox.style.webkitFlexFlow is "row-reverse" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row-reverse none" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row-reverse nowrap" PASS flexbox.style.webkitFlexFlow is "row-reverse" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row-reverse none" -PASS flexbox.style.webkitFlexFlow is "row-reverse none" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row-reverse none" -PASS flexbox.style.webkitFlexFlow is "row-reverse none" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row-reverse none" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row-reverse nowrap" +PASS flexbox.style.webkitFlexFlow is "row-reverse nowrap" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row-reverse nowrap" +PASS flexbox.style.webkitFlexFlow is "row-reverse nowrap" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row-reverse nowrap" PASS flexbox.style.webkitFlexFlow is "row-reverse wrap" PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row-reverse wrap" PASS flexbox.style.webkitFlexFlow is "row-reverse wrap" @@ -148,13 +148,13 @@ PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row-reverse wrap- PASS flexbox.style.webkitFlexFlow is "row-reverse wrap-reverse" PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row-reverse wrap-reverse" PASS flexbox.style.webkitFlexFlow is "column" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column none" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column nowrap" PASS flexbox.style.webkitFlexFlow is "column" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column none" -PASS flexbox.style.webkitFlexFlow is "column none" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column none" -PASS flexbox.style.webkitFlexFlow is "column none" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column none" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column nowrap" +PASS flexbox.style.webkitFlexFlow is "column nowrap" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column nowrap" +PASS flexbox.style.webkitFlexFlow is "column nowrap" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column nowrap" PASS flexbox.style.webkitFlexFlow is "column wrap" PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column wrap" PASS flexbox.style.webkitFlexFlow is "column wrap" @@ -164,13 +164,13 @@ PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column wrap-rever PASS flexbox.style.webkitFlexFlow is "column wrap-reverse" PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column wrap-reverse" PASS flexbox.style.webkitFlexFlow is "column-reverse" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column-reverse none" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column-reverse nowrap" PASS flexbox.style.webkitFlexFlow is "column-reverse" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column-reverse none" -PASS flexbox.style.webkitFlexFlow is "column-reverse none" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column-reverse none" -PASS flexbox.style.webkitFlexFlow is "column-reverse none" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column-reverse none" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column-reverse nowrap" +PASS flexbox.style.webkitFlexFlow is "column-reverse nowrap" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column-reverse nowrap" +PASS flexbox.style.webkitFlexFlow is "column-reverse nowrap" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column-reverse nowrap" PASS flexbox.style.webkitFlexFlow is "column-reverse wrap" PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column-reverse wrap" PASS flexbox.style.webkitFlexFlow is "column-reverse wrap" @@ -183,9 +183,9 @@ PASS flexbox.style.webkitFlexFlow is "" PASS flexbox.style.webkitFlexFlow is "" PASS flexbox.style.webkitFlexFlow is "" PASS flexbox.style.webkitFlexFlow is "" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row none" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "row nowrap" PASS flexbox.style.webkitFlexFlow is "column" -PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column none" +PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column nowrap" PASS flexbox.style.webkitFlexFlow is "column wrap" PASS window.getComputedStyle(flexbox, null).webkitFlexFlow is "column wrap" PASS flexbox.style.webkitFlexFlow is "row-reverse wrap-reverse" diff --git a/LayoutTests/css3/flexbox/css-properties.html b/LayoutTests/css3/flexbox/css-properties.html index 902fbe3..2ffc006 100644 --- a/LayoutTests/css3/flexbox/css-properties.html +++ b/LayoutTests/css3/flexbox/css-properties.html @@ -195,15 +195,15 @@ shouldBeEqualToString('flexbox.style.webkitFlexDirection', 'column-reverse'); shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexDirection', 'column-reverse'); shouldBeEqualToString('flexbox.style.webkitFlexWrap', ''); -// The initial value is 'none'. -shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexWrap', 'none'); +// The initial value is 'nowrap'. +shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexWrap', 'nowrap'); flexbox.style.webkitFlexWrap = 'foo'; shouldBeEqualToString('flexbox.style.webkitFlexWrap', ''); -flexbox.style.webkitFlexWrap = 'none'; -shouldBeEqualToString('flexbox.style.webkitFlexWrap', 'none'); -shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexWrap', 'none'); +flexbox.style.webkitFlexWrap = 'nowrap'; +shouldBeEqualToString('flexbox.style.webkitFlexWrap', 'nowrap'); +shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexWrap', 'nowrap'); flexbox.style.webkitFlexWrap = 'wrap'; shouldBeEqualToString('flexbox.style.webkitFlexWrap', 'wrap'); @@ -215,7 +215,7 @@ shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexWrap', ' flexbox.style.webkitFlexFlow = ''; shouldBeEqualToString('flexbox.style.webkitFlexFlow', ''); -shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexFlow', 'row none'); +shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexFlow', 'row nowrap'); flexbox.style.webkitFlexFlow = 'foo'; shouldBeEqualToString('flexbox.style.webkitFlexFlow', ''); @@ -228,10 +228,10 @@ function testFlexFlowValue(value, expected, expectedComputed) } var directions = ['', 'row', 'row-reverse', 'column', 'column-reverse']; -var wraps = ['', 'none', 'wrap', 'wrap-reverse']; +var wraps = ['', 'nowrap', 'wrap', 'wrap-reverse']; directions.forEach(function(direction) { wraps.forEach(function(wrap) { - var expectedComputed = (direction || 'row') + ' ' + (wrap || 'none'); + var expectedComputed = (direction || 'row') + ' ' + (wrap || 'nowrap'); var expected = direction + ' ' + wrap; testFlexFlowValue(direction + ' ' + wrap, expected, expectedComputed); testFlexFlowValue(wrap + ' ' + direction, expected, expectedComputed); @@ -247,11 +247,11 @@ shouldBeEqualToString('flexbox.style.webkitFlexFlow', ''); flexbox.style.webkitFlexFlow = ''; shouldBeEqualToString('flexbox.style.webkitFlexFlow', ''); -shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexFlow', 'row none'); +shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexFlow', 'row nowrap'); flexbox.style.webkitFlexDirection = 'column'; flexbox.style.webkitFlexWrap = 'initial'; shouldBeEqualToString('flexbox.style.webkitFlexFlow', 'column'); -shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexFlow', 'column none'); +shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexFlow', 'column nowrap'); flexbox.style.webkitFlexWrap = 'wrap'; shouldBeEqualToString('flexbox.style.webkitFlexFlow', 'column wrap'); shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexFlow', 'column wrap'); diff --git a/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt b/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt index da1a65c..077190d 100644 --- a/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt +++ b/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt @@ -147,7 +147,7 @@ zoom: 1; -webkit-align-items: stretch; -webkit-align-self: stretch; -webkit-flex-direction: row; --webkit-flex-wrap: none; +-webkit-flex-wrap: nowrap; -webkit-justify-content: flex-start; -webkit-font-kerning: auto; -webkit-font-smoothing: auto; diff --git a/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt b/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt index 2f1ade7..a6b9bff 100644 --- a/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt +++ b/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt @@ -146,7 +146,7 @@ zoom: 1 -webkit-align-items: stretch -webkit-align-self: stretch -webkit-flex-direction: row --webkit-flex-wrap: none +-webkit-flex-wrap: nowrap -webkit-justify-content: flex-start -webkit-font-kerning: auto -webkit-font-smoothing: auto diff --git a/LayoutTests/svg/css/getComputedStyle-basic-expected.txt b/LayoutTests/svg/css/getComputedStyle-basic-expected.txt index 1519d9a..b10271a 100644 --- a/LayoutTests/svg/css/getComputedStyle-basic-expected.txt +++ b/LayoutTests/svg/css/getComputedStyle-basic-expected.txt @@ -292,7 +292,7 @@ rect: style.getPropertyValue(-webkit-align-self) : stretch rect: style.getPropertyCSSValue(-webkit-align-self) : [object CSSPrimitiveValue] rect: style.getPropertyValue(-webkit-flex-direction) : row rect: style.getPropertyCSSValue(-webkit-flex-direction) : [object CSSPrimitiveValue] -rect: style.getPropertyValue(-webkit-flex-wrap) : none +rect: style.getPropertyValue(-webkit-flex-wrap) : nowrap rect: style.getPropertyCSSValue(-webkit-flex-wrap) : [object CSSPrimitiveValue] rect: style.getPropertyValue(-webkit-justify-content) : flex-start rect: style.getPropertyCSSValue(-webkit-justify-content) : [object CSSPrimitiveValue] @@ -797,7 +797,7 @@ g: style.getPropertyValue(-webkit-flex) : 0 1 auto g: style.getPropertyCSSValue(-webkit-flex) : [object CSSValueList] g: style.getPropertyValue(-webkit-flex-direction) : row g: style.getPropertyCSSValue(-webkit-flex-direction) : [object CSSPrimitiveValue] -g: style.getPropertyValue(-webkit-flex-wrap) : none +g: style.getPropertyValue(-webkit-flex-wrap) : nowrap g: style.getPropertyCSSValue(-webkit-flex-wrap) : [object CSSPrimitiveValue] g: style.getPropertyValue(-webkit-justify-content) : flex-start g: style.getPropertyCSSValue(-webkit-justify-content) : [object CSSPrimitiveValue] diff --git a/Source/WebCore/css/CSSParser.cpp b/Source/WebCore/css/CSSParser.cpp index 257909d..3320ee9 100644 --- a/Source/WebCore/css/CSSParser.cpp +++ b/Source/WebCore/css/CSSParser.cpp @@ -728,7 +728,7 @@ static inline bool isValidKeywordPropertyAndValue(CSSPropertyID propertyId, int return true; break; case CSSPropertyWebkitFlexWrap: - if (valueID == CSSValueNone || valueID == CSSValueWrap || valueID == CSSValueWrapReverse) + if (valueID == CSSValueNowrap || valueID == CSSValueWrap || valueID == CSSValueWrapReverse) return true; break; case CSSPropertyWebkitJustifyContent: diff --git a/Source/WebCore/css/CSSPrimitiveValueMappings.h b/Source/WebCore/css/CSSPrimitiveValueMappings.h index b8388ee..f54fdaa 100644 --- a/Source/WebCore/css/CSSPrimitiveValueMappings.h +++ b/Source/WebCore/css/CSSPrimitiveValueMappings.h @@ -1389,8 +1389,8 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFlexWrap e) { m_primitiveUnitType = CSS_IDENT; switch (e) { - case FlexWrapNone: - m_value.ident = CSSValueNone; + case FlexNoWrap: + m_value.ident = CSSValueNowrap; break; case FlexWrap: m_value.ident = CSSValueWrap; @@ -1404,15 +1404,15 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFlexWrap e) template<> inline CSSPrimitiveValue::operator EFlexWrap() const { switch (m_value.ident) { - case CSSValueNone: - return FlexWrapNone; + case CSSValueNowrap: + return FlexNoWrap; case CSSValueWrap: return FlexWrap; case CSSValueWrapReverse: return FlexWrapReverse; default: ASSERT_NOT_REACHED(); - return FlexWrapNone; + return FlexNoWrap; } } diff --git a/Source/WebCore/css/CSSValueKeywords.in b/Source/WebCore/css/CSSValueKeywords.in index b635072..8ce9bd7 100644 --- a/Source/WebCore/css/CSSValueKeywords.in +++ b/Source/WebCore/css/CSSValueKeywords.in @@ -516,7 +516,7 @@ row row-reverse column column-reverse -// none +// nowrap // wrap wrap-reverse diff --git a/Source/WebCore/rendering/RenderBox.cpp b/Source/WebCore/rendering/RenderBox.cpp index af2ef39..fa27b46 100644 --- a/Source/WebCore/rendering/RenderBox.cpp +++ b/Source/WebCore/rendering/RenderBox.cpp @@ -1798,8 +1798,8 @@ bool RenderBox::sizesLogicalWidthToFitContent(SizeType widthType) const // In the case of columns that have a stretch alignment, we go ahead and layout at the // stretched size to avoid an extra layout when applying alignment. if (parent()->isFlexibleBox()) { - // For multiline columns, we need to apply the flex-line-pack first, so we can't stretch now. - if (!parent()->style()->isColumnFlexDirection() || parent()->style()->flexWrap() != FlexWrapNone) + // For multiline columns, we need to apply align-content first, so we can't stretch now. + if (!parent()->style()->isColumnFlexDirection() || parent()->style()->flexWrap() != FlexNoWrap) return true; EAlignItems itemAlign = style()->alignSelf(); if (itemAlign != AlignStretch && (itemAlign != AlignAuto || parent()->style()->alignItems() != AlignStretch)) diff --git a/Source/WebCore/rendering/RenderFlexibleBox.cpp b/Source/WebCore/rendering/RenderFlexibleBox.cpp index 3b1d473..a0c8d75 100644 --- a/Source/WebCore/rendering/RenderFlexibleBox.cpp +++ b/Source/WebCore/rendering/RenderFlexibleBox.cpp @@ -347,7 +347,7 @@ bool RenderFlexibleBox::isLeftToRightFlow() const bool RenderFlexibleBox::isMultiline() const { - return style()->flexWrap() != FlexWrapNone; + return style()->flexWrap() != FlexNoWrap; } Length RenderFlexibleBox::flexBasisForChild(RenderBox* child) const diff --git a/Source/WebCore/rendering/style/RenderStyle.h b/Source/WebCore/rendering/style/RenderStyle.h index 48686a9..48778a3 100644 --- a/Source/WebCore/rendering/style/RenderStyle.h +++ b/Source/WebCore/rendering/style/RenderStyle.h @@ -1625,7 +1625,7 @@ public: static EAlignItems initialAlignItems() { return AlignStretch; } static EAlignItems initialAlignSelf() { return AlignAuto; } static EFlexDirection initialFlexDirection() { return FlowRow; } - static EFlexWrap initialFlexWrap() { return FlexWrapNone; } + static EFlexWrap initialFlexWrap() { return FlexNoWrap; } static EJustifyContent initialJustifyContent() { return JustifyFlexStart; } static int initialMarqueeLoopCount() { return -1; } static int initialMarqueeSpeed() { return 85; } diff --git a/Source/WebCore/rendering/style/RenderStyleConstants.h b/Source/WebCore/rendering/style/RenderStyleConstants.h index bc1e71e..6847f9f 100644 --- a/Source/WebCore/rendering/style/RenderStyleConstants.h +++ b/Source/WebCore/rendering/style/RenderStyleConstants.h @@ -176,7 +176,7 @@ enum EBoxDirection { BNORMAL, BREVERSE }; enum EAlignContent { AlignContentFlexStart, AlignContentFlexEnd, AlignContentCenter, AlignContentSpaceBetween, AlignContentSpaceAround, AlignContentStretch }; enum EAlignItems { AlignAuto, AlignFlexStart, AlignFlexEnd, AlignCenter, AlignStretch, AlignBaseline }; enum EFlexDirection { FlowRow, FlowRowReverse, FlowColumn, FlowColumnReverse }; -enum EFlexWrap { FlexWrapNone, FlexWrap, FlexWrapReverse }; +enum EFlexWrap { FlexNoWrap, FlexWrap, FlexWrapReverse }; enum EJustifyContent { JustifyFlexStart, JustifyFlexEnd, JustifyCenter, JustifySpaceBetween, JustifySpaceAround }; enum ETextSecurity { -- 2.7.4