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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h

Issue 2936113003: Make EIsolation an enum class. (Closed)
Patch Set: Fix code Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSProperties.json5 » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Alexey Proskuryakov <ap@nypop.com>. 2 * Copyright (C) 2007 Alexey Proskuryakov <ap@nypop.com>.
3 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
5 * (http://www.torchmobile.com/) 5 * (http://www.torchmobile.com/)
6 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> 6 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com>
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
(...skipping 2341 matching lines...) Expand 10 before | Expand all | Expand 10 after
2352 } 2352 }
2353 2353
2354 NOTREACHED(); 2354 NOTREACHED();
2355 return TouchAction::kTouchActionNone; 2355 return TouchAction::kTouchActionNone;
2356 } 2356 }
2357 2357
2358 template <> 2358 template <>
2359 inline CSSIdentifierValue::CSSIdentifierValue(EIsolation i) 2359 inline CSSIdentifierValue::CSSIdentifierValue(EIsolation i)
2360 : CSSValue(kIdentifierClass) { 2360 : CSSValue(kIdentifierClass) {
2361 switch (i) { 2361 switch (i) {
2362 case kIsolationAuto: 2362 case EIsolation::kAuto:
2363 value_id_ = CSSValueAuto; 2363 value_id_ = CSSValueAuto;
2364 break; 2364 break;
2365 case kIsolationIsolate: 2365 case EIsolation::kIsolate:
2366 value_id_ = CSSValueIsolate; 2366 value_id_ = CSSValueIsolate;
2367 break; 2367 break;
2368 } 2368 }
2369 } 2369 }
2370 2370
2371 template <> 2371 template <>
2372 inline EIsolation CSSIdentifierValue::ConvertTo() const { 2372 inline EIsolation CSSIdentifierValue::ConvertTo() const {
2373 switch (value_id_) { 2373 switch (value_id_) {
2374 case CSSValueAuto: 2374 case CSSValueAuto:
2375 return kIsolationAuto; 2375 return EIsolation::kAuto;
2376 case CSSValueIsolate: 2376 case CSSValueIsolate:
2377 return kIsolationIsolate; 2377 return EIsolation::kIsolate;
2378 default: 2378 default:
2379 break; 2379 break;
2380 } 2380 }
2381 2381
2382 NOTREACHED(); 2382 NOTREACHED();
2383 return kIsolationAuto; 2383 return EIsolation::kAuto;
2384 } 2384 }
2385 2385
2386 template <> 2386 template <>
2387 inline CSSIdentifierValue::CSSIdentifierValue(CSSBoxType css_box) 2387 inline CSSIdentifierValue::CSSIdentifierValue(CSSBoxType css_box)
2388 : CSSValue(kIdentifierClass) { 2388 : CSSValue(kIdentifierClass) {
2389 switch (css_box) { 2389 switch (css_box) {
2390 case kMarginBox: 2390 case kMarginBox:
2391 value_id_ = CSSValueMarginBox; 2391 value_id_ = CSSValueMarginBox;
2392 break; 2392 break;
2393 case kBorderBox: 2393 case kBorderBox:
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
2764 default: 2764 default:
2765 break; 2765 break;
2766 } 2766 }
2767 NOTREACHED(); 2767 NOTREACHED();
2768 return kContainsNone; 2768 return kContainsNone;
2769 } 2769 }
2770 2770
2771 } // namespace blink 2771 } // namespace blink
2772 2772
2773 #endif 2773 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSProperties.json5 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698