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

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

Issue 2230803005: [LayoutNG] Add writing-mode and direction to NGFragmentBase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase w/HEAD 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h b/third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h
index d8910a1d2d63a3a38883c8348eec2c777d142b81..03c5df925cc01a86574a5b879fab8bd123d98a85 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h
@@ -14,6 +14,26 @@ namespace blink {
class CORE_EXPORT NGFragmentBase : public GarbageCollected<NGFragmentBase> {
public:
+ enum NGFragmentType { FragmentBox = 0, FragmentText = 1 };
+
+ // TODO(eae): We might want to re-use WritingMode and Direction from style.
+ enum NGWritingMode {
+ HorizontalTopBottom = 0,
+ VerticalRightLeft = 1,
+ VerticalLeftRight = 2,
+ SidewaysRightLeft = 3,
+ SidewaysLeftRight = 4
+ };
+ enum NGDirection { LeftToRight = 0, RightToLeft = 1 };
+
+ NGFragmentType type() const { return static_cast<NGFragmentType>(m_type); }
+ NGWritingMode writingMode() const {
+ return static_cast<NGWritingMode>(m_writingMode);
+ }
+ NGDirection direction() const {
+ return static_cast<NGDirection>(m_direction);
+ }
+
// Returns the border-box size.
LayoutUnit inlineSize() const { return m_inlineSize; }
LayoutUnit blockSize() const { return m_blockSize; }
@@ -36,7 +56,10 @@ class CORE_EXPORT NGFragmentBase : public GarbageCollected<NGFragmentBase> {
NGFragmentBase(LayoutUnit inlineSize,
LayoutUnit blockSize,
LayoutUnit inlineOverflow,
- LayoutUnit blockOverflow);
+ LayoutUnit blockOverflow,
+ NGWritingMode,
+ NGDirection,
+ NGFragmentType);
LayoutUnit m_inlineSize;
LayoutUnit m_blockSize;
@@ -44,7 +67,11 @@ class CORE_EXPORT NGFragmentBase : public GarbageCollected<NGFragmentBase> {
LayoutUnit m_blockOverflow;
LayoutUnit m_inlineOffset;
LayoutUnit m_blockOffset;
- bool m_isText;
+
+ unsigned m_type : 1;
+ unsigned m_writingMode : 3;
+ unsigned m_direction : 1;
+ unsigned m_hasBeenPlaced : 1;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_fragment.h ('k') | third_party/WebKit/Source/core/layout/ng/ng_fragment_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698