| Index: third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
|
| index fc8c89517280fc5c81ddaaee5f9a44dc2956ecb8..07b85d06d2497e256ce2d09379774135f17190d9 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
|
| @@ -270,29 +270,29 @@ IntSize LayoutFlexibleBox::originAdjustmentForScrollbars() const {
|
|
|
| if (flexDirection == FlowRow) {
|
| if (textDirection == TextDirection::Rtl) {
|
| - if (writingMode == TopToBottomWritingMode)
|
| + if (blink::isHorizontalWritingMode(writingMode))
|
| size.expand(adjustmentWidth, 0);
|
| else
|
| size.expand(0, adjustmentHeight);
|
| }
|
| - if (writingMode == RightToLeftWritingMode)
|
| + if (isFlippedBlocksWritingMode(writingMode))
|
| size.expand(adjustmentWidth, 0);
|
| } else if (flexDirection == FlowRowReverse) {
|
| if (textDirection == TextDirection::Ltr) {
|
| - if (writingMode == TopToBottomWritingMode)
|
| + if (blink::isHorizontalWritingMode(writingMode))
|
| size.expand(adjustmentWidth, 0);
|
| else
|
| size.expand(0, adjustmentHeight);
|
| }
|
| - if (writingMode == RightToLeftWritingMode)
|
| + if (isFlippedBlocksWritingMode(writingMode))
|
| size.expand(adjustmentWidth, 0);
|
| } else if (flexDirection == FlowColumn) {
|
| - if (writingMode == RightToLeftWritingMode)
|
| + if (isFlippedBlocksWritingMode(writingMode))
|
| size.expand(adjustmentWidth, 0);
|
| } else {
|
| - if (writingMode == TopToBottomWritingMode)
|
| + if (blink::isHorizontalWritingMode(writingMode))
|
| size.expand(0, adjustmentHeight);
|
| - else if (writingMode == LeftToRightWritingMode)
|
| + else if (isFlippedLinesWritingMode(writingMode))
|
| size.expand(adjustmentWidth, 0);
|
| }
|
| return size;
|
| @@ -459,9 +459,10 @@ bool LayoutFlexibleBox::isHorizontalFlow() const {
|
| }
|
|
|
| bool LayoutFlexibleBox::isLeftToRightFlow() const {
|
| - if (isColumnFlow())
|
| - return style()->getWritingMode() == TopToBottomWritingMode ||
|
| - style()->getWritingMode() == LeftToRightWritingMode;
|
| + if (isColumnFlow()) {
|
| + return blink::isHorizontalWritingMode(style()->getWritingMode()) ||
|
| + isFlippedLinesWritingMode(style()->getWritingMode());
|
| + }
|
| return style()->isLeftToRightDirection() ^
|
| (style()->flexDirection() == FlowRowReverse);
|
| }
|
|
|