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

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

Issue 1835303002: Implementation of the GreenWeb language extensions. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change GreenWeb-related CSS property names such that they apply in the desired order at runtime. Created 4 years, 8 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
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. (http://www.torchmo bile.com/) 4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
5 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> 5 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com>
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "platform/scroll/ScrollableArea.h" 48 #include "platform/scroll/ScrollableArea.h"
49 #include "platform/text/TextDirection.h" 49 #include "platform/text/TextDirection.h"
50 #include "platform/text/TextRun.h" 50 #include "platform/text/TextRun.h"
51 #include "platform/text/UnicodeBidi.h" 51 #include "platform/text/UnicodeBidi.h"
52 #include "platform/text/WritingMode.h" 52 #include "platform/text/WritingMode.h"
53 #include "public/platform/WebBlendMode.h" 53 #include "public/platform/WebBlendMode.h"
54 #include "wtf/MathExtras.h" 54 #include "wtf/MathExtras.h"
55 55
56 namespace blink { 56 namespace blink {
57 57
58 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EQoSDuration e)
59 : CSSValue(PrimitiveClass)
60 {
61 init(UnitType::ValueID);
62 switch (e) {
63 case SHORT:
64 m_value.valueID = CSSValueShort;
65 break;
66 case LONG:
67 m_value.valueID = CSSValueLong;
68 break;
69 }
70 }
71
72 template<> inline EQoSDuration CSSPrimitiveValue::convertTo() const
73 {
74 ASSERT(isValueID());
75 switch (m_value.valueID) {
76 case CSSValueShort:
77 return SHORT;
78 case CSSValueLong:
79 return LONG;
80 default:
81 break;
82 }
83
84 ASSERT_NOT_REACHED();
85 return SHORT;
86 }
87
88 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EQoSType e)
89 : CSSValue(PrimitiveClass)
90 {
91 init(UnitType::ValueID);
92 switch (e) {
93 case DISCRETE:
94 m_value.valueID = CSSValueSingle;
95 break;
96 case CONTINUOUS:
97 m_value.valueID = CSSValueContinuous;
98 break;
99 }
100 }
101
102 template<> inline EQoSType CSSPrimitiveValue::convertTo() const
103 {
104 ASSERT(isValueID());
105 switch (m_value.valueID) {
106 case CSSValueSingle:
107 return DISCRETE;
108 case CSSValueContinuous:
109 return CONTINUOUS;
110 default:
111 break;
112 }
113
114 ASSERT_NOT_REACHED();
115 return DISCRETE;
116 }
117
58 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(short i) 118 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(short i)
59 : CSSValue(PrimitiveClass) 119 : CSSValue(PrimitiveClass)
60 { 120 {
61 init(UnitType::Number); 121 init(UnitType::Number);
62 m_value.num = static_cast<double>(i); 122 m_value.num = static_cast<double>(i);
63 } 123 }
64 124
65 template<> inline short CSSPrimitiveValue::convertTo() const 125 template<> inline short CSSPrimitiveValue::convertTo() const
66 { 126 {
67 ASSERT(isNumber()); 127 ASSERT(isNumber());
(...skipping 4550 matching lines...) Expand 10 before | Expand all | Expand 10 after
4618 default: 4678 default:
4619 break; 4679 break;
4620 } 4680 }
4621 ASSERT_NOT_REACHED(); 4681 ASSERT_NOT_REACHED();
4622 return ScrollSnapTypeNone; 4682 return ScrollSnapTypeNone;
4623 } 4683 }
4624 4684
4625 } // namespace blink 4685 } // namespace blink
4626 4686
4627 #endif 4687 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/DEPS ('k') | third_party/WebKit/Source/core/css/CSSProperties.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698