| 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 24 matching lines...) Expand all Loading... |
| 35 #include "core/css/parser/CSSParser.h" | 35 #include "core/css/parser/CSSParser.h" |
| 36 #include "wtf/text/WTFString.h" | 36 #include "wtf/text/WTFString.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 PassRefPtrWillBeRawPtr<DOMWindowCSS> DOMWindowCSS::create() | 40 PassRefPtrWillBeRawPtr<DOMWindowCSS> DOMWindowCSS::create() |
| 41 { | 41 { |
| 42 return adoptRefWillBeNoop(new DOMWindowCSS()); | 42 return adoptRefWillBeNoop(new DOMWindowCSS()); |
| 43 } | 43 } |
| 44 | 44 |
| 45 bool DOMWindowCSS::supports(const String& property, const String& value) const | 45 bool DOMWindowCSS::supports(const String& property, const String& value) |
| 46 { | 46 { |
| 47 CSSPropertyID unresolvedProperty = unresolvedCSSPropertyID(property); | 47 CSSPropertyID unresolvedProperty = unresolvedCSSPropertyID(property); |
| 48 if (unresolvedProperty == CSSPropertyInvalid) | 48 if (unresolvedProperty == CSSPropertyInvalid) |
| 49 return false; | 49 return false; |
| 50 ASSERT(CSSPropertyMetadata::isEnabledProperty(unresolvedProperty)); | 50 ASSERT(CSSPropertyMetadata::isEnabledProperty(unresolvedProperty)); |
| 51 | 51 |
| 52 // This will return false when !important is present | 52 // This will return false when !important is present |
| 53 RefPtrWillBeRawPtr<MutableStylePropertySet> dummyStyle = MutableStylePropert
ySet::create(); | 53 RefPtrWillBeRawPtr<MutableStylePropertySet> dummyStyle = MutableStylePropert
ySet::create(); |
| 54 return CSSParser::parseValue(dummyStyle.get(), unresolvedProperty, value, fa
lse, HTMLStandardMode, 0); | 54 return CSSParser::parseValue(dummyStyle.get(), unresolvedProperty, value, fa
lse, HTMLStandardMode, 0); |
| 55 } | 55 } |
| 56 | 56 |
| 57 bool DOMWindowCSS::supports(const String& conditionText) const | 57 bool DOMWindowCSS::supports(const String& conditionText) |
| 58 { | 58 { |
| 59 return CSSParser::parseSupportsCondition(conditionText); | 59 return CSSParser::parseSupportsCondition(conditionText); |
| 60 } | 60 } |
| 61 | 61 |
| 62 } | 62 } |
| OLD | NEW |