| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Motorola Mobility Inc. All rights reserved. | 2 * Copyright (C) 2012 Motorola Mobility Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above | 10 * 2. Redistributions in binary form must reproduce the above |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 bool DOMWindowCSS::supports(const String& property, const String& value) { | 41 bool DOMWindowCSS::supports(const String& property, const String& value) { |
| 42 CSSPropertyID unresolvedProperty = unresolvedCSSPropertyID(property); | 42 CSSPropertyID unresolvedProperty = unresolvedCSSPropertyID(property); |
| 43 if (unresolvedProperty == CSSPropertyInvalid) | 43 if (unresolvedProperty == CSSPropertyInvalid) |
| 44 return false; | 44 return false; |
| 45 if (unresolvedProperty == CSSPropertyVariable) { | 45 if (unresolvedProperty == CSSPropertyVariable) { |
| 46 MutableStylePropertySet* dummyStyle = | 46 MutableStylePropertySet* dummyStyle = |
| 47 MutableStylePropertySet::create(HTMLStandardMode); | 47 MutableStylePropertySet::create(HTMLStandardMode); |
| 48 return CSSParser::parseValueForCustomProperty(dummyStyle, "--valid", value, | 48 bool isAnimationTainted = false; |
| 49 false, 0); | 49 return CSSParser::parseValueForCustomProperty( |
| 50 dummyStyle, "--valid", value, false, nullptr, isAnimationTainted); |
| 50 } | 51 } |
| 51 | 52 |
| 52 ASSERT(CSSPropertyMetadata::isEnabledProperty(unresolvedProperty)); | 53 ASSERT(CSSPropertyMetadata::isEnabledProperty(unresolvedProperty)); |
| 53 | 54 |
| 54 // This will return false when !important is present | 55 // This will return false when !important is present |
| 55 MutableStylePropertySet* dummyStyle = | 56 MutableStylePropertySet* dummyStyle = |
| 56 MutableStylePropertySet::create(HTMLStandardMode); | 57 MutableStylePropertySet::create(HTMLStandardMode); |
| 57 return CSSParser::parseValue(dummyStyle, unresolvedProperty, value, false, 0); | 58 return CSSParser::parseValue(dummyStyle, unresolvedProperty, value, false, 0); |
| 58 } | 59 } |
| 59 | 60 |
| 60 bool DOMWindowCSS::supports(const String& conditionText) { | 61 bool DOMWindowCSS::supports(const String& conditionText) { |
| 61 return CSSParser::parseSupportsCondition(conditionText); | 62 return CSSParser::parseSupportsCondition(conditionText); |
| 62 } | 63 } |
| 63 | 64 |
| 64 String DOMWindowCSS::escape(const String& ident) { | 65 String DOMWindowCSS::escape(const String& ident) { |
| 65 StringBuilder builder; | 66 StringBuilder builder; |
| 66 serializeIdentifier(ident, builder); | 67 serializeIdentifier(ident, builder); |
| 67 return builder.toString(); | 68 return builder.toString(); |
| 68 } | 69 } |
| 69 | 70 |
| 70 } // namespace blink | 71 } // namespace blink |
| OLD | NEW |