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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTableCell.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/LayoutTableCell.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
index dd75dc792506a9ad42cbe95ba07b312ff959ab06..6f536105dd04a3d3f710615a4a742fc2b817eb91 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
@@ -246,28 +246,28 @@ void LayoutTableCell::computeIntrinsicPadding(int rowHeight,
int intrinsicPaddingBefore = 0;
switch (verticalAlign) {
- case VerticalAlignSub:
- case VerticalAlignSuper:
- case VerticalAlignTextTop:
- case VerticalAlignTextBottom:
- case VerticalAlignLength:
- case VerticalAlignBaseline: {
+ case EVerticalAlign::Sub:
+ case EVerticalAlign::Super:
+ case EVerticalAlign::TextTop:
+ case EVerticalAlign::TextBottom:
+ case EVerticalAlign::Length:
+ case EVerticalAlign::Baseline: {
int baseline = cellBaselinePosition();
if (baseline > borderBefore() + paddingBefore())
intrinsicPaddingBefore = section()->rowBaseline(rowIndex()) -
(baseline - oldIntrinsicPaddingBefore);
break;
}
- case VerticalAlignTop:
+ case EVerticalAlign::Top:
break;
- case VerticalAlignMiddle:
+ case EVerticalAlign::Middle:
intrinsicPaddingBefore =
(rowHeight - logicalHeightWithoutIntrinsicPadding) / 2;
break;
- case VerticalAlignBottom:
+ case EVerticalAlign::Bottom:
intrinsicPaddingBefore = rowHeight - logicalHeightWithoutIntrinsicPadding;
break;
- case VerticalAlignBaselineMiddle:
+ case EVerticalAlign::BaselineMiddle:
break;
}
@@ -1400,7 +1400,7 @@ void LayoutTableCell::scrollbarsChanged(bool horizontalScrollbarChanged,
// Shrink our intrinsic padding as much as possible to accommodate the
// scrollbar.
- if (style()->verticalAlign() == VerticalAlignMiddle) {
+ if (style()->verticalAlign() == EVerticalAlign::Middle) {
LayoutUnit totalHeight = logicalHeight();
LayoutUnit heightWithoutIntrinsicPadding =
totalHeight - intrinsicPaddingBefore() - intrinsicPaddingAfter();
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableCell.h ('k') | third_party/WebKit/Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698