| OLD | NEW |
| 1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CSSValueIDMappings_h | 5 #ifndef CSSValueIDMappings_h |
| 6 #define CSSValueIDMappings_h | 6 #define CSSValueIDMappings_h |
| 7 | 7 |
| 8 #include "core/CSSValueIDMappingsGenerated.h" | 8 #include "core/CSSValueIDMappingsGenerated.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 if (v == CSSValueWebkitIsolate) | 27 if (v == CSSValueWebkitIsolate) |
| 28 return UnicodeBidi::kIsolate; | 28 return UnicodeBidi::kIsolate; |
| 29 if (v == CSSValueWebkitIsolateOverride) | 29 if (v == CSSValueWebkitIsolateOverride) |
| 30 return UnicodeBidi::kIsolateOverride; | 30 return UnicodeBidi::kIsolateOverride; |
| 31 if (v == CSSValueWebkitPlaintext) | 31 if (v == CSSValueWebkitPlaintext) |
| 32 return UnicodeBidi::kPlaintext; | 32 return UnicodeBidi::kPlaintext; |
| 33 return detail::cssValueIDToPlatformEnumGenerated<UnicodeBidi>(v); | 33 return detail::cssValueIDToPlatformEnumGenerated<UnicodeBidi>(v); |
| 34 } | 34 } |
| 35 | 35 |
| 36 template <> | 36 template <> |
| 37 inline ETextCombine CssValueIDToPlatformEnum(CSSValueID v) { |
| 38 if (v == CSSValueHorizontal) // -webkit-text-combine |
| 39 return ETextCombine::kAll; |
| 40 return detail::cssValueIDToPlatformEnumGenerated<ETextCombine>(v); |
| 41 } |
| 42 |
| 43 template <> |
| 37 inline ETextAlign CssValueIDToPlatformEnum(CSSValueID v) { | 44 inline ETextAlign CssValueIDToPlatformEnum(CSSValueID v) { |
| 38 if (v == CSSValueWebkitAuto) // Legacy -webkit-auto. Eqiuvalent to start. | 45 if (v == CSSValueWebkitAuto) // Legacy -webkit-auto. Eqiuvalent to start. |
| 39 return ETextAlign::kStart; | 46 return ETextAlign::kStart; |
| 40 if (v == CSSValueInternalCenter) | 47 if (v == CSSValueInternalCenter) |
| 41 return ETextAlign::kCenter; | 48 return ETextAlign::kCenter; |
| 42 return detail::cssValueIDToPlatformEnumGenerated<ETextAlign>(v); | 49 return detail::cssValueIDToPlatformEnumGenerated<ETextAlign>(v); |
| 43 } | 50 } |
| 44 | 51 |
| 45 template <> | 52 template <> |
| 46 inline WritingMode CssValueIDToPlatformEnum(CSSValueID v) { | 53 inline WritingMode CssValueIDToPlatformEnum(CSSValueID v) { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 if (v == CSSValueWebkitFlex) | 86 if (v == CSSValueWebkitFlex) |
| 80 return EDisplay::kFlex; | 87 return EDisplay::kFlex; |
| 81 if (v == CSSValueWebkitInlineFlex) | 88 if (v == CSSValueWebkitInlineFlex) |
| 82 return EDisplay::kInlineFlex; | 89 return EDisplay::kInlineFlex; |
| 83 return detail::cssValueIDToPlatformEnumGenerated<EDisplay>(v); | 90 return detail::cssValueIDToPlatformEnumGenerated<EDisplay>(v); |
| 84 } | 91 } |
| 85 | 92 |
| 86 } // namespace blink | 93 } // namespace blink |
| 87 | 94 |
| 88 #endif | 95 #endif |
| OLD | NEW |