| 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 29 matching lines...) Expand all Loading... |
| 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 bool isAnimationTainted = false; | 48 bool isAnimationTainted = false; |
| 49 return CSSParser::parseValueForCustomProperty( | 49 return CSSParser::parseValueForCustomProperty( |
| 50 dummyStyle, "--valid", value, false, nullptr, isAnimationTainted); | 50 dummyStyle, "--valid", value, false, nullptr, isAnimationTainted) |
| 51 .didParse; |
| 51 } | 52 } |
| 52 | 53 |
| 53 ASSERT(CSSPropertyMetadata::isEnabledProperty(unresolvedProperty)); | 54 ASSERT(CSSPropertyMetadata::isEnabledProperty(unresolvedProperty)); |
| 54 | 55 |
| 55 // This will return false when !important is present | 56 // This will return false when !important is present |
| 56 MutableStylePropertySet* dummyStyle = | 57 MutableStylePropertySet* dummyStyle = |
| 57 MutableStylePropertySet::create(HTMLStandardMode); | 58 MutableStylePropertySet::create(HTMLStandardMode); |
| 58 return CSSParser::parseValue(dummyStyle, unresolvedProperty, value, false, 0); | 59 return CSSParser::parseValue(dummyStyle, unresolvedProperty, value, false, 0) |
| 60 .didParse; |
| 59 } | 61 } |
| 60 | 62 |
| 61 bool DOMWindowCSS::supports(const String& conditionText) { | 63 bool DOMWindowCSS::supports(const String& conditionText) { |
| 62 return CSSParser::parseSupportsCondition(conditionText); | 64 return CSSParser::parseSupportsCondition(conditionText); |
| 63 } | 65 } |
| 64 | 66 |
| 65 String DOMWindowCSS::escape(const String& ident) { | 67 String DOMWindowCSS::escape(const String& ident) { |
| 66 StringBuilder builder; | 68 StringBuilder builder; |
| 67 serializeIdentifier(ident, builder); | 69 serializeIdentifier(ident, builder); |
| 68 return builder.toString(); | 70 return builder.toString(); |
| 69 } | 71 } |
| 70 | 72 |
| 71 } // namespace blink | 73 } // namespace blink |
| OLD | NEW |