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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp

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/LayoutBlockFlowLine.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
index 5a4a7f02d955f192193f10f73aa10c1ae31b595e..613d64e55c4cf2f41dbb32be2037a46bb5dae2cb 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
@@ -700,7 +700,7 @@ void LayoutBlockFlow::updateLogicalWidthForAlignment(
}
// Fall through
case ETextAlign::Start:
- if (direction == LTR)
+ if (direction == TextDirection::Ltr)
updateLogicalWidthForLeftAlignedBlock(
style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft,
totalLogicalWidth, availableLogicalWidth);
@@ -710,7 +710,7 @@ void LayoutBlockFlow::updateLogicalWidthForAlignment(
totalLogicalWidth, availableLogicalWidth);
break;
case ETextAlign::End:
- if (direction == LTR)
+ if (direction == TextDirection::Ltr)
updateLogicalWidthForRightAlignedBlock(
style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft,
totalLogicalWidth, availableLogicalWidth);
@@ -1140,8 +1140,9 @@ void LayoutBlockFlow::layoutRunsAndFloatsInRange(
} else {
VisualDirectionOverride override =
(styleToUse.rtlOrdering() == EOrder::Visual
- ? (styleToUse.direction() == LTR ? VisualLeftToRightOverride
- : VisualRightToLeftOverride)
+ ? (styleToUse.direction() == TextDirection::Ltr
+ ? VisualLeftToRightOverride
+ : VisualRightToLeftOverride)
: NoVisualOverride);
if (isNewUBAParagraph && styleToUse.unicodeBidi() == Plaintext &&
!resolver.context()->parent()) {
@@ -2356,7 +2357,7 @@ void LayoutBlockFlow::checkLinesForTextOverflow() {
const Font& firstLineFont = firstLineStyle()->font();
// FIXME: We should probably not hard-code the direction here.
// https://crbug.com/333004
- TextDirection ellipsisDirection = LTR;
+ TextDirection ellipsisDirection = TextDirection::Ltr;
float firstLineEllipsisWidth = 0;
float ellipsisWidth = 0;
« no previous file with comments | « third_party/WebKit/Source/core/layout/HitTestResult.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698