Title: [119455] trunk
Revision
119455
Author
[email protected]
Date
2012-06-04 21:38:19 -0700 (Mon, 04 Jun 2012)

Log Message

CSS property 'order' should be a number rather than an int
https://bugs.webkit.org/show_bug.cgi?id=88111

Reviewed by Ojan Vafai.

Source/WebCore:

This changed in the spec:
http://dev.w3.org/csswg/css3-flexbox/#order

I also fixed the compile with CSS3_FLEXBOX disabled.

No new tests, covered by existing tests.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSProperty.cpp: Parse as float, remove clamping for HashMap<int>.
(WebCore::CSSProperty::isInheritedProperty):
* css/StyleBuilder.cpp:
(WebCore::StyleBuilder::StyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
* rendering/RenderFlexibleBox.cpp: Remove traits for HashMap<int>.
(RenderFlexibleBox::OrderIterator):
* rendering/RenderFlexibleBox.h:
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.h:
(StyleRareNonInheritedData):

LayoutTests:

* css3/flexbox/css-properties-expected.txt:
* css3/flexbox/css-properties.html: Allow decimal values.
* css3/flexbox/flex-order.html: Fix tests based on float limits.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (119454 => 119455)


--- trunk/LayoutTests/ChangeLog	2012-06-05 04:29:31 UTC (rev 119454)
+++ trunk/LayoutTests/ChangeLog	2012-06-05 04:38:19 UTC (rev 119455)
@@ -1,3 +1,14 @@
+2012-06-04  Tony Chang  <[email protected]>
+
+        CSS property 'order' should be a number rather than an int
+        https://bugs.webkit.org/show_bug.cgi?id=88111
+
+        Reviewed by Ojan Vafai.
+
+        * css3/flexbox/css-properties-expected.txt:
+        * css3/flexbox/css-properties.html: Allow decimal values.
+        * css3/flexbox/flex-order.html: Fix tests based on float limits.
+
 2012-06-04  Leo Yang  <[email protected]>
 
         Syntax error in fast/filesystem/resources/file-writer-gc-blob.js

Modified: trunk/LayoutTests/css3/flexbox/css-properties-expected.txt (119454 => 119455)


--- trunk/LayoutTests/css3/flexbox/css-properties-expected.txt	2012-06-05 04:29:31 UTC (rev 119454)
+++ trunk/LayoutTests/css3/flexbox/css-properties-expected.txt	2012-06-05 04:38:19 UTC (rev 119455)
@@ -13,7 +13,7 @@
 PASS flexitem.style.webkitOrder is "-1"
 PASS flexitem.style.webkitOrder is "0"
 PASS flexitem.style.webkitOrder is "0"
-PASS flexitem.style.webkitOrder is "0"
+PASS flexitem.style.webkitOrder is "1.5"
 PASS flexitem.style.webkitOrder is ""
 PASS flexbox.style.webkitJustifyContent is ""
 PASS window.getComputedStyle(flexbox, null).webkitJustifyContent is "flex-start"

Modified: trunk/LayoutTests/css3/flexbox/css-properties.html (119454 => 119455)


--- trunk/LayoutTests/css3/flexbox/css-properties.html	2012-06-05 04:29:31 UTC (rev 119454)
+++ trunk/LayoutTests/css3/flexbox/css-properties.html	2012-06-05 04:38:19 UTC (rev 119455)
@@ -40,13 +40,12 @@
 flexitem.style.webkitOrder = 0;
 shouldBeEqualToString('flexitem.style.webkitOrder', '0');
 
-// -webkit-order must be an integer.
-flexitem.style.webkitOrder = 1.5;
-shouldBeEqualToString('flexitem.style.webkitOrder', '0');
-
 flexitem.style.webkitOrder = "test";
 shouldBeEqualToString('flexitem.style.webkitOrder', '0');
 
+flexitem.style.webkitOrder = 1.5;
+shouldBeEqualToString('flexitem.style.webkitOrder', '1.5');
+
 flexitem.style.webkitOrder = '';
 shouldBeEqualToString('flexitem.style.webkitOrder', '');
 

Modified: trunk/LayoutTests/css3/flexbox/flex-order.html (119454 => 119455)


--- trunk/LayoutTests/css3/flexbox/flex-order.html	2012-06-05 04:29:31 UTC (rev 119454)
+++ trunk/LayoutTests/css3/flexbox/flex-order.html	2012-06-05 04:38:19 UTC (rev 119455)
@@ -33,77 +33,76 @@
 <body>
 
 <div style="display: -webkit-flex" class="horizontal-box">
-  <div class="first"  style="-webkit-flex: 1; -webkit-order: 0"></div>
-  <div class="second" style="-webkit-flex: 1;"></div>
-  <div class="third"  style="-webkit-flex: 1; -webkit-order: 3"></div>
-  <div class="fourth" style="-webkit-flex: 1; -webkit-order: 20"></div>
+  <div class="first"  style="-webkit-order: 0"></div>
+  <div class="second" style=""></div>
+  <div class="third"  style="-webkit-order: 3"></div>
+  <div class="fourth" style="-webkit-order: 20"></div>
 </div>
 
 <div style="display: -webkit-flex" class="horizontal-box">
-  <div class="fourth" style="-webkit-flex: 1; -webkit-order: 4"></div>
-  <div class="third"  style="-webkit-flex: 1; -webkit-order: 3"></div>
-  <div class="second" style="-webkit-flex: 1; -webkit-order: 2"></div>
-  <div class="first"  style="-webkit-flex: 1; -webkit-order: 1"></div>
+  <div class="fourth" style="-webkit-order: 4"></div>
+  <div class="third"  style="-webkit-order: 3"></div>
+  <div class="second" style="-webkit-order: 2"></div>
+  <div class="first"  style="-webkit-order: 1"></div>
 </div>
 
 <!-- The example from the spec. -->
 <div style="display: -webkit-flex" class="horizontal-box">
-  <div class="third"  style="-webkit-flex: 1; -webkit-order: 1"></div>
-  <div class="first"  style="-webkit-flex: 1"></div>
-  <div class="fourth" style="-webkit-flex: 1; -webkit-order: 1"></div>
-  <div class="second" style="-webkit-flex: 1; -webkit-order: 0"></div>
+  <div class="third"  style="-webkit-order: 1"></div>
+  <div class="first"  style=""></div>
+  <div class="fourth" style="-webkit-order: 1"></div>
+  <div class="second" style="-webkit-order: 0"></div>
 </div>
 
 <div style="display: -webkit-flex" class="horizontal-box">
-  <div class="fourth" style="-webkit-flex: 1; -webkit-order: 2"></div>
-  <div class="second" style="-webkit-flex: 1"></div>
-  <div class="third"  style="-webkit-flex: 1"></div>
-  <div class="first"  style="-webkit-flex: 1; -webkit-order: -10"></div>
+  <div class="fourth" style="-webkit-order: 2"></div>
+  <div class="second" style=""></div>
+  <div class="third"  style=""></div>
+  <div class="first"  style="-webkit-order: -10"></div>
 </div>
 
 <div style="display: -webkit-flex" class="horizontal-box">
-  <div class="fourth" style="-webkit-flex: 1; -webkit-order: 2000000000"></div>
-  <div class="second" style="-webkit-flex: 1; -webkit-order: 1000000000"></div>
-  <div class="third"  style="-webkit-flex: 1; -webkit-order: 1000000000"></div>
-  <div class="first"  style="-webkit-flex: 1; -webkit-order: -1000000000"></div>
+  <div class="fourth" style="-webkit-order: 2000000000"></div>
+  <div class="second" style="-webkit-order: 1000000000"></div>
+  <div class="third"  style="-webkit-order: 1000000000"></div>
+  <div class="first"  style="-webkit-order: -1000000000"></div>
 </div>
 
-<!-- Floating numbers are ignored and we use the default of 1 instead. -->
+<!-- Decimal numbers are OK. -->
 <div style="display: -webkit-flex" class="horizontal-box">
-  <div class="second" style="-webkit-flex: 1; -webkit-order: 2.5"></div>
-  <div class="fourth" style="-webkit-flex: 1; -webkit-order: 2"></div>
-  <div class="first"  style="-webkit-flex: 1; -webkit-order: -1"></div>
-  <div class="third"  style="-webkit-flex: 1"></div>
+  <div class="fourth" style="-webkit-order: 2.5"></div>
+  <div class="third"  style="-webkit-order: 1.1"></div>
+  <div class="first"  style="-webkit-order: -1.7"></div>
+  <div class="second" style=""></div>
 </div>
 
 <div style="display: -webkit-flex" class="horizontal-box">
-  <div class="second" style="-webkit-flex: 1; -webkit-order: 0"></div>
-  <div class="first" style="-webkit-flex: 1; -webkit-order: -1"></div>
-  <div class="fourth"  style="-webkit-flex: 1; -webkit-order: 1"></div>
-  <div class="third"  style="-webkit-flex: 1"></div>
+  <div class="second" style="-webkit-order: 0"></div>
+  <div class="first"  style="-webkit-order: -1"></div>
+  <div class="fourth" style="-webkit-order: 1"></div>
+  <div class="third"  style=""></div>
 </div>
 
-<!-- Values greater than what can be stored in an int are clamped from
-     -2,147,483,646 (int min + 2) to 2,147,483,647. -->
+<!-- Values greater than what can be stored in a float are clamped. -->
 <div style="display: -webkit-flex" class="horizontal-box">
-  <div class="third"  style="-webkit-flex: 1; -webkit-order: 4000000000"></div>
-  <div class="fourth" style="-webkit-flex: 1; -webkit-order: 3000000000"></div>
-  <div class="first"  style="-webkit-flex: 1;"></div>
-  <div class="second" style="-webkit-flex: 1; -webkit-order: 2147483646"></div>
+  <div class="third"  style="-webkit-order: 99999999999999999999999999999999999999999"></div>
+  <div class="fourth" style="-webkit-order: 88888888888888888888888888888888888888888"></div>
+  <div class="first"  style=""></div>
+  <div class="second" style="-webkit-order: 2147483646"></div>
 </div>
 
 <div style="display: -webkit-flex" class="horizontal-box">
-  <div class="second" style="-webkit-flex: 1; -webkit-order: 4000000000"></div>
-  <div class="third"  style="-webkit-flex: 1; -webkit-order: 3000000000"></div>
-  <div class="first"  style="-webkit-flex: 1;"></div>
-  <div class="fourth" style="-webkit-flex: 1; -webkit-order: 2147483647"></div>
+  <div class="fourth" style="-webkit-order: 4000000000"></div>
+  <div class="third"  style="-webkit-order: 3000000000"></div>
+  <div class="first"  style=""></div>
+  <div class="second" style="-webkit-order: 2147483647"></div>
 </div>
 
 <div style="display: -webkit-flex" class="horizontal-box">
-  <div class="third"  style="-webkit-flex: 1; -webkit-order: -2147483645"></div>
-  <div class="first"  style="-webkit-flex: 1; -webkit-order: -2147483646"></div>
-  <div class="second" style="-webkit-flex: 1; -webkit-order: -2147483647"></div>
-  <div class="fourth" style="-webkit-flex: 1;"></div>
+  <div class="first"  style="-webkit-order: -99999999999999999999999999999999999999999"></div>
+  <div class="second" style="-webkit-order: -88888888888888888888888888888888888888888"></div>
+  <div class="third"  style="-webkit-order: -77777777777777777777777777777777777777777"></div>
+  <div class="fourth" style=""></div>
 </div>
 
 <!-- This should not crash. -->

Modified: trunk/Source/WebCore/ChangeLog (119454 => 119455)


--- trunk/Source/WebCore/ChangeLog	2012-06-05 04:29:31 UTC (rev 119454)
+++ trunk/Source/WebCore/ChangeLog	2012-06-05 04:38:19 UTC (rev 119455)
@@ -1,3 +1,35 @@
+2012-06-04  Tony Chang  <[email protected]>
+
+        CSS property 'order' should be a number rather than an int
+        https://bugs.webkit.org/show_bug.cgi?id=88111
+
+        Reviewed by Ojan Vafai.
+
+        This changed in the spec:
+        http://dev.w3.org/csswg/css3-flexbox/#order
+
+        I also fixed the compile with CSS3_FLEXBOX disabled.
+
+        No new tests, covered by existing tests.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore):
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        * css/CSSProperty.cpp: Parse as float, remove clamping for HashMap<int>.
+        (WebCore::CSSProperty::isInheritedProperty):
+        * css/StyleBuilder.cpp:
+        (WebCore::StyleBuilder::StyleBuilder):
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::collectMatchingRulesForList):
+        * rendering/RenderFlexibleBox.cpp: Remove traits for HashMap<int>.
+        (RenderFlexibleBox::OrderIterator):
+        * rendering/RenderFlexibleBox.h:
+        * rendering/style/RenderStyle.h:
+        * rendering/style/StyleRareNonInheritedData.h:
+        (StyleRareNonInheritedData):
+
 2012-06-04  Hugo Parente Lima  <[email protected]>
 
         Turn LEGACY_VIEWPORT_ADAPTION USE flag into an ENABLE flag.

Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (119454 => 119455)


--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2012-06-05 04:29:31 UTC (rev 119454)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2012-06-05 04:38:19 UTC (rev 119455)
@@ -278,7 +278,9 @@
     CSSPropertyWebkitMaskRepeat,
     CSSPropertyWebkitMaskSize,
     CSSPropertyWebkitNbspMode,
+#if ENABLE(CSS3_FLEXBOX)
     CSSPropertyWebkitOrder,
+#endif
 #if ENABLE(OVERFLOW_SCROLLING)
     CSSPropertyWebkitOverflowScrolling,
 #endif
@@ -1651,7 +1653,7 @@
             return list.release();
         }
         case CSSPropertyWebkitOrder:
-            return cssValuePool().createValue(style->order(), CSSPrimitiveValue::CSS_NUMBER);
+            return cssValuePool().createValue(style->order());
         case CSSPropertyWebkitJustifyContent:
             return cssValuePool().createValue(style->justifyContent());
         case CSSPropertyWebkitAlignItems:

Modified: trunk/Source/WebCore/css/CSSParser.cpp (119454 => 119455)


--- trunk/Source/WebCore/css/CSSParser.cpp	2012-06-05 04:29:31 UTC (rev 119454)
+++ trunk/Source/WebCore/css/CSSParser.cpp	2012-06-05 04:38:19 UTC (rev 119455)
@@ -2096,12 +2096,7 @@
             parsedValue = parseFlex(m_valueList.get());
         break;
     case CSSPropertyWebkitOrder:
-        if (validUnit(value, FInteger, CSSStrictMode)) {
-            // We restrict the smallest value to int min + 2 because we use int min and int min + 1 as special values in a hash set.
-            parsedValue = cssValuePool().createValue(max(static_cast<double>(std::numeric_limits<int>::min() + 2), value->fValue),
-                                                             static_cast<CSSPrimitiveValue::UnitTypes>(value->unit));
-            m_valueList->next();
-        }
+        validPrimitive = validUnit(value, FNumber);
         break;
 #endif
     case CSSPropertyWebkitMarquee:

Modified: trunk/Source/WebCore/css/CSSProperty.cpp (119454 => 119455)


--- trunk/Source/WebCore/css/CSSProperty.cpp	2012-06-05 04:29:31 UTC (rev 119454)
+++ trunk/Source/WebCore/css/CSSProperty.cpp	2012-06-05 04:38:19 UTC (rev 119455)
@@ -547,6 +547,7 @@
     case CSSPropertyWebkitFlexFlow:
     case CSSPropertyWebkitFlexWrap:
     case CSSPropertyWebkitJustifyContent:
+    case CSSPropertyWebkitOrder:
 #endif
     case CSSPropertyWebkitFontSizeDelta:
     case CSSPropertyWebkitGridColumns:
@@ -595,7 +596,6 @@
     case CSSPropertyWebkitMaxLogicalHeight:
     case CSSPropertyWebkitMinLogicalWidth:
     case CSSPropertyWebkitMinLogicalHeight:
-    case CSSPropertyWebkitOrder:
     case CSSPropertyWebkitPaddingAfter:
     case CSSPropertyWebkitPaddingBefore:
     case CSSPropertyWebkitPaddingEnd:

Modified: trunk/Source/WebCore/css/StyleBuilder.cpp (119454 => 119455)


--- trunk/Source/WebCore/css/StyleBuilder.cpp	2012-06-05 04:29:31 UTC (rev 119454)
+++ trunk/Source/WebCore/css/StyleBuilder.cpp	2012-06-05 04:38:19 UTC (rev 119455)
@@ -1944,6 +1944,7 @@
     setPropertyHandler(CSSPropertyWebkitFlexFlow, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitFlexDirection, CSSPropertyWebkitFlexWrap>::createHandler());
     setPropertyHandler(CSSPropertyWebkitFlexWrap, ApplyPropertyDefault<EFlexWrap, &RenderStyle::flexWrap, EFlexWrap, &RenderStyle::setFlexWrap, EFlexWrap, &RenderStyle::initialFlexWrap>::createHandler());
     setPropertyHandler(CSSPropertyWebkitJustifyContent, ApplyPropertyDefault<EJustifyContent, &RenderStyle::justifyContent, EJustifyContent, &RenderStyle::setJustifyContent, EJustifyContent, &RenderStyle::initialJustifyContent>::createHandler());
+    setPropertyHandler(CSSPropertyWebkitOrder, ApplyPropertyDefault<float, &RenderStyle::order, float, &RenderStyle::setOrder, float, &RenderStyle::initialOrder>::createHandler());
 #endif
 #if ENABLE(CSS_REGIONS)
     setPropertyHandler(CSSPropertyWebkitFlowFrom, ApplyPropertyString<MapNoneToNull, &RenderStyle::regionThread, &RenderStyle::setRegionThread, &RenderStyle::initialRegionThread>::createHandler());
@@ -1989,7 +1990,6 @@
     setPropertyHandler(CSSPropertyWebkitMaskSize, ApplyPropertyFillLayer<FillSize, CSSPropertyWebkitMaskSize, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isSizeSet, &FillLayer::size, &FillLayer::setSize, &FillLayer::clearSize, &FillLayer::initialFillSize, &StyleResolver::mapFillSize>::createHandler());
     setPropertyHandler(CSSPropertyWebkitMatchNearestMailBlockquoteColor, ApplyPropertyDefault<EMatchNearestMailBlockquoteColor, &RenderStyle::matchNearestMailBlockquoteColor, EMatchNearestMailBlockquoteColor, &RenderStyle::setMatchNearestMailBlockquoteColor, EMatchNearestMailBlockquoteColor, &RenderStyle::initialMatchNearestMailBlockquoteColor>::createHandler());
     setPropertyHandler(CSSPropertyWebkitNbspMode, ApplyPropertyDefault<ENBSPMode, &RenderStyle::nbspMode, ENBSPMode, &RenderStyle::setNBSPMode, ENBSPMode, &RenderStyle::initialNBSPMode>::createHandler());
-    setPropertyHandler(CSSPropertyWebkitOrder, ApplyPropertyDefault<int, &RenderStyle::order, int, &RenderStyle::setOrder, int, &RenderStyle::initialOrder>::createHandler());
     setPropertyHandler(CSSPropertyWebkitPerspectiveOrigin, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitPerspectiveOriginX, CSSPropertyWebkitPerspectiveOriginY>::createHandler());
     setPropertyHandler(CSSPropertyWebkitPerspectiveOriginX, ApplyPropertyLength<&RenderStyle::perspectiveOriginX, &RenderStyle::setPerspectiveOriginX, &RenderStyle::initialPerspectiveOriginX>::createHandler());
     setPropertyHandler(CSSPropertyWebkitPerspectiveOriginY, ApplyPropertyLength<&RenderStyle::perspectiveOriginY, &RenderStyle::setPerspectiveOriginY, &RenderStyle::initialPerspectiveOriginY>::createHandler());

Modified: trunk/Source/WebCore/css/StyleResolver.cpp (119454 => 119455)


--- trunk/Source/WebCore/css/StyleResolver.cpp	2012-06-05 04:29:31 UTC (rev 119454)
+++ trunk/Source/WebCore/css/StyleResolver.cpp	2012-06-05 04:38:19 UTC (rev 119455)
@@ -4131,6 +4131,7 @@
     case CSSPropertyWebkitFlexFlow:
     case CSSPropertyWebkitFlexWrap:
     case CSSPropertyWebkitJustifyContent:
+    case CSSPropertyWebkitOrder:
 #endif
 #if ENABLE(CSS_REGIONS)
     case CSSPropertyWebkitFlowFrom:
@@ -4171,7 +4172,6 @@
     case CSSPropertyWebkitMaskSize:
     case CSSPropertyWebkitMatchNearestMailBlockquoteColor:
     case CSSPropertyWebkitNbspMode:
-    case CSSPropertyWebkitOrder:
     case CSSPropertyWebkitPerspectiveOrigin:
     case CSSPropertyWebkitPerspectiveOriginX:
     case CSSPropertyWebkitPerspectiveOriginY:

Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp (119454 => 119455)


--- trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp	2012-06-05 04:29:31 UTC (rev 119454)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp	2012-06-05 04:38:19 UTC (rev 119455)
@@ -39,16 +39,6 @@
 
 namespace WebCore {
 
-// Normally, -1 and 0 are not valid in a HashSet, but these are relatively likely flex-order values. Instead,
-// we make the two smallest int values invalid flex-order values (in the css parser code we clamp them to
-// int min + 2).
-struct RenderFlexibleBox::OrderHashTraits : WTF::GenericHashTraits<int> {
-    static const bool emptyValueIsZero = false;
-    static int emptyValue() { return std::numeric_limits<int>::min(); }
-    static void constructDeletedValue(int& slot) { slot = std::numeric_limits<int>::min() + 1; }
-    static bool isDeletedValue(int value) { return value == std::numeric_limits<int>::min() + 1; }
-};
-
 class RenderFlexibleBox::OrderIterator {
 public:
     OrderIterator(RenderFlexibleBox* flexibleBox, const OrderHashSet& orderValues)
@@ -99,8 +89,8 @@
 private:
     RenderFlexibleBox* m_flexibleBox;
     RenderBox* m_currentChild;
-    Vector<int> m_orderValues;
-    Vector<int>::const_iterator m_orderValuesIterator;
+    Vector<float> m_orderValues;
+    Vector<float>::const_iterator m_orderValuesIterator;
 };
 
 struct RenderFlexibleBox::LineContext {

Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.h (119454 => 119455)


--- trunk/Source/WebCore/rendering/RenderFlexibleBox.h	2012-06-05 04:29:31 UTC (rev 119454)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.h	2012-06-05 04:38:19 UTC (rev 119455)
@@ -59,8 +59,7 @@
         NoFlipForRowReverse,
     };
 
-    struct OrderHashTraits;
-    typedef HashSet<int, DefaultHash<int>::Hash, OrderHashTraits> OrderHashSet;
+    typedef HashSet<float> OrderHashSet;
 
     class OrderIterator;
     typedef WTF::HashMap<const RenderBox*, LayoutUnit> InflexibleFlexItemSize;

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (119454 => 119455)


--- trunk/Source/WebCore/rendering/style/RenderStyle.h	2012-06-05 04:29:31 UTC (rev 119454)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h	2012-06-05 04:38:19 UTC (rev 119455)
@@ -804,7 +804,7 @@
     EBoxOrient boxOrient() const { return static_cast<EBoxOrient>(rareNonInheritedData->m_deprecatedFlexibleBox->orient); }
     EBoxPack boxPack() const { return static_cast<EBoxPack>(rareNonInheritedData->m_deprecatedFlexibleBox->pack); }
 
-    int order() const { return rareNonInheritedData->m_order; }
+    float order() const { return rareNonInheritedData->m_order; }
     float positiveFlex() const { return rareNonInheritedData->m_flexibleBox->m_positiveFlex; }
     float negativeFlex() const { return rareNonInheritedData->m_flexibleBox->m_negativeFlex; }
     Length flexPreferredSize() const { return rareNonInheritedData->m_flexibleBox->m_preferredSize; }
@@ -1249,7 +1249,7 @@
     void setPositiveFlex(float f) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_positiveFlex, f); }
     void setNegativeFlex(float f) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_negativeFlex, f); }
     void setFlexPreferredSize(Length l) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_preferredSize, l); }
-    void setOrder(int o) { SET_VAR(rareNonInheritedData, m_order, o); }
+    void setOrder(float o) { SET_VAR(rareNonInheritedData, m_order, o); }
     void setAlignContent(EAlignContent p) { SET_VAR(rareNonInheritedData, m_alignContent, p); }
     void setAlignItems(EAlignItems a) { SET_VAR(rareNonInheritedData, m_alignItems, a); }
     void setAlignSelf(EAlignItems a) { SET_VAR(rareNonInheritedData, m_alignSelf, a); }
@@ -1583,7 +1583,7 @@
     static float initialPositiveFlex() { return 1; }
     static float initialNegativeFlex() { return 1; }
     static Length initialFlexPreferredSize() { return Length(Auto); }
-    static int initialOrder() { return 0; }
+    static float initialOrder() { return 0; }
     static EAlignContent initialAlignContent() { return AlignContentStretch; }
     static EAlignItems initialAlignItems() { return AlignStretch; }
     static EAlignItems initialAlignSelf() { return AlignAuto; }

Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h (119454 => 119455)


--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h	2012-06-05 04:29:31 UTC (rev 119454)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h	2012-06-05 04:38:19 UTC (rev 119455)
@@ -146,7 +146,7 @@
     Color m_visitedLinkBorderTopColor;
     Color m_visitedLinkBorderBottomColor;
 
-    int m_order;
+    float m_order;
 
     AtomicString m_flowThread;
     AtomicString m_regionThread;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to