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 30 matching lines...) Expand all Loading... |
41 class Document; | 41 class Document; |
42 | 42 |
43 // Must not grow beyond 3 bits, due to packing in StylePropertySet. | 43 // Must not grow beyond 3 bits, due to packing in StylePropertySet. |
44 enum CSSParserMode { | 44 enum CSSParserMode { |
45 HTMLStandardMode, | 45 HTMLStandardMode, |
46 HTMLQuirksMode, | 46 HTMLQuirksMode, |
47 // HTML attributes are parsed in quirks mode but also allows internal properti
es and values. | 47 // HTML attributes are parsed in quirks mode but also allows internal properti
es and values. |
48 HTMLAttributeMode, | 48 HTMLAttributeMode, |
49 // SVG attributes are parsed in quirks mode but rules differ slightly. | 49 // SVG attributes are parsed in quirks mode but rules differ slightly. |
50 SVGAttributeMode, | 50 SVGAttributeMode, |
51 // @viewport rules are parsed in standards mode but CSSOM modifications (via S
tylePropertySet) | 51 // @viewport/@font-face rules are specially tagged in StylePropertySet so CSSO
M modifications don't treat them as style rules. |
52 // must call parseViewportProperties so needs a special mode. | |
53 CSSViewportRuleMode, | 52 CSSViewportRuleMode, |
| 53 CSSFontFaceRuleMode, |
54 // User agent stylesheets are parsed in standards mode but also allows interna
l properties and values. | 54 // User agent stylesheets are parsed in standards mode but also allows interna
l properties and values. |
55 UASheetMode | 55 UASheetMode |
56 }; | 56 }; |
57 | 57 |
58 inline bool isQuirksModeBehavior(CSSParserMode mode) { | 58 inline bool isQuirksModeBehavior(CSSParserMode mode) { |
59 return mode == HTMLQuirksMode; // || mode == HTMLAttributeMode; | 59 return mode == HTMLQuirksMode; // || mode == HTMLAttributeMode; |
60 } | 60 } |
61 | 61 |
62 inline bool isUASheetBehavior(CSSParserMode mode) { | 62 inline bool isUASheetBehavior(CSSParserMode mode) { |
63 return mode == UASheetMode; | 63 return mode == UASheetMode; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 ContentSecurityPolicyDisposition m_shouldCheckContentSecurityPolicy; | 140 ContentSecurityPolicyDisposition m_shouldCheckContentSecurityPolicy; |
141 | 141 |
142 UseCounter* m_useCounter; | 142 UseCounter* m_useCounter; |
143 }; | 143 }; |
144 | 144 |
145 CORE_EXPORT const CSSParserContext& strictCSSParserContext(); | 145 CORE_EXPORT const CSSParserContext& strictCSSParserContext(); |
146 | 146 |
147 } // namespace blink | 147 } // namespace blink |
148 | 148 |
149 #endif // CSSParserMode_h | 149 #endif // CSSParserMode_h |
OLD | NEW |