Title: [107833] trunk
Revision
107833
Author
[email protected]
Date
2012-02-15 12:26:40 -0800 (Wed, 15 Feb 2012)

Log Message

getComputedStyle of flex-item-align:auto should resolve to it's parent's flex-align value
https://bugs.webkit.org/show_bug.cgi?id=76326

Reviewed by Tony Chang.

Source/WebCore:

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

LayoutTests:

* css3/flexbox/css-properties-expected.txt:
* platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (107832 => 107833)


--- trunk/LayoutTests/ChangeLog	2012-02-15 20:21:15 UTC (rev 107832)
+++ trunk/LayoutTests/ChangeLog	2012-02-15 20:26:40 UTC (rev 107833)
@@ -1,3 +1,15 @@
+2012-02-15  Ojan Vafai  <[email protected]>
+
+        getComputedStyle of flex-item-align:auto should resolve to it's parent's flex-align value
+        https://bugs.webkit.org/show_bug.cgi?id=76326
+
+        Reviewed by Tony Chang.
+
+        * css3/flexbox/css-properties-expected.txt:
+        * platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt:
+        * platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
+        * platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt:
+
 2012-02-15  Eric Carlson  <[email protected]>
 
         Unset the active flag when TextTrackCues go away

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


--- trunk/LayoutTests/css3/flexbox/css-properties-expected.txt	2012-02-15 20:21:15 UTC (rev 107832)
+++ trunk/LayoutTests/css3/flexbox/css-properties-expected.txt	2012-02-15 20:26:40 UTC (rev 107833)
@@ -29,10 +29,10 @@
 PASS flexbox.style.webkitFlexPack is ""
 PASS window.getComputedStyle(flexbox, null).webkitFlexPack is "start"
 PASS flexbox.style.webkitFlexItemAlign is ""
-FAIL window.getComputedStyle(flexbox, null).webkitFlexItemAlign should be stretch. Was auto.
+PASS window.getComputedStyle(flexbox, null).webkitFlexItemAlign is "stretch"
 PASS flexbox.style.webkitFlexItemAlign is ""
 PASS flexbox.style.webkitFlexItemAlign is "auto"
-FAIL window.getComputedStyle(flexbox, null).webkitFlexItemAlign should be stretch. Was auto.
+PASS window.getComputedStyle(flexbox, null).webkitFlexItemAlign is "stretch"
 PASS flexbox.style.webkitFlexItemAlign is "start"
 PASS window.getComputedStyle(flexbox, null).webkitFlexItemAlign is "start"
 PASS flexbox.style.webkitFlexItemAlign is "end"
@@ -44,35 +44,35 @@
 PASS flexbox.style.webkitFlexItemAlign is "baseline"
 PASS window.getComputedStyle(flexbox, null).webkitFlexItemAlign is "baseline"
 PASS flexbox.style.webkitFlexItemAlign is ""
-FAIL window.getComputedStyle(flexbox, null).webkitFlexItemAlign should be stretch. Was auto.
+PASS window.getComputedStyle(flexbox, null).webkitFlexItemAlign is "stretch"
 PASS flexbox.style.webkitFlexAlign is ""
 PASS window.getComputedStyle(flexbox, null).webkitFlexAlign is "stretch"
-FAIL window.getComputedStyle(flexitem, null).webkitFlexItemAlign should be stretch. Was auto.
+PASS window.getComputedStyle(flexitem, null).webkitFlexItemAlign is "stretch"
 PASS flexbox.style.webkitFlexAlign is ""
 PASS flexbox.style.webkitFlexAlign is ""
 PASS window.getComputedStyle(flexbox, null).webkitFlexAlign is "stretch"
-FAIL window.getComputedStyle(flexitem, null).webkitFlexItemAlign should be stretch. Was auto.
+PASS window.getComputedStyle(flexitem, null).webkitFlexItemAlign is "stretch"
 PASS flexbox.style.webkitFlexAlign is "start"
 PASS window.getComputedStyle(flexbox, null).webkitFlexAlign is "start"
-FAIL window.getComputedStyle(flexitem, null).webkitFlexItemAlign should be start. Was auto.
+PASS window.getComputedStyle(flexitem, null).webkitFlexItemAlign is "start"
 PASS flexbox.style.webkitFlexAlign is "end"
 PASS window.getComputedStyle(flexbox, null).webkitFlexAlign is "end"
-FAIL window.getComputedStyle(flexitem, null).webkitFlexItemAlign should be end. Was auto.
+PASS window.getComputedStyle(flexitem, null).webkitFlexItemAlign is "end"
 PASS flexbox.style.webkitFlexAlign is "center"
 PASS window.getComputedStyle(flexbox, null).webkitFlexAlign is "center"
-FAIL window.getComputedStyle(flexitem, null).webkitFlexItemAlign should be center. Was auto.
+PASS window.getComputedStyle(flexitem, null).webkitFlexItemAlign is "center"
 PASS flexbox.style.webkitFlexAlign is "stretch"
 PASS window.getComputedStyle(flexbox, null).webkitFlexAlign is "stretch"
-FAIL window.getComputedStyle(flexitem, null).webkitFlexItemAlign should be stretch. Was auto.
+PASS window.getComputedStyle(flexitem, null).webkitFlexItemAlign is "stretch"
 PASS flexbox.style.webkitFlexAlign is "baseline"
 PASS window.getComputedStyle(flexbox, null).webkitFlexAlign is "baseline"
-FAIL window.getComputedStyle(flexitem, null).webkitFlexItemAlign should be baseline. Was auto.
+PASS window.getComputedStyle(flexitem, null).webkitFlexItemAlign is "baseline"
 PASS flexbox.style.webkitFlexAlign is ""
 PASS window.getComputedStyle(flexbox, null).webkitFlexAlign is "stretch"
-FAIL window.getComputedStyle(flexitem, null).webkitFlexItemAlign should be stretch. Was auto.
+PASS window.getComputedStyle(flexitem, null).webkitFlexItemAlign is "stretch"
 PASS flexbox.style.webkitFlexAlign is ""
 PASS window.getComputedStyle(flexbox, null).webkitFlexAlign is "stretch"
-FAIL window.getComputedStyle(flexitem, null).webkitFlexItemAlign should be stretch. Was auto.
+PASS window.getComputedStyle(flexitem, null).webkitFlexItemAlign is "stretch"
 PASS window.getComputedStyle(detachedFlexbox, null).webkitFlexItemAlign is ""
 PASS window.getComputedStyle(detachedFlexItem, null).webkitFlexItemAlign is ""
 PASS flexbox.style.webkitFlexDirection is ""

Modified: trunk/LayoutTests/platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt (107832 => 107833)


--- trunk/LayoutTests/platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt	2012-02-15 20:21:15 UTC (rev 107832)
+++ trunk/LayoutTests/platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt	2012-02-15 20:26:40 UTC (rev 107833)
@@ -145,7 +145,7 @@
 -webkit-flex-order: 0;
 -webkit-flex-pack: start;
 -webkit-flex-align: stretch;
--webkit-flex-item-align: auto;
+-webkit-flex-item-align: stretch;
 -webkit-flex-direction: row;
 -webkit-flex-flow: row nowrap;
 -webkit-flex-wrap: nowrap;

Modified: trunk/LayoutTests/platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt (107832 => 107833)


--- trunk/LayoutTests/platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt	2012-02-15 20:21:15 UTC (rev 107832)
+++ trunk/LayoutTests/platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt	2012-02-15 20:26:40 UTC (rev 107833)
@@ -144,7 +144,7 @@
     -webkit-flex-order: 0
     -webkit-flex-pack: start
     -webkit-flex-align: stretch
-    -webkit-flex-item-align: auto
+    -webkit-flex-item-align: stretch
     -webkit-flex-direction: row
     -webkit-flex-flow: row nowrap
     -webkit-flex-wrap: nowrap

Modified: trunk/LayoutTests/platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt (107832 => 107833)


--- trunk/LayoutTests/platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt	2012-02-15 20:21:15 UTC (rev 107832)
+++ trunk/LayoutTests/platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt	2012-02-15 20:26:40 UTC (rev 107833)
@@ -288,7 +288,7 @@
 rect: style.getPropertyCSSValue(-webkit-flex-pack) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(-webkit-flex-align) : stretch
 rect: style.getPropertyCSSValue(-webkit-flex-align) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(-webkit-flex-item-align) : auto
+rect: style.getPropertyValue(-webkit-flex-item-align) : stretch
 rect: style.getPropertyCSSValue(-webkit-flex-item-align) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(-webkit-flex-direction) : row
 rect: style.getPropertyCSSValue(-webkit-flex-direction) : [object CSSPrimitiveValue]
@@ -802,7 +802,7 @@
 g: style.getPropertyCSSValue(-webkit-flex-pack) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(-webkit-flex-align) : stretch
 g: style.getPropertyCSSValue(-webkit-flex-align) : [object CSSPrimitiveValue]
-g: style.getPropertyValue(-webkit-flex-item-align) : auto
+g: style.getPropertyValue(-webkit-flex-item-align) : stretch
 g: style.getPropertyCSSValue(-webkit-flex-item-align) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(-webkit-flex-direction) : row
 g: style.getPropertyCSSValue(-webkit-flex-direction) : [object CSSPrimitiveValue]

Modified: trunk/Source/WebCore/ChangeLog (107832 => 107833)


--- trunk/Source/WebCore/ChangeLog	2012-02-15 20:21:15 UTC (rev 107832)
+++ trunk/Source/WebCore/ChangeLog	2012-02-15 20:26:40 UTC (rev 107833)
@@ -1,3 +1,13 @@
+2012-02-15  Ojan Vafai  <[email protected]>
+
+        getComputedStyle of flex-item-align:auto should resolve to it's parent's flex-align value
+        https://bugs.webkit.org/show_bug.cgi?id=76326
+
+        Reviewed by Tony Chang.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+
 2012-02-15  Sadrul Habib Chowdhury  <[email protected]>
 
         Notify ChromeClient when touch-event handlers are installed/removed.

Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (107832 => 107833)


--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2012-02-15 20:21:15 UTC (rev 107832)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2012-02-15 20:26:40 UTC (rev 107833)
@@ -1584,8 +1584,8 @@
         case CSSPropertyWebkitFlexAlign:
             return cssValuePool->createValue(style->flexAlign());
         case CSSPropertyWebkitFlexItemAlign:
-            // FIXME: If flex-item-align:auto, then we should return the parent's flex-align.
-            // http://webkit.org/b/76326
+            if (style->flexItemAlign() == AlignAuto && m_node && m_node->parentNode() && m_node->parentNode()->computedStyle())
+                return cssValuePool->createValue(m_node->parentNode()->computedStyle()->flexAlign());
             return cssValuePool->createValue(style->flexItemAlign());
         case CSSPropertyWebkitFlexDirection:
             return cssValuePool->createValue(style->flexDirection());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to