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

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

Issue 2614883007: Change computed style enums to be prefixed with 'k'. (Closed)
Patch Set: Rebase on ToT. Created 3 years, 11 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/LayoutBlockFlowLine.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
index 613d64e55c4cf2f41dbb32be2037a46bb5dae2cb..7ee88a8413b2b9d71caf738ae87c3bc3e3ea3d57 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
@@ -99,7 +99,7 @@ class ExpansionOpportunities {
RELEASE_ASSERT(opportunitiesInRun <= m_totalOpportunities);
// Don't justify for white-space: pre.
- if (r->m_lineLayoutItem.style()->whiteSpace() != EWhiteSpace::Pre) {
+ if (r->m_lineLayoutItem.style()->whiteSpace() != EWhiteSpace::kPre) {
InlineTextBox* textBox = toInlineTextBox(r->m_box);
RELEASE_ASSERT(m_totalOpportunities);
int expansion = ((availableLogicalWidth - totalLogicalWidth) *
@@ -363,20 +363,20 @@ ETextAlign LayoutBlockFlow::textAlignmentForLine(bool endsWithSoftBreak) const {
TextAlignLast alignmentLast = style()->getTextAlignLast();
switch (alignmentLast) {
case TextAlignLastStart:
- return ETextAlign::Start;
+ return ETextAlign::kStart;
case TextAlignLastEnd:
- return ETextAlign::End;
+ return ETextAlign::kEnd;
case TextAlignLastLeft:
- return ETextAlign::Left;
+ return ETextAlign::kLeft;
case TextAlignLastRight:
- return ETextAlign::Right;
+ return ETextAlign::kRight;
case TextAlignLastCenter:
- return ETextAlign::Center;
+ return ETextAlign::kCenter;
case TextAlignLastJustify:
- return ETextAlign::Justify;
+ return ETextAlign::kJustify;
case TextAlignLastAuto:
- if (alignment == ETextAlign::Justify)
- return ETextAlign::Start;
+ if (alignment == ETextAlign::kJustify)
+ return ETextAlign::kStart;
return alignment;
}
@@ -670,25 +670,25 @@ void LayoutBlockFlow::updateLogicalWidthForAlignment(
// position the objects horizontally. The total width of the line can be
// increased if we end up justifying text.
switch (textAlign) {
- case ETextAlign::Left:
- case ETextAlign::WebkitLeft:
+ case ETextAlign::kLeft:
+ case ETextAlign::kWebkitLeft:
updateLogicalWidthForLeftAlignedBlock(
style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft,
totalLogicalWidth, availableLogicalWidth);
break;
- case ETextAlign::Right:
- case ETextAlign::WebkitRight:
+ case ETextAlign::kRight:
+ case ETextAlign::kWebkitRight:
updateLogicalWidthForRightAlignedBlock(
style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft,
totalLogicalWidth, availableLogicalWidth);
break;
- case ETextAlign::Center:
- case ETextAlign::WebkitCenter:
+ case ETextAlign::kCenter:
+ case ETextAlign::kWebkitCenter:
updateLogicalWidthForCenterAlignedBlock(
style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft,
totalLogicalWidth, availableLogicalWidth);
break;
- case ETextAlign::Justify:
+ case ETextAlign::kJustify:
adjustInlineDirectionLineBounds(expansionOpportunityCount, logicalLeft,
availableLogicalWidth);
if (expansionOpportunityCount) {
@@ -699,8 +699,8 @@ void LayoutBlockFlow::updateLogicalWidthForAlignment(
break;
}
// Fall through
- case ETextAlign::Start:
- if (direction == TextDirection::Ltr)
+ case ETextAlign::kStart:
+ if (direction == TextDirection::kLtr)
updateLogicalWidthForLeftAlignedBlock(
style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft,
totalLogicalWidth, availableLogicalWidth);
@@ -709,8 +709,8 @@ void LayoutBlockFlow::updateLogicalWidthForAlignment(
style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft,
totalLogicalWidth, availableLogicalWidth);
break;
- case ETextAlign::End:
- if (direction == TextDirection::Ltr)
+ case ETextAlign::kEnd:
+ if (direction == TextDirection::kLtr)
updateLogicalWidthForRightAlignedBlock(
style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft,
totalLogicalWidth, availableLogicalWidth);
@@ -820,7 +820,7 @@ BidiRun* LayoutBlockFlow::computeInlineDirectionPositionsForSegment(
}
if (r->m_lineLayoutItem.isText()) {
LineLayoutText rt(r->m_lineLayoutItem);
- if (textAlign == ETextAlign::Justify && r != trailingSpaceRun &&
+ if (textAlign == ETextAlign::kJustify && r != trailingSpaceRun &&
textJustify != TextJustifyNone) {
if (!isAfterExpansion)
toInlineTextBox(r->m_box)->setCanHaveLeadingExpansion(true);
@@ -1140,7 +1140,7 @@ void LayoutBlockFlow::layoutRunsAndFloatsInRange(
} else {
VisualDirectionOverride override =
(styleToUse.rtlOrdering() == EOrder::Visual
- ? (styleToUse.direction() == TextDirection::Ltr
+ ? (styleToUse.direction() == TextDirection::kLtr
? VisualLeftToRightOverride
: VisualRightToLeftOverride)
: NoVisualOverride);
@@ -1672,9 +1672,9 @@ void LayoutBlockFlow::computeInlinePreferredLogicalWidths(
const ComputedStyle& childStyle = child->styleRef();
clearPreviousFloat =
(prevFloat &&
- ((prevFloat->styleRef().floating() == EFloat::Left &&
+ ((prevFloat->styleRef().floating() == EFloat::kLeft &&
(childStyle.clear() & ClearLeft)) ||
- (prevFloat->styleRef().floating() == EFloat::Right &&
+ (prevFloat->styleRef().floating() == EFloat::kRight &&
(childStyle.clear() & ClearRight))));
prevFloat = child;
} else {
@@ -2357,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 = TextDirection::Ltr;
+ TextDirection ellipsisDirection = TextDirection::kLtr;
float firstLineEllipsisWidth = 0;
float ellipsisWidth = 0;
@@ -2470,15 +2470,15 @@ LayoutUnit LayoutBlockFlow::startAlignedOffsetForLine(
bool applyIndentText;
switch (textAlign) { // FIXME: Handle TAEND here
- case ETextAlign::Left:
- case ETextAlign::WebkitLeft:
+ case ETextAlign::kLeft:
+ case ETextAlign::kWebkitLeft:
applyIndentText = style()->isLeftToRightDirection();
break;
- case ETextAlign::Right:
- case ETextAlign::WebkitRight:
+ case ETextAlign::kRight:
+ case ETextAlign::kWebkitRight:
applyIndentText = !style()->isLeftToRightDirection();
break;
- case ETextAlign::Start:
+ case ETextAlign::kStart:
applyIndentText = true;
break;
default:
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlow.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