Title: [107659] trunk
Revision
107659
Author
[email protected]
Date
2012-02-13 18:40:45 -0800 (Mon, 13 Feb 2012)

Log Message

Source/_javascript_Core: Replace old strtod with new strtod
https://bugs.webkit.org/show_bug.cgi?id=68044

Patch by Mark Hahnenberg <[email protected]> on 2012-02-12
Reviewed by Geoffrey Garen.

* parser/Lexer.cpp: Added template argument. This version allows junk after numbers.
(JSC::::lex):
* runtime/JSGlobalObjectFunctions.cpp: Ditto.
(JSC::parseInt):
(JSC::jsStrDecimalLiteral):
* runtime/LiteralParser.cpp: Ditto.
(JSC::::Lexer::lexNumber):
* wtf/dtoa.cpp: Replaced old strtod with a new version that uses the new StringToDoubleConverter.
It takes a template argument to allow clients to determine statically whether it should allow
junk after the numbers or not.
(WTF):
(WTF::strtod):
* wtf/dtoa.h:
(WTF):
* wtf/text/WTFString.cpp: Added template argument. This version does not allow junk after numbers.
(WTF::toDoubleType):

Source/WebCore: rtl + flex-direction:column is positioning elements incorrectly
https://bugs.webkit.org/show_bug.cgi?id=78555

Reviewed by Tony Chang.

Do the y-axis flipping after we have adjusted the y-position for
flex-align instead of before.

Tests: css3/flexbox/flex-align-baseline.html
       css3/flexbox/flex-align-end.html

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::alignChildren):
The amount we adjust by also needs to be flipped for rtl+column,
so the flipping needs to be done after we align the flex items.

LayoutTests: rtl + flex-direction:column is positioning elements incorrectly
https://bugs.webkit.org/show_bug.cgi?id=78555

Reviewed by Tony Chang.

* css3/flexbox/flex-align-baseline-expected.txt: Added.
* css3/flexbox/flex-align-baseline.html: Added.
* css3/flexbox/flex-align-end-expected.txt: Added.
* css3/flexbox/flex-align-end.html: Added.
* css3/flexbox/true-centering-expected.txt:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (107658 => 107659)


--- trunk/LayoutTests/ChangeLog	2012-02-14 02:39:24 UTC (rev 107658)
+++ trunk/LayoutTests/ChangeLog	2012-02-14 02:40:45 UTC (rev 107659)
@@ -1,3 +1,32 @@
+2012-02-13  Ojan Vafai  <[email protected]>
+
+        rtl + flex-direction:column is positioning elements incorrectly
+        https://bugs.webkit.org/show_bug.cgi?id=78555
+
+        Reviewed by Tony Chang.
+
+        * css3/flexbox/flex-align-baseline-expected.txt: Added.
+        * css3/flexbox/flex-align-baseline.html: Added.
+        * css3/flexbox/flex-align-end-expected.txt: Added.
+        * css3/flexbox/flex-align-end.html: Added.
+        * css3/flexbox/true-centering-expected.txt:
+
+2012-02-09  Ojan Vafai  <[email protected]>
+
+        nesting horizontal flexboxes is broken
+        https://bugs.webkit.org/show_bug.cgi?id=76867
+
+        Reviewed by David Hyatt.
+
+        * css3/flexbox/floated-flexbox-expected.txt:
+        * css3/flexbox/line-wrapping.html:
+        The old results here were wrong because they wrapped the contents of each flex item.
+
+        * css3/flexbox/preferred-widths-expected.txt: Added.
+        * css3/flexbox/preferred-widths-orthogonal-expected.txt: Added.
+        * css3/flexbox/preferred-widths-orthogonal.html: Added.
+        * css3/flexbox/preferred-widths.html: Added.
+
 2012-02-13  Kenichi Ishibashi  <[email protected]>
 
         Unreviewed test expectations update.

Added: trunk/LayoutTests/css3/flexbox/flex-align-baseline-expected.txt (0 => 107659)


--- trunk/LayoutTests/css3/flexbox/flex-align-baseline-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/css3/flexbox/flex-align-baseline-expected.txt	2012-02-14 02:40:45 UTC (rev 107659)
@@ -0,0 +1,68 @@
+PASS firstChild.offsetTop is lastChild.offsetTop
+PASS firstChild.offsetTop is lastChild.offsetTop
+PASS firstChild.offsetLeft is lastChild.offsetLeft
+PASS firstChild.offsetLeft is lastChild.offsetLeft
+PASS firstChild.offsetTop is lastChild.offsetTop
+PASS firstChild.offsetTop is lastChild.offsetTop
+PASS firstChild.offsetLeft is lastChild.offsetLeft
+PASS firstChild.offsetLeft is lastChild.offsetLeft
+PASS firstChild.offsetTop is lastChild.offsetTop
+PASS firstChild.offsetTop is lastChild.offsetTop
+PASS firstChild.offsetLeft is lastChild.offsetLeft
+PASS firstChild.offsetLeft is lastChild.offsetLeft
+PASS firstChild.offsetTop is lastChild.offsetTop
+PASS firstChild.offsetTop is lastChild.offsetTop
+PASS firstChild.offsetLeft is lastChild.offsetLeft
+PASS firstChild.offsetLeft is lastChild.offsetLeft
+PASS firstChild.offsetLeft is lastChild.offsetLeft
+PASS firstChild.offsetLeft is lastChild.offsetLeft
+PASS firstChild.offsetTop is lastChild.offsetTop
+PASS firstChild.offsetTop is lastChild.offsetTop
+PASS firstChild.offsetLeft is lastChild.offsetLeft
+PASS firstChild.offsetLeft is lastChild.offsetLeft
+PASS firstChild.offsetTop is lastChild.offsetTop
+PASS firstChild.offsetTop is lastChild.offsetTop
+PASS firstChild.offsetLeft is lastChild.offsetLeft
+PASS firstChild.offsetLeft is lastChild.offsetLeft
+PASS firstChild.offsetTop is lastChild.offsetTop
+PASS firstChild.offsetTop is lastChild.offsetTop
+PASS firstChild.offsetLeft is lastChild.offsetLeft
+PASS firstChild.offsetLeft is lastChild.offsetLeft
+PASS firstChild.offsetTop is lastChild.offsetTop
+PASS firstChild.offsetTop is lastChild.offsetTop
+PASS successfullyParsed is true
+
+TEST COMPLETE
+horizontal-tb ltr row
+horizontal-tb rtl row
+horizontal-tb ltr column
+horizontal-tb rtl column
+horizontal-tb ltr row-reverse
+horizontal-tb rtl row-reverse
+horizontal-tb ltr column-reverse
+horizontal-tb rtl column-reverse
+horizontal-bt ltr row
+horizontal-bt rtl row
+horizontal-bt ltr column
+horizontal-bt rtl column
+horizontal-bt ltr row-reverse
+horizontal-bt rtl row-reverse
+horizontal-bt ltr column-reverse
+horizontal-bt rtl column-reverse
+vertical-lr ltr row
+vertical-lr rtl row
+vertical-lr ltr column
+vertical-lr rtl column
+vertical-lr ltr row-reverse
+vertical-lr rtl row-reverse
+vertical-lr ltr column-reverse
+vertical-lr rtl column-reverse
+vertical-rl ltr row
+vertical-rl rtl row
+vertical-rl ltr column
+vertical-rl rtl column
+vertical-rl ltr row-reverse
+vertical-rl rtl row-reverse
+vertical-rl ltr column-reverse
+vertical-rl rtl column-reverse
+
Property changes on: trunk/LayoutTests/css3/flexbox/flex-align-baseline-expected.txt
___________________________________________________________________

Added: svn:eol-style

Added: trunk/LayoutTests/css3/flexbox/flex-align-baseline.html (0 => 107659)


--- trunk/LayoutTests/css3/flexbox/flex-align-baseline.html	                        (rev 0)
+++ trunk/LayoutTests/css3/flexbox/flex-align-baseline.html	2012-02-14 02:40:45 UTC (rev 107659)
@@ -0,0 +1,104 @@
+<!DOCTYPE html>
+<html>
+<style>
+.flexbox {
+    margin: 120px;
+    width: 100px;
+    height: 100px;
+    display: -webkit-flexbox;
+    background-color: #aaa;
+    position: relative;
+    outline: 2px solid red;
+}
+.title {
+    margin-bottom: 10px;
+}
+.flexbox > div {
+    height: 110px;
+    width: 110px;
+}
+.flexbox :nth-child(1) {
+    background-color: blue;
+}
+.flexbox :nth-child(2) {
+    background-color: green;
+}
+.ltr {
+    direction: ltr;
+}
+.rtl {
+    direction: rtl;
+}
+.horizontal-tb {
+    -webkit-writing-mode: horizontal-tb;
+}
+.horizontal-bt {
+    -webkit-writing-mode: horizontal-bt;
+}
+.vertical-rl {
+    -webkit-writing-mode: vertical-rl;
+}
+.vertical-lr {
+    -webkit-writing-mode: vertical-lr;
+}
+.row-reverse {
+    -webkit-flex-flow: row-reverse;
+}
+.column {
+    -webkit-flex-flow: column;
+}
+.column-reverse {
+    -webkit-flex-flow: column-reverse;
+}
+</style>
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+</script>
+<script src=""
+<body>
+<script>
+var writingModes = ['horizontal-tb', 'horizontal-bt', 'vertical-lr', 'vertical-rl'];
+var flexFlows = ['row', 'column', 'row-reverse', 'column-reverse'];
+var directions = ['ltr', 'rtl'];
+
+writingModes.forEach(function(writingMode) {
+    flexFlows.forEach(function(flexFlow) {
+        directions.forEach(function(direction) {
+            var flexboxClassName = writingMode + ' ' + direction + ' ' + flexFlow;
+
+            var title = document.createElement('div');
+            title.className = 'title';
+            title.innerHTML = flexboxClassName;
+            document.body.appendChild(title);
+
+            var isColumn = flexFlow.indexOf('column') != -1;
+            var isHorizontal = (writingMode.indexOf('horizontal') != -1) ? !isColumn : isColumn;
+
+            var container = document.createElement('div');
+            container.innerHTML = '<div class="flexbox ' + flexboxClassName + '" style="-webkit-flex-align: baseline;">' +
+                '<div><div style="display:inline-block;"></div></div>' +
+                '<div style="margin-top:20px;"><div style="display:inline-block;"></div></div>' +
+            '</div>';
+
+            container.firstChild.isHorizontal = isHorizontal;
+            document.body.appendChild(container);
+        })
+    })
+})
+
+// Sanity check that the flex-align:baseline flex items align to the same cross-axis position.
+var flexboxen = document.getElementsByClassName('flexbox');
+for (var i = 0, len = flexboxen.length; i < len; i++) {
+    var flexbox = flexboxen[i];
+    firstChild = flexbox.firstChild;
+    lastChild = flexbox.lastChild;
+    if (flexbox.isHorizontal)
+        shouldBe('firstChild.offsetTop', 'lastChild.offsetTop');
+    else
+        shouldBe('firstChild.offsetLeft', 'lastChild.offsetLeft');
+}
+</script>
+<script src=""
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/LayoutTests/css3/flexbox/flex-align-baseline.html
___________________________________________________________________

Added: svn:eol-style

Added: trunk/LayoutTests/css3/flexbox/flex-align-end-expected.txt (0 => 107659)


--- trunk/LayoutTests/css3/flexbox/flex-align-end-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/css3/flexbox/flex-align-end-expected.txt	2012-02-14 02:40:45 UTC (rev 107659)
@@ -0,0 +1,64 @@
+horizontal-tb ltr row
+PASS
+horizontal-tb rtl row
+PASS
+horizontal-tb ltr column
+PASS
+horizontal-tb rtl column
+PASS
+horizontal-tb ltr row-reverse
+PASS
+horizontal-tb rtl row-reverse
+PASS
+horizontal-tb ltr column-reverse
+PASS
+horizontal-tb rtl column-reverse
+PASS
+horizontal-bt ltr row
+PASS
+horizontal-bt rtl row
+PASS
+horizontal-bt ltr column
+PASS
+horizontal-bt rtl column
+PASS
+horizontal-bt ltr row-reverse
+PASS
+horizontal-bt rtl row-reverse
+PASS
+horizontal-bt ltr column-reverse
+PASS
+horizontal-bt rtl column-reverse
+PASS
+vertical-lr ltr row
+PASS
+vertical-lr rtl row
+PASS
+vertical-lr ltr column
+PASS
+vertical-lr rtl column
+PASS
+vertical-lr ltr row-reverse
+PASS
+vertical-lr rtl row-reverse
+PASS
+vertical-lr ltr column-reverse
+PASS
+vertical-lr rtl column-reverse
+PASS
+vertical-rl ltr row
+PASS
+vertical-rl rtl row
+PASS
+vertical-rl ltr column
+PASS
+vertical-rl rtl column
+PASS
+vertical-rl ltr row-reverse
+PASS
+vertical-rl rtl row-reverse
+PASS
+vertical-rl ltr column-reverse
+PASS
+vertical-rl rtl column-reverse
+PASS
Property changes on: trunk/LayoutTests/css3/flexbox/flex-align-end-expected.txt
___________________________________________________________________

Added: svn:eol-style

Added: trunk/LayoutTests/css3/flexbox/flex-align-end.html (0 => 107659)


--- trunk/LayoutTests/css3/flexbox/flex-align-end.html	                        (rev 0)
+++ trunk/LayoutTests/css3/flexbox/flex-align-end.html	2012-02-14 02:40:45 UTC (rev 107659)
@@ -0,0 +1,120 @@
+<!DOCTYPE html>
+<html>
+<style>
+.flexbox {
+    margin: 120px;
+    width: 100px;
+    height: 100px;
+    display: -webkit-flexbox;
+    background-color: #aaa;
+    position: relative;
+    outline: 2px solid red;
+}
+.title {
+    margin-bottom: 10px;
+}
+.flexbox > div {
+    height: 110px;
+    width: 110px;
+}
+.flexbox :nth-child(1) {
+    background-color: blue;
+}
+.flexbox :nth-child(2) {
+    background-color: green;
+}
+.ltr {
+    direction: ltr;
+}
+.rtl {
+    direction: rtl;
+}
+.horizontal-tb {
+    -webkit-writing-mode: horizontal-tb;
+}
+.horizontal-bt {
+    -webkit-writing-mode: horizontal-bt;
+}
+.vertical-rl {
+    -webkit-writing-mode: vertical-rl;
+}
+.vertical-lr {
+    -webkit-writing-mode: vertical-lr;
+}
+.row-reverse {
+    -webkit-flex-flow: row-reverse;
+}
+.column {
+    -webkit-flex-flow: column;
+}
+.column-reverse {
+    -webkit-flex-flow: column-reverse;
+}
+</style>
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+</script>
+<script src=""
+<body _onload_="checkFlexBoxen()">
+
+<script>
+function positionAsString(position)
+{
+    return 'data-offset-x="' + position[0] + '" data-offset-y="' + position[1] + '"';
+}
+
+var expectations = {
+    'horizontal-tb': {
+        'row': { rtl: [-10, -10], ltr: [0, -10]},
+        'row-reverse': { rtl: [0, -10], ltr: [-10, -10]},
+        'column': { rtl: [0, 0], ltr: [-10, 0]},
+        'column-reverse': { rtl: [0, -10], ltr: [-10, -10]}
+    },
+    'horizontal-bt': {
+        'row': { rtl: [-10, 0], ltr: [0, 0]},
+        'row-reverse': { rtl: [0, 0], ltr: [-10, 0]},
+        'column': { rtl: [0, -10], ltr: [-10, -10]},
+        'column-reverse': { rtl: [0, 0], ltr: [-10, 0]}
+    },
+    'vertical-lr': {
+        'row': { rtl: [-10, -10], ltr: [-10, 0]},
+        'row-reverse': { rtl: [-10, 0], ltr: [-10, -10]},
+        'column': { rtl: [0, 0], ltr: [0, -10]},
+        'column-reverse': { rtl: [-10, 0], ltr: [-10, -10]}
+    },
+    'vertical-rl': {
+        'row': { rtl: [0, -10], ltr: [0, 0]},
+        'row-reverse': { rtl: [0, 0], ltr: [0, -10]},
+        'column': { rtl: [-10, 0], ltr: [-10, -10]},
+        'column-reverse': { rtl: [0, 0], ltr: [0, -10]}
+    }
+}
+
+var writingModes = ['horizontal-tb', 'horizontal-bt', 'vertical-lr', 'vertical-rl'];
+var flexFlows = ['row', 'column', 'row-reverse', 'column-reverse'];
+var directions = ['ltr', 'rtl'];
+
+writingModes.forEach(function(writingMode) {
+    flexFlows.forEach(function(flexFlow) {
+        directions.forEach(function(direction) {
+            var flexboxClassName = writingMode + ' ' + direction + ' ' + flexFlow;
+
+            var title = document.createElement('div');
+            title.className = 'title';
+            title.innerHTML = flexboxClassName;
+            document.body.appendChild(title);
+
+            var container = document.createElement('div');
+            container.innerHTML = '<div class="flexbox ' + flexboxClassName + '" style="-webkit-flex-align: end;">\n' +
+                '<div ' + positionAsString(expectations[writingMode][flexFlow][direction]) + '></div><div></div>\n' +
+            '</div>';
+
+            document.body.appendChild(container);
+        })
+    })
+})
+</script>
+
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/LayoutTests/css3/flexbox/flex-align-end.html
___________________________________________________________________

Added: svn:eol-style

Modified: trunk/LayoutTests/css3/flexbox/true-centering-expected.txt (107658 => 107659)


--- trunk/LayoutTests/css3/flexbox/true-centering-expected.txt	2012-02-14 02:39:24 UTC (rev 107658)
+++ trunk/LayoutTests/css3/flexbox/true-centering-expected.txt	2012-02-14 02:40:45 UTC (rev 107659)
@@ -12,14 +12,7 @@
 horizontal-tb ltr column
 PASS
 horizontal-tb rtl column
-FAIL:
-Expected -5 for offsetLeft, but got -15. 
-Expected -5 for offsetLeft, but got -15. 
-
-<div class="flexbox horizontal-tb rtl column vertical" style="-webkit-flex-align: center; -webkit-flex-pack: center;">
-<div data-offset-x="-5" data-offset-y="-10"></div>
-<div data-offset-x="-5" data-offset-y="50"></div>
-</div>
+PASS
 horizontal-tb ltr row-reverse
 PASS
 horizontal-tb rtl row-reverse
@@ -27,14 +20,7 @@
 horizontal-tb ltr column-reverse
 PASS
 horizontal-tb rtl column-reverse
-FAIL:
-Expected -5 for offsetLeft, but got -15. 
-Expected -5 for offsetLeft, but got -15. 
-
-<div class="flexbox horizontal-tb rtl column-reverse vertical" style="-webkit-flex-align: center; -webkit-flex-pack: center;">
-<div data-offset-x="-5" data-offset-y="50"></div>
-<div data-offset-x="-5" data-offset-y="-10"></div>
-</div>
+PASS
 horizontal-bt ltr row
 PASS
 horizontal-bt rtl row
@@ -42,14 +28,7 @@
 horizontal-bt ltr column
 PASS
 horizontal-bt rtl column
-FAIL:
-Expected -5 for offsetLeft, but got -15. 
-Expected -5 for offsetLeft, but got -15. 
-
-<div class="flexbox horizontal-bt rtl column vertical" style="-webkit-flex-align: center; -webkit-flex-pack: center;">
-<div data-offset-x="-5" data-offset-y="50"></div>
-<div data-offset-x="-5" data-offset-y="-10"></div>
-</div>
+PASS
 horizontal-bt ltr row-reverse
 PASS
 horizontal-bt rtl row-reverse
@@ -57,14 +36,7 @@
 horizontal-bt ltr column-reverse
 PASS
 horizontal-bt rtl column-reverse
-FAIL:
-Expected -5 for offsetLeft, but got -15. 
-Expected -5 for offsetLeft, but got -15. 
-
-<div class="flexbox horizontal-bt rtl column-reverse vertical" style="-webkit-flex-align: center; -webkit-flex-pack: center;">
-<div data-offset-x="-5" data-offset-y="-10"></div>
-<div data-offset-x="-5" data-offset-y="50"></div>
-</div>
+PASS
 vertical-lr ltr row
 PASS
 vertical-lr rtl row
@@ -72,14 +44,7 @@
 vertical-lr ltr column
 PASS
 vertical-lr rtl column
-FAIL:
-Expected -5 for offsetTop, but got -15. 
-Expected -5 for offsetTop, but got -15. 
-
-<div class="flexbox vertical-lr rtl column" style="-webkit-flex-align: center; -webkit-flex-pack: center;">
-<div data-offset-x="-10" data-offset-y="-5"></div>
-<div data-offset-x="50" data-offset-y="-5"></div>
-</div>
+PASS
 vertical-lr ltr row-reverse
 PASS
 vertical-lr rtl row-reverse
@@ -87,14 +52,7 @@
 vertical-lr ltr column-reverse
 PASS
 vertical-lr rtl column-reverse
-FAIL:
-Expected -5 for offsetTop, but got -15. 
-Expected -5 for offsetTop, but got -15. 
-
-<div class="flexbox vertical-lr rtl column-reverse" style="-webkit-flex-align: center; -webkit-flex-pack: center;">
-<div data-offset-x="50" data-offset-y="-5"></div>
-<div data-offset-x="-10" data-offset-y="-5"></div>
-</div>
+PASS
 vertical-rl ltr row
 PASS
 vertical-rl rtl row
@@ -102,14 +60,7 @@
 vertical-rl ltr column
 PASS
 vertical-rl rtl column
-FAIL:
-Expected -5 for offsetTop, but got -15. 
-Expected -5 for offsetTop, but got -15. 
-
-<div class="flexbox vertical-rl rtl column" style="-webkit-flex-align: center; -webkit-flex-pack: center;">
-<div data-offset-x="50" data-offset-y="-5"></div>
-<div data-offset-x="-10" data-offset-y="-5"></div>
-</div>
+PASS
 vertical-rl ltr row-reverse
 PASS
 vertical-rl rtl row-reverse
@@ -117,11 +68,4 @@
 vertical-rl ltr column-reverse
 PASS
 vertical-rl rtl column-reverse
-FAIL:
-Expected -5 for offsetTop, but got -15. 
-Expected -5 for offsetTop, but got -15. 
-
-<div class="flexbox vertical-rl rtl column-reverse" style="-webkit-flex-align: center; -webkit-flex-pack: center;">
-<div data-offset-x="-10" data-offset-y="-5"></div>
-<div data-offset-x="50" data-offset-y="-5"></div>
-</div>
+PASS

Modified: trunk/Source/_javascript_Core/ChangeLog (107658 => 107659)


--- trunk/Source/_javascript_Core/ChangeLog	2012-02-14 02:39:24 UTC (rev 107658)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-02-14 02:40:45 UTC (rev 107659)
@@ -1,3 +1,27 @@
+2012-02-12  Mark Hahnenberg  <[email protected]>
+
+        Replace old strtod with new strtod
+        https://bugs.webkit.org/show_bug.cgi?id=68044
+
+        Reviewed by Geoffrey Garen.
+
+        * parser/Lexer.cpp: Added template argument. This version allows junk after numbers.
+        (JSC::::lex):
+        * runtime/JSGlobalObjectFunctions.cpp: Ditto.
+        (JSC::parseInt):
+        (JSC::jsStrDecimalLiteral):
+        * runtime/LiteralParser.cpp: Ditto.
+        (JSC::::Lexer::lexNumber):
+        * wtf/dtoa.cpp: Replaced old strtod with a new version that uses the new StringToDoubleConverter.
+        It takes a template argument to allow clients to determine statically whether it should allow 
+        junk after the numbers or not.
+        (WTF):
+        (WTF::strtod):
+        * wtf/dtoa.h:
+        (WTF):
+        * wtf/text/WTFString.cpp: Added template argument. This version does not allow junk after numbers.
+        (WTF::toDoubleType):
+
 2012-02-13  Mark Hahnenberg  <[email protected]>
 
         More windows build fixing

Modified: trunk/Source/WebCore/ChangeLog (107658 => 107659)


--- trunk/Source/WebCore/ChangeLog	2012-02-14 02:39:24 UTC (rev 107658)
+++ trunk/Source/WebCore/ChangeLog	2012-02-14 02:40:45 UTC (rev 107659)
@@ -1,3 +1,43 @@
+2012-02-13  Ojan Vafai  <[email protected]>
+
+        rtl + flex-direction:column is positioning elements incorrectly
+        https://bugs.webkit.org/show_bug.cgi?id=78555
+
+        Reviewed by Tony Chang.
+
+        Do the y-axis flipping after we have adjusted the y-position for
+        flex-align instead of before.
+
+        Tests: css3/flexbox/flex-align-baseline.html
+               css3/flexbox/flex-align-end.html
+
+        * rendering/RenderFlexibleBox.cpp:
+        (WebCore::RenderFlexibleBox::alignChildren):
+        The amount we adjust by also needs to be flipped for rtl+column,
+        so the flipping needs to be done after we align the flex items.
+
+2012-02-09  Ojan Vafai  <[email protected]>
+
+        nesting horizontal flexboxes is broken
+        https://bugs.webkit.org/show_bug.cgi?id=76867
+
+        Reviewed by David Hyatt.
+
+        This is copied from RenderDeprecatedFlexibleBox and updated
+        for RenderFlexibleBox and to handle vertical writing mode.
+
+        Tests: css3/flexbox/preferred-widths-orthogonal.html
+               css3/flexbox/preferred-widths.html
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::computePreferredLogicalWidths):
+        * rendering/RenderFlexibleBox.cpp:
+        (WebCore::marginWidthForChild):
+        (WebCore):
+        (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
+        * rendering/RenderFlexibleBox.h:
+        (RenderFlexibleBox):
+
 2012-02-13  Anders Carlsson  <[email protected]>
 
         The tile cache layer should have its background set to the page background

Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp (107658 => 107659)


--- trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp	2012-02-14 02:39:24 UTC (rev 107658)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp	2012-02-14 02:40:45 UTC (rev 107659)
@@ -820,14 +820,6 @@
 
     for (size_t i = 0; i < children.size(); ++i) {
         RenderBox* child = children[i];
-        // direction:rtl + flex-direction:column means the cross-axis direction is flipped.
-        if (!style()->isLeftToRightDirection() && isColumnFlow()) {
-            LayoutPoint location = flowAwareLocationForChild(child);
-            location.setY(crossExtent - crossAxisExtentForChild(child) - location.y());
-            setFlowAwareLocationForChild(child, location);
-        }
-
-        // FIXME: Make sure this does the right thing with column flows.
         switch (flexAlignForChild(child)) {
         case AlignAuto:
             ASSERT_NOT_REACHED();
@@ -862,6 +854,14 @@
             break;
         }
         }
+
+        // direction:rtl + flex-direction:column means the cross-axis direction is flipped.
+        if (!style()->isLeftToRightDirection() && isColumnFlow()) {
+            LayoutPoint location = flowAwareLocationForChild(child);
+            location.setY(crossExtent - crossAxisExtentForChild(child) - location.y());
+            setFlowAwareLocationForChild(child, location);
+        }
+
     }
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to