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

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

Issue 2347773002: [LayoutNG] Fix broken layout while using CSS's writing modes. (Closed)
Patch Set: synced to the head Created 4 years, 3 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_constraint_space.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h
index 2b4a2bbc5a84736e0616335e4c32fa92b70abf33..1fb3ed7a8ff94e96b543c6f56ced4c6ec4207a46 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h
@@ -26,24 +26,26 @@ class CORE_EXPORT NGConstraintSpace final
: public GarbageCollected<NGConstraintSpace> {
public:
// Constructs a constraint space with a new backing NGPhysicalConstraintSpace.
- NGConstraintSpace(NGWritingMode, NGLogicalSize);
+ NGConstraintSpace(NGWritingMode, NGDirection, NGLogicalSize);
// Constructs a constraint space based on an existing backing
// NGPhysicalConstraintSpace.
- NGConstraintSpace(NGWritingMode, NGPhysicalConstraintSpace*);
+ NGConstraintSpace(NGWritingMode, NGDirection, NGPhysicalConstraintSpace*);
- // Constructs a constraint space with a different NGWritingMode.
- NGConstraintSpace(NGWritingMode, const NGConstraintSpace*);
+ // Constructs a constraint space with a different NGWritingMode and
+ // NGDirection.
+ NGConstraintSpace(NGWritingMode, NGDirection, const NGConstraintSpace*);
// Constructs a derived constraint space sharing the same backing
- // NGPhysicalConstraintSpace and NGWritingMode.
+ // NGPhysicalConstraintSpace, NGWritingMode and NGDirection.
NGConstraintSpace(const NGConstraintSpace& other,
NGLogicalOffset,
NGLogicalSize);
// Constructs a derived constraint space sharing the same backing
- // NGPhysicalConstraintSpace and a different NGWritingMode.
+ // NGPhysicalConstraintSpace, a different NGWritingMode and NGDirection.
NGConstraintSpace(NGWritingMode,
+ NGDirection,
const NGConstraintSpace& other,
NGLogicalOffset,
NGLogicalSize);
@@ -54,6 +56,8 @@ class CORE_EXPORT NGConstraintSpace final
NGPhysicalConstraintSpace* PhysicalSpace() const { return physical_space_; }
+ NGDirection Direction() const { return static_cast<NGDirection>(direction_); }
+
NGWritingMode WritingMode() const {
return static_cast<NGWritingMode>(writing_mode_);
}
@@ -116,6 +120,7 @@ class CORE_EXPORT NGConstraintSpace final
NGLogicalOffset offset_;
NGLogicalSize size_;
unsigned writing_mode_ : 3;
+ unsigned direction_ : 1;
};
inline std::ostream& operator<<(std::ostream& stream,
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_box.cc ('k') | third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698