| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef CSSFunctionValue_h | 26 #ifndef CSSFunctionValue_h |
| 27 #define CSSFunctionValue_h | 27 #define CSSFunctionValue_h |
| 28 | 28 |
| 29 #include "core/css/CSSValue.h" | 29 #include "core/css/CSSValue.h" |
| 30 | 30 |
| 31 namespace blink { | 31 namespace blink { |
| 32 | 32 |
| 33 class CSSValueList; | 33 class CSSValueList; |
| 34 struct CSSParserFunction; | |
| 35 | 34 |
| 36 class CSSFunctionValue : public CSSValue { | 35 class CSSFunctionValue : public CSSValue { |
| 37 public: | 36 public: |
| 38 static PassRefPtrWillBeRawPtr<CSSFunctionValue> create(CSSParserFunction* fu
nction) | |
| 39 { | |
| 40 return adoptRefWillBeNoop(new CSSFunctionValue(function)); | |
| 41 } | |
| 42 | |
| 43 static PassRefPtrWillBeRawPtr<CSSFunctionValue> create(String name, PassRefP
trWillBeRawPtr<CSSValueList> args) | 37 static PassRefPtrWillBeRawPtr<CSSFunctionValue> create(String name, PassRefP
trWillBeRawPtr<CSSValueList> args) |
| 44 { | 38 { |
| 45 return adoptRefWillBeNoop(new CSSFunctionValue(name, args)); | 39 return adoptRefWillBeNoop(new CSSFunctionValue(name, args)); |
| 46 } | 40 } |
| 47 | 41 |
| 48 String customCSSText() const; | 42 String customCSSText() const; |
| 49 | 43 |
| 50 bool equals(const CSSFunctionValue&) const; | 44 bool equals(const CSSFunctionValue&) const; |
| 51 | 45 |
| 52 CSSValueList* arguments() const { return m_args.get(); } | 46 CSSValueList* arguments() const { return m_args.get(); } |
| 53 | 47 |
| 54 void traceAfterDispatch(Visitor*); | 48 void traceAfterDispatch(Visitor*); |
| 55 | 49 |
| 56 private: | 50 private: |
| 57 explicit CSSFunctionValue(CSSParserFunction*); | |
| 58 CSSFunctionValue(String, PassRefPtrWillBeRawPtr<CSSValueList>); | 51 CSSFunctionValue(String, PassRefPtrWillBeRawPtr<CSSValueList>); |
| 59 | 52 |
| 60 String m_name; | 53 String m_name; |
| 61 RefPtrWillBeMember<CSSValueList> m_args; | 54 RefPtrWillBeMember<CSSValueList> m_args; |
| 62 }; | 55 }; |
| 63 | 56 |
| 64 DEFINE_CSS_VALUE_TYPE_CASTS(CSSFunctionValue, isFunctionValue()); | 57 DEFINE_CSS_VALUE_TYPE_CASTS(CSSFunctionValue, isFunctionValue()); |
| 65 | 58 |
| 66 } // namespace blink | 59 } // namespace blink |
| 67 | 60 |
| 68 #endif | 61 #endif |
| 69 | 62 |
| OLD | NEW |