OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. |
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. | 9 * Copyright (C) 2012 Intel Corporation. All rights reserved. |
10 * | 10 * |
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 } | 914 } |
915 | 915 |
916 PassRefPtrWillBeRawPtr<CSSValue> BisonCSSParser::parseAnimationTimingFunctionVal
ue(const String& string) | 916 PassRefPtrWillBeRawPtr<CSSValue> BisonCSSParser::parseAnimationTimingFunctionVal
ue(const String& string) |
917 { | 917 { |
918 if (string.isEmpty()) | 918 if (string.isEmpty()) |
919 return nullptr; | 919 return nullptr; |
920 RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet:
:create(); | 920 RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet:
:create(); |
921 if (!parseValue(style.get(), CSSPropertyTransitionTimingFunction, string, fa
lse, HTMLStandardMode, 0)) | 921 if (!parseValue(style.get(), CSSPropertyTransitionTimingFunction, string, fa
lse, HTMLStandardMode, 0)) |
922 return nullptr; | 922 return nullptr; |
923 | 923 |
924 return style->getPropertyCSSValue(CSSPropertyTransitionTimingFunction); | 924 RefPtrWillBeRawPtr<CSSValue> value = style->getPropertyCSSValue(CSSPropertyT
ransitionTimingFunction); |
| 925 if (!value || value->isInitialValue() || value->isInheritedValue()) |
| 926 return nullptr; |
| 927 CSSValueList* valueList = toCSSValueList(value.get()); |
| 928 if (valueList->length() > 1) |
| 929 return nullptr; |
| 930 return valueList->item(0); |
925 } | 931 } |
926 | 932 |
927 bool BisonCSSParser::parseValue(MutableStylePropertySet* declaration, CSSPropert
yID propertyID, const String& string, bool important, const Document& document) | 933 bool BisonCSSParser::parseValue(MutableStylePropertySet* declaration, CSSPropert
yID propertyID, const String& string, bool important, const Document& document) |
928 { | 934 { |
929 ASSERT(!string.isEmpty()); | 935 ASSERT(!string.isEmpty()); |
930 | 936 |
931 CSSParserContext context(document, UseCounter::getFrom(&document)); | 937 CSSParserContext context(document, UseCounter::getFrom(&document)); |
932 | 938 |
933 if (parseSimpleLengthValue(declaration, propertyID, string, important, conte
xt.mode())) | 939 if (parseSimpleLengthValue(declaration, propertyID, string, important, conte
xt.mode())) |
934 return true; | 940 return true; |
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2069 rule->setProperties(createStylePropertySet()); | 2075 rule->setProperties(createStylePropertySet()); |
2070 clearProperties(); | 2076 clearProperties(); |
2071 | 2077 |
2072 StyleRuleViewport* result = rule.get(); | 2078 StyleRuleViewport* result = rule.get(); |
2073 m_parsedRules.append(rule.release()); | 2079 m_parsedRules.append(rule.release()); |
2074 | 2080 |
2075 return result; | 2081 return result; |
2076 } | 2082 } |
2077 | 2083 |
2078 } | 2084 } |
OLD | NEW |