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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc

Issue 2555923002: Changed TextDirection to an enum class and renamed its members (Closed)
Patch Set: Rebase after reopen Created 4 years 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_absolute_utils.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc b/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc
index 7c0f640c373de70a9f60adf7bc7237ee2e67e75b..c83bf5a54b1583fb37785921e2b4e15ab867c040 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc
@@ -84,7 +84,7 @@ void ComputeAbsoluteHorizontal(const NGConstraintSpace& space,
margin_right = LayoutUnit();
DCHECK(child_auto_width.has_value());
width = *child_auto_width;
- if (space.Direction() == LTR) {
+ if (space.Direction() == TextDirection::Ltr) {
left = static_position.LeftPosition(container_size.width, width,
margin_left, margin_right);
} else {
@@ -103,7 +103,7 @@ void ComputeAbsoluteHorizontal(const NGConstraintSpace& space,
margin_right = margin_space / 2;
} else {
// Margins are negative.
- if (space.Direction() == LTR) {
+ if (space.Direction() == TextDirection::Ltr) {
margin_left = LayoutUnit();
margin_right = margin_space;
} else {
@@ -119,7 +119,7 @@ void ComputeAbsoluteHorizontal(const NGConstraintSpace& space,
// Are values overconstrained?
if (margin_left + margin_right != margin_space) {
// Relax the end.
- if (space.Direction() == LTR)
+ if (space.Direction() == TextDirection::Ltr)
right -= margin_left + margin_right - margin_space;
else
left -= margin_left + margin_right - margin_space;
@@ -142,7 +142,7 @@ void ComputeAbsoluteHorizontal(const NGConstraintSpace& space,
} else if (left == NGSizeIndefinite && right == NGSizeIndefinite) {
// Rule 2.
DCHECK_NE(width, NGSizeIndefinite);
- if (space.Direction() == LTR)
+ if (space.Direction() == TextDirection::Ltr)
left = static_position.LeftPosition(container_size.width, width,
margin_left, margin_right);
else

Powered by Google App Engine
This is Rietveld 408576698