Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_writing_mode.h

Issue 2745973002: [LayoutNG] Implement atomic inlines for LayoutNGInline (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef NGWritingMode_h 5 #ifndef NGWritingMode_h
6 #define NGWritingMode_h 6 #define NGWritingMode_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "platform/text/WritingMode.h" 9 #include "platform/text/WritingMode.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 enum NGWritingMode { 13 enum NGWritingMode {
14 kHorizontalTopBottom = 0, 14 kHorizontalTopBottom = 0,
15 kVerticalRightLeft = 1, 15 kVerticalRightLeft = 1,
16 kVerticalLeftRight = 2, 16 kVerticalLeftRight = 2,
17 kSidewaysRightLeft = 3, 17 kSidewaysRightLeft = 3,
18 kSidewaysLeftRight = 4 18 kSidewaysLeftRight = 4
19 }; 19 };
20 20
21 CORE_EXPORT NGWritingMode FromPlatformWritingMode(WritingMode); 21 CORE_EXPORT NGWritingMode FromPlatformWritingMode(WritingMode);
22 22
23 // Lines have horizontal orientation; modes horizontal-tb.
24 inline bool IsHorizontalWritingMode(NGWritingMode writingMode) {
25 return writingMode == NGWritingMode::kHorizontalTopBottom;
26 }
27
23 // Whether the child and the containing block are parallel to each other. 28 // Whether the child and the containing block are parallel to each other.
24 // Example: vertical-rl and vertical-lr 29 // Example: vertical-rl and vertical-lr
25 bool IsParallelWritingMode(NGWritingMode a, NGWritingMode b); 30 bool IsParallelWritingMode(NGWritingMode a, NGWritingMode b);
26 31
27 } // namespace blink 32 } // namespace blink
28 33
29 #endif // NGWritingMode_h 34 #endif // NGWritingMode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698