Changeset 93528 in webkit
- Timestamp:
- Aug 22, 2011 12:08:36 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r93521 r93528 1 2011-08-22 Tony Chang <tony@chromium.org> 2 3 Add CSS parsing of -webkit-flex-order 4 https://bugs.webkit.org/show_bug.cgi?id=65384 5 6 Reviewed by Ojan Vafai. 7 8 * css3/flexbox/css-properties-expected.txt: 9 * css3/flexbox/css-properties.html: 10 * css3/flexbox/script-tests/css-properties.js: 11 1 12 2011-08-22 Nate Chapin <japhet@chromium.org> 2 13 -
trunk/LayoutTests/css3/flexbox/css-properties-expected.txt
r92001 r93528 9 9 PASS div.style.display is "-webkit-inline-flexbox" 10 10 PASS div.style.display is "block" 11 PASS flexitem.style.webkitFlexOrder is "" 12 PASS flexitem.style.webkitFlexOrder is "2" 13 PASS flexitem.style.webkitFlexOrder is "-1" 14 PASS flexitem.style.webkitFlexOrder is "0" 15 PASS flexitem.style.webkitFlexOrder is "0" 16 PASS flexitem.style.webkitFlexOrder is "0" 17 PASS flexitem.style.webkitFlexOrder is "" 11 18 PASS successfullyParsed is true 12 19 -
trunk/LayoutTests/css3/flexbox/css-properties.html
r92001 r93528 7 7 <body> 8 8 <p id="description"></p> 9 <div id="flexbox"> 10 <div id="flexitem"></div> 11 </div> 9 12 <div id="console"></div> 10 13 <script src="script-tests/css-properties.js"></script> -
trunk/LayoutTests/css3/flexbox/script-tests/css-properties.js
r92001 r93528 1 1 description('Tests being able to set the display to -webkit-flexbox and -webkit-inline-flexbox.'); 2 2 3 var div = document. createElement('div');3 var div = document.getElementById("flexbox"); 4 4 5 5 div.style.display = '-webkit-flexbox'; … … 18 18 shouldBeEqualToString('div.style.display', 'block'); 19 19 20 var flexitem = document.getElementById("flexitem"); 21 shouldBeEqualToString('flexitem.style.webkitFlexOrder', ''); 22 23 flexitem.style.webkitFlexOrder = 2; 24 shouldBeEqualToString('flexitem.style.webkitFlexOrder', '2'); 25 26 flexitem.style.webkitFlexOrder = -1; 27 shouldBeEqualToString('flexitem.style.webkitFlexOrder', '-1'); 28 29 flexitem.style.webkitFlexOrder = 0; 30 shouldBeEqualToString('flexitem.style.webkitFlexOrder', '0'); 31 32 // -webkit-flex-order must be an integer. 33 flexitem.style.webkitFlexOrder = 1.5; 34 shouldBeEqualToString('flexitem.style.webkitFlexOrder', '0'); 35 36 flexitem.style.webkitFlexOrder = "test"; 37 shouldBeEqualToString('flexitem.style.webkitFlexOrder', '0'); 38 39 flexitem.style.webkitFlexOrder = ''; 40 shouldBeEqualToString('flexitem.style.webkitFlexOrder', ''); 41 20 42 successfullyParsed = true; -
trunk/Source/WebCore/ChangeLog
r93526 r93528 1 2011-08-22 Tony Chang <tony@chromium.org> 2 3 Add CSS parsing of -webkit-flex-order 4 https://bugs.webkit.org/show_bug.cgi?id=65384 5 6 The property is an int described here: 7 http://dev.w3.org/csswg/css3-flexbox/#flex-order 8 9 Doesn't do anything yet, just hooking it up. 10 11 Reviewed by Ojan Vafai. 12 13 * css/CSSComputedStyleDeclaration.cpp: 14 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 15 * css/CSSParser.cpp: 16 (WebCore::CSSParser::parseValue): 17 * css/CSSPropertyNames.in: 18 * css/CSSStyleApplyProperty.cpp: 19 (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): 20 * css/CSSStyleSelector.cpp: 21 (WebCore::CSSStyleSelector::applyProperty): 22 * rendering/style/RenderStyle.h: 23 (WebCore::InheritedFlags::flexOrder): 24 (WebCore::InheritedFlags::setFlexOrder): 25 (WebCore::InheritedFlags::initialFlexOrder): 26 * rendering/style/StyleFlexibleBoxData.cpp: 27 (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): 28 (WebCore::StyleFlexibleBoxData::operator==): 29 * rendering/style/StyleFlexibleBoxData.h: 30 1 31 2011-08-22 Adrienne Walker <enne@google.com> 2 32 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r93430 r93528 200 200 CSSPropertyWebkitDashboardRegion, 201 201 #endif 202 #if ENABLE(CSS3_FLEXBOX) 203 CSSPropertyWebkitFlexOrder, 204 #endif 202 205 CSSPropertyWebkitFontSmoothing, 203 206 CSSPropertyWebkitHighlight, … … 1100 1103 case CSSPropertyEmptyCells: 1101 1104 return primitiveValueCache->createValue(style->emptyCells()); 1105 #if ENABLE(CSS3_FLEXBOX) 1106 case CSSPropertyWebkitFlexOrder: 1107 return primitiveValueCache->createValue(style->flexOrder(), CSSPrimitiveValue::CSS_NUMBER); 1108 #endif 1102 1109 case CSSPropertyFloat: 1103 1110 return primitiveValueCache->createValue(style->floating()); -
trunk/Source/WebCore/css/CSSParser.cpp
r93430 r93528 1537 1537 validPrimitive = id == CSSValueSrgb || id == CSSValueDefault; 1538 1538 break; 1539 #if ENABLE(CSS3_FLEXBOX) 1540 case CSSPropertyWebkitFlexOrder: 1541 validPrimitive = validUnit(value, FInteger, true); 1542 break; 1543 #endif 1539 1544 case CSSPropertyWebkitMarquee: { 1540 1545 const int properties[5] = { CSSPropertyWebkitMarqueeDirection, CSSPropertyWebkitMarqueeIncrement, -
trunk/Source/WebCore/css/CSSPropertyNames.in
r93430 r93528 243 243 -webkit-column-width 244 244 -webkit-columns 245 #if defined(ENABLE_CSS3_FLEXBOX) && ENABLE_CSS3_FLEXBOX 246 -webkit-flex-order 247 #endif 245 248 -webkit-font-size-delta 246 249 -webkit-highlight -
trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp
r92742 r93528 890 890 setPropertyHandler(CSSPropertyCounterReset, new ApplyPropertyCounter<Reset>()); 891 891 892 #if ENABLE(CSS3_FLEXBOX) 893 setPropertyHandler(CSSPropertyWebkitFlexOrder, new ApplyPropertyDefault<int>(&RenderStyle::flexOrder, &RenderStyle::setFlexOrder, &RenderStyle::initialFlexOrder)); 894 #endif 895 892 896 setPropertyHandler(CSSPropertyFontStyle, new ApplyPropertyFont<FontItalic>(&FontDescription::italic, &FontDescription::setItalic, FontItalicOff)); 893 897 setPropertyHandler(CSSPropertyFontVariant, new ApplyPropertyFont<FontSmallCaps>(&FontDescription::smallCaps, &FontDescription::setSmallCaps, FontSmallCapsOff)); -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r93430 r93528 5111 5111 case CSSPropertyLetterSpacing: 5112 5112 case CSSPropertyWordSpacing: 5113 #if ENABLE(CSS3_FLEXBOX) 5114 case CSSPropertyWebkitFlexOrder: 5115 #endif 5113 5116 case CSSPropertyFontStyle: 5114 5117 case CSSPropertyFontVariant: -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r93430 r93528 677 677 float flexboxHeightPositiveFlex() const { return rareNonInheritedData->m_flexibleBox->m_heightPositiveFlex; } 678 678 float flexboxHeightNegativeFlex() const { return rareNonInheritedData->m_flexibleBox->m_heightNegativeFlex; } 679 int flexOrder() const { return rareNonInheritedData->m_flexibleBox->m_flexOrder; } 679 680 #endif 680 681 … … 1061 1062 void setFlexboxHeightPositiveFlex(float f) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_heightPositiveFlex, f); } 1062 1063 void setFlexboxHeightNegativeFlex(float f) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_heightNegativeFlex, f); } 1064 void setFlexOrder(int o) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexOrder, o); } 1063 1065 #endif 1064 1066 void setMarqueeIncrement(const Length& f) { SET_VAR(rareNonInheritedData.access()->m_marquee, increment, f); } … … 1315 1317 static float initialFlexboxHeightPositiveFlex() { return 0; } 1316 1318 static float initialFlexboxHeightNegativeFlex() { return 0; } 1319 static int initialFlexOrder() { return 1; } 1317 1320 static int initialMarqueeLoopCount() { return -1; } 1318 1321 static int initialMarqueeSpeed() { return 85; } -
trunk/Source/WebCore/rendering/style/StyleFlexibleBoxData.cpp
r91392 r93528 38 38 , m_heightPositiveFlex(RenderStyle::initialFlexboxHeightPositiveFlex()) 39 39 , m_heightNegativeFlex(RenderStyle::initialFlexboxHeightNegativeFlex()) 40 , m_flexOrder(RenderStyle::initialFlexOrder()) 40 41 { 41 42 } … … 47 48 , m_heightPositiveFlex(o.m_heightPositiveFlex) 48 49 , m_heightNegativeFlex(o.m_heightNegativeFlex) 50 , m_flexOrder(o.m_flexOrder) 49 51 { 50 52 } … … 53 55 { 54 56 return m_widthPositiveFlex == o.m_widthPositiveFlex && m_widthNegativeFlex == o.m_widthNegativeFlex 55 && m_heightPositiveFlex == o.m_heightPositiveFlex && m_heightNegativeFlex == o.m_heightNegativeFlex; 57 && m_heightPositiveFlex == o.m_heightPositiveFlex && m_heightNegativeFlex == o.m_heightNegativeFlex 58 && m_flexOrder == o.m_flexOrder; 56 59 } 57 60 -
trunk/Source/WebCore/rendering/style/StyleFlexibleBoxData.h
r91392 r93528 50 50 float m_heightNegativeFlex; 51 51 52 int m_flexOrder; 53 52 54 private: 53 55 StyleFlexibleBoxData();
Note: See TracChangeset
for help on using the changeset viewer.