Chromium Code Reviews| 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 rules are parsed in standards mode but CSSOM modifications (via S tylePropertySet) |
|
Timothy Loh
2016/10/05 03:08:54
Comment needs to be updated, maybe something like
rwlbuis
2016/10/05 14:21:37
Done.
| |
| 52 // must call parseViewportProperties so needs a special mode. | 52 // must call parseViewportProperties so needs a special mode. |
| 53 CSSViewportRuleMode, | 53 CSSViewportRuleMode, |
| 54 CSSFontFaceRuleMode, | |
| 54 // User agent stylesheets are parsed in standards mode but also allows interna l properties and values. | 55 // User agent stylesheets are parsed in standards mode but also allows interna l properties and values. |
| 55 UASheetMode | 56 UASheetMode |
| 56 }; | 57 }; |
| 57 | 58 |
| 58 inline bool isQuirksModeBehavior(CSSParserMode mode) { | 59 inline bool isQuirksModeBehavior(CSSParserMode mode) { |
| 59 return mode == HTMLQuirksMode; // || mode == HTMLAttributeMode; | 60 return mode == HTMLQuirksMode; // || mode == HTMLAttributeMode; |
| 60 } | 61 } |
| 61 | 62 |
| 62 inline bool isUASheetBehavior(CSSParserMode mode) { | 63 inline bool isUASheetBehavior(CSSParserMode mode) { |
| 63 return mode == UASheetMode; | 64 return mode == UASheetMode; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 140 ContentSecurityPolicyDisposition m_shouldCheckContentSecurityPolicy; | 141 ContentSecurityPolicyDisposition m_shouldCheckContentSecurityPolicy; |
| 141 | 142 |
| 142 UseCounter* m_useCounter; | 143 UseCounter* m_useCounter; |
| 143 }; | 144 }; |
| 144 | 145 |
| 145 CORE_EXPORT const CSSParserContext& strictCSSParserContext(); | 146 CORE_EXPORT const CSSParserContext& strictCSSParserContext(); |
| 146 | 147 |
| 147 } // namespace blink | 148 } // namespace blink |
| 148 | 149 |
| 149 #endif // CSSParserMode_h | 150 #endif // CSSParserMode_h |
| OLD | NEW |