| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/layout/ng/ng_writing_mode.h" | 5 #include "core/layout/ng/ng_writing_mode.h" |
| 6 | 6 |
| 7 #include "platform/text/WritingMode.h" | |
| 8 #include "wtf/Assertions.h" | 7 #include "wtf/Assertions.h" |
| 9 | 8 |
| 10 namespace blink { | 9 namespace blink { |
| 11 | 10 |
| 12 NGWritingMode FromPlatformWritingMode(WritingMode mode) { | 11 NGWritingMode FromPlatformWritingMode(WritingMode mode) { |
| 13 switch (mode) { | 12 switch (mode) { |
| 14 case TopToBottomWritingMode: | 13 case TopToBottomWritingMode: |
| 15 return kHorizontalTopBottom; | 14 return kHorizontalTopBottom; |
| 16 case RightToLeftWritingMode: | 15 case RightToLeftWritingMode: |
| 17 return kVerticalRightLeft; | 16 return kVerticalRightLeft; |
| 18 case LeftToRightWritingMode: | 17 case LeftToRightWritingMode: |
| 19 return kVerticalLeftRight; | 18 return kVerticalLeftRight; |
| 20 default: | 19 default: |
| 21 NOTREACHED(); | 20 NOTREACHED(); |
| 22 return kHorizontalTopBottom; | 21 return kHorizontalTopBottom; |
| 23 } | 22 } |
| 24 } | 23 } |
| 25 | 24 |
| 26 } // namespace blink | 25 } // namespace blink |
| OLD | NEW |