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

Unified Diff: third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp

Issue 2578403002: Changed EVerticalAlign to an enum class and renamed its members (Closed)
Patch Set: 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/line/InlineFlowBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp b/third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp
index 358d67f366c55f6e3ad716369273b62826601957..3c604742aa2b51db2b1ef8999128b0b2cb46cb7e 100644
--- a/third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp
+++ b/third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp
@@ -88,8 +88,8 @@ static inline bool hasIdenticalLineHeightProperties(
bool isRoot) {
return parentStyle.hasIdenticalAscentDescentAndLineGap(childStyle) &&
parentStyle.lineHeight() == childStyle.lineHeight() &&
- (parentStyle.verticalAlign() == VerticalAlignBaseline || isRoot) &&
- childStyle.verticalAlign() == VerticalAlignBaseline;
+ (parentStyle.verticalAlign() == EVerticalAlign::Baseline || isRoot) &&
+ childStyle.verticalAlign() == EVerticalAlign::Baseline;
}
void InlineFlowBox::addToLine(InlineBox* child) {
@@ -531,10 +531,10 @@ void InlineFlowBox::adjustMaxAscentAndDescent(int& maxAscent,
// positioned elements
if (curr->getLineLayoutItem().isOutOfFlowPositioned())
continue; // Positioned placeholders don't affect calculations.
- if (curr->verticalAlign() == VerticalAlignTop ||
- curr->verticalAlign() == VerticalAlignBottom) {
+ if (curr->verticalAlign() == EVerticalAlign::Top ||
+ curr->verticalAlign() == EVerticalAlign::Bottom) {
int lineHeight = curr->lineHeight().round();
- if (curr->verticalAlign() == VerticalAlignTop) {
+ if (curr->verticalAlign() == EVerticalAlign::Top) {
if (maxAscent + maxDescent < lineHeight)
maxDescent = lineHeight - maxAscent;
} else {
@@ -637,10 +637,10 @@ void InlineFlowBox::computeLogicalBoxHeights(
affectsAscent, affectsDescent);
LayoutUnit boxHeight(ascent + descent);
- if (curr->verticalAlign() == VerticalAlignTop) {
+ if (curr->verticalAlign() == EVerticalAlign::Top) {
if (maxPositionTop < boxHeight)
maxPositionTop = boxHeight;
- } else if (curr->verticalAlign() == VerticalAlignBottom) {
+ } else if (curr->verticalAlign() == EVerticalAlign::Bottom) {
if (maxPositionBottom < boxHeight)
maxPositionBottom = boxHeight;
} else if (!inlineFlowBox || noQuirksMode ||
@@ -728,9 +728,9 @@ void InlineFlowBox::placeBoxesInBlockDirection(
InlineFlowBox* inlineFlowBox =
curr->isInlineFlowBox() ? toInlineFlowBox(curr) : nullptr;
bool childAffectsTopBottomPos = true;
- if (curr->verticalAlign() == VerticalAlignTop) {
+ if (curr->verticalAlign() == EVerticalAlign::Top) {
curr->setLogicalTop(top);
- } else if (curr->verticalAlign() == VerticalAlignBottom) {
+ } else if (curr->verticalAlign() == EVerticalAlign::Bottom) {
curr->setLogicalTop((top + maxHeight - curr->lineHeight()));
} else {
if (!noQuirksMode && inlineFlowBox && !inlineFlowBox->hasTextChildren() &&

Powered by Google App Engine
This is Rietveld 408576698