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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 2908933002: Make PageSizeType an enum class. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
index c465e29f0a0273b7efebcac85ef9f08ed9f0c756..909904ef298581529698c93e6ef86d1fb8f4a795 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -372,7 +372,7 @@ void StyleBuilderFunctions::applyValueCSSPropertySize(StyleResolverState& state,
const CSSValue& value) {
state.Style()->ResetPageSizeType();
FloatSize size;
- PageSizeType page_size_type = PAGE_SIZE_AUTO;
+ PageSizeType page_size_type = PageSizeType::kAuto;
const CSSValueList& list = ToCSSValueList(value);
if (list.length() == 2) {
// <length>{2} | <page-size> <orientation>
@@ -394,14 +394,14 @@ void StyleBuilderFunctions::applyValueCSSPropertySize(StyleResolverState& state,
if (ToCSSIdentifierValue(second).GetValueID() == CSSValueLandscape)
size = size.TransposedSize();
}
- page_size_type = PAGE_SIZE_RESOLVED;
+ page_size_type = PageSizeType::kResolved;
} else {
DCHECK_EQ(list.length(), 1U);
// <length> | auto | <page-size> | [ portrait | landscape]
const CSSValue& first = list.Item(0);
if (first.IsPrimitiveValue() && ToCSSPrimitiveValue(first).IsLength()) {
// <length>
- page_size_type = PAGE_SIZE_RESOLVED;
+ page_size_type = PageSizeType::kResolved;
float width = ToCSSPrimitiveValue(first).ComputeLength<float>(
state.CssToLengthConversionData().CopyWithAdjustedZoom(1.0));
size = FloatSize(width, width);
@@ -409,17 +409,17 @@ void StyleBuilderFunctions::applyValueCSSPropertySize(StyleResolverState& state,
const CSSIdentifierValue& ident = ToCSSIdentifierValue(first);
switch (ident.GetValueID()) {
case CSSValueAuto:
- page_size_type = PAGE_SIZE_AUTO;
+ page_size_type = PageSizeType::kAuto;
break;
case CSSValuePortrait:
- page_size_type = PAGE_SIZE_AUTO_PORTRAIT;
+ page_size_type = PageSizeType::kPortrait;
break;
case CSSValueLandscape:
- page_size_type = PAGE_SIZE_AUTO_LANDSCAPE;
+ page_size_type = PageSizeType::kLandscape;
break;
default:
// <page-size>
- page_size_type = PAGE_SIZE_RESOLVED;
+ page_size_type = PageSizeType::kResolved;
size = GetPageSizeFromName(ident);
}
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698