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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.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_constraint_space_builder.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc
index 921f53f20c734446d53108e179f1d14b750b8850..71e50cae09e8906c5148529a7b131db969cd3294 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc
@@ -18,7 +18,7 @@ NGConstraintSpaceBuilder::NGConstraintSpaceBuilder(
is_block_direction_triggers_scrollbar_(false),
fragmentation_type_(kFragmentNone),
is_new_fc_(parent_space->IsNewFormattingContext()),
- text_direction_(parent_space->Direction()),
+ text_direction_(static_cast<unsigned>(parent_space->Direction())),
exclusions_(parent_space->Exclusions()) {}
NGConstraintSpaceBuilder::NGConstraintSpaceBuilder(NGWritingMode writing_mode)
@@ -30,7 +30,7 @@ NGConstraintSpaceBuilder::NGConstraintSpaceBuilder(NGWritingMode writing_mode)
is_block_direction_triggers_scrollbar_(false),
fragmentation_type_(kFragmentNone),
is_new_fc_(false),
- text_direction_(TextDirection::LTR),
+ text_direction_(static_cast<unsigned>(TextDirection::Ltr)),
exclusions_(new NGExclusions()) {}
NGConstraintSpaceBuilder& NGConstraintSpaceBuilder::SetAvailableSize(
@@ -47,7 +47,7 @@ NGConstraintSpaceBuilder& NGConstraintSpaceBuilder::SetPercentageResolutionSize(
NGConstraintSpaceBuilder& NGConstraintSpaceBuilder::SetTextDirection(
TextDirection text_direction) {
- text_direction_ = text_direction;
+ text_direction_ = static_cast<unsigned>(text_direction);
return *this;
}

Powered by Google App Engine
This is Rietveld 408576698