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

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

Issue 2236933003: [LayoutNG] Add writing mode to NGDerivedConstraintSpace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_fragment.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 NGFragmentBase_h 5 #ifndef NGFragmentBase_h
6 #define NGFragmentBase_h 6 #define NGFragmentBase_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/ng_constraint_space.h"
9 #include "platform/LayoutUnit.h" 10 #include "platform/LayoutUnit.h"
10 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
11 #include "wtf/Vector.h" 12 #include "wtf/Vector.h"
12 13
13 namespace blink { 14 namespace blink {
14 15
15 class CORE_EXPORT NGFragmentBase : public GarbageCollected<NGFragmentBase> { 16 class CORE_EXPORT NGFragmentBase : public GarbageCollected<NGFragmentBase> {
16 public: 17 public:
17 enum NGFragmentType { FragmentBox = 0, FragmentText = 1 }; 18 enum NGFragmentType { FragmentBox = 0, FragmentText = 1 };
18 19
19 // TODO(eae): We might want to re-use WritingMode and Direction from style.
20 enum NGWritingMode {
21 HorizontalTopBottom = 0,
22 VerticalRightLeft = 1,
23 VerticalLeftRight = 2,
24 SidewaysRightLeft = 3,
25 SidewaysLeftRight = 4
26 };
27 enum NGDirection { LeftToRight = 0, RightToLeft = 1 };
28
29 NGFragmentType type() const { return static_cast<NGFragmentType>(m_type); } 20 NGFragmentType type() const { return static_cast<NGFragmentType>(m_type); }
30 NGWritingMode writingMode() const { 21 NGWritingMode writingMode() const {
31 return static_cast<NGWritingMode>(m_writingMode); 22 return static_cast<NGWritingMode>(m_writingMode);
32 } 23 }
33 NGDirection direction() const { 24 NGDirection direction() const {
34 return static_cast<NGDirection>(m_direction); 25 return static_cast<NGDirection>(m_direction);
35 } 26 }
36 27
37 // Returns the border-box size. 28 // Returns the border-box size.
38 LayoutUnit inlineSize() const { return m_inlineSize; } 29 LayoutUnit inlineSize() const { return m_inlineSize; }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 61
71 unsigned m_type : 1; 62 unsigned m_type : 1;
72 unsigned m_writingMode : 3; 63 unsigned m_writingMode : 3;
73 unsigned m_direction : 1; 64 unsigned m_direction : 1;
74 unsigned m_hasBeenPlaced : 1; 65 unsigned m_hasBeenPlaced : 1;
75 }; 66 };
76 67
77 } // namespace blink 68 } // namespace blink
78 69
79 #endif // NGFragmentBase_h 70 #endif // NGFragmentBase_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_fragment.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698