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

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: Added 2 changes in mac files 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 7958a9a810b3dc34a7e1c2114b817ec59683b60e..a755a7823059269d8efc0412d5813aabd43a9342 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);
@@ -1141,8 +1141,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()) {
@@ -2357,7 +2358,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;

Powered by Google App Engine
This is Rietveld 408576698