OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. |
3 * Copyright (C) 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2012 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above | 9 * 1. Redistributions of source code must retain the above |
10 * copyright notice, this list of conditions and the following | 10 * copyright notice, this list of conditions and the following |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 inline bool isUnitLessLengthParsingEnabledForMode(CSSParserMode mode) | 71 inline bool isUnitLessLengthParsingEnabledForMode(CSSParserMode mode) |
72 { | 72 { |
73 return mode == HTMLQuirksMode || mode == HTMLAttributeMode || mode == SVGAtt
ributeMode; | 73 return mode == HTMLQuirksMode || mode == HTMLAttributeMode || mode == SVGAtt
ributeMode; |
74 } | 74 } |
75 | 75 |
76 inline bool isCSSViewportParsingEnabledForMode(CSSParserMode mode) | 76 inline bool isCSSViewportParsingEnabledForMode(CSSParserMode mode) |
77 { | 77 { |
78 return mode == CSSViewportRuleMode; | 78 return mode == CSSViewportRuleMode; |
79 } | 79 } |
80 | 80 |
81 inline bool isSVGNumberParsingEnabledForMode(CSSParserMode mode) | |
82 { | |
83 return mode == SVGAttributeMode; | |
84 } | |
85 | |
86 inline bool isUseCounterEnabledForMode(CSSParserMode mode) | 81 inline bool isUseCounterEnabledForMode(CSSParserMode mode) |
87 { | 82 { |
88 // We don't count the UA style sheet in our statistics. | 83 // We don't count the UA style sheet in our statistics. |
89 return mode != UASheetMode; | 84 return mode != UASheetMode; |
90 } | 85 } |
91 | 86 |
92 class UseCounter; | 87 class UseCounter; |
93 | 88 |
94 class CSSParserContext { | 89 class CSSParserContext { |
95 WTF_MAKE_FAST_ALLOCATED; | 90 WTF_MAKE_FAST_ALLOCATED; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 bool m_useLegacyBackgroundSizeShorthandBehavior; | 131 bool m_useLegacyBackgroundSizeShorthandBehavior; |
137 | 132 |
138 UseCounter* m_useCounter; | 133 UseCounter* m_useCounter; |
139 }; | 134 }; |
140 | 135 |
141 const CSSParserContext& strictCSSParserContext(); | 136 const CSSParserContext& strictCSSParserContext(); |
142 | 137 |
143 }; | 138 }; |
144 | 139 |
145 #endif // CSSParserMode_h | 140 #endif // CSSParserMode_h |
OLD | NEW |