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

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

Issue 2635143002: Changed EBoxSizing to an enum class and renamed its members (Closed)
Patch Set: Aded k prefix 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/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 3ad08c2f8690a0b53c26c12ddbb85d11157304f1..f6f345ee89a69ec6154c9611d19572fadbd5f708 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1342,7 +1342,7 @@ LayoutUnit LayoutBox::adjustBorderBoxLogicalWidthForBoxSizing(
float width) const {
LayoutUnit bordersPlusPadding = collapsedBorderAndCSSPaddingLogicalWidth();
LayoutUnit result(width);
- if (style()->boxSizing() == BoxSizingContentBox)
+ if (style()->boxSizing() == EBoxSizing::kContentBox)
return result + bordersPlusPadding;
return std::max(result, bordersPlusPadding);
}
@@ -1351,7 +1351,7 @@ LayoutUnit LayoutBox::adjustBorderBoxLogicalHeightForBoxSizing(
float height) const {
LayoutUnit bordersPlusPadding = collapsedBorderAndCSSPaddingLogicalHeight();
LayoutUnit result(height);
- if (style()->boxSizing() == BoxSizingContentBox)
+ if (style()->boxSizing() == EBoxSizing::kContentBox)
return result + bordersPlusPadding;
return std::max(result, bordersPlusPadding);
}
@@ -1359,7 +1359,7 @@ LayoutUnit LayoutBox::adjustBorderBoxLogicalHeightForBoxSizing(
LayoutUnit LayoutBox::adjustContentBoxLogicalWidthForBoxSizing(
float width) const {
LayoutUnit result(width);
- if (style()->boxSizing() == BoxSizingBorderBox)
+ if (style()->boxSizing() == EBoxSizing::kBorderBox)
result -= collapsedBorderAndCSSPaddingLogicalWidth();
return std::max(LayoutUnit(), result);
}
@@ -1367,7 +1367,7 @@ LayoutUnit LayoutBox::adjustContentBoxLogicalWidthForBoxSizing(
LayoutUnit LayoutBox::adjustContentBoxLogicalHeightForBoxSizing(
float height) const {
LayoutUnit result(height);
- if (style()->boxSizing() == BoxSizingBorderBox)
+ if (style()->boxSizing() == EBoxSizing::kBorderBox)
result -= collapsedBorderAndCSSPaddingLogicalHeight();
return std::max(LayoutUnit(), result);
}
@@ -3250,7 +3250,7 @@ LayoutUnit LayoutBox::computePercentageLogicalHeight(
bool subtractBorderAndPadding =
isTable() || (cb->isTableCell() && !skippedAutoHeightContainingBlock &&
cb->hasOverrideLogicalContentHeight() &&
- style()->boxSizing() == BoxSizingContentBox);
+ style()->boxSizing() == EBoxSizing::kContentBox);
if (subtractBorderAndPadding) {
result -= borderAndPaddingLogicalHeight();
return std::max(LayoutUnit(), result);
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698