OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. | 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "wtf/PassRefPtr.h" | 25 #include "wtf/PassRefPtr.h" |
26 #include "wtf/RefCounted.h" | 26 #include "wtf/RefCounted.h" |
27 #include "wtf/text/StringBuilder.h" | 27 #include "wtf/text/StringBuilder.h" |
28 | 28 |
29 namespace WebCore { | 29 namespace WebCore { |
30 | 30 |
31 // A primitive value representing a pair. This is useful for properties like bo
rder-radius, background-size/position, | 31 // A primitive value representing a pair. This is useful for properties like bo
rder-radius, background-size/position, |
32 // and border-spacing (all of which are space-separated sets of two values). At
the moment we are only using it for | 32 // and border-spacing (all of which are space-separated sets of two values). At
the moment we are only using it for |
33 // border-radius and background-size, but (FIXME) border-spacing and background-
position could be converted over to use | 33 // border-radius and background-size, but (FIXME) border-spacing and background-
position could be converted over to use |
34 // it (eliminating some extra -webkit- internal properties). | 34 // it (eliminating some extra -webkit- internal properties). |
35 class Pair : public RefCounted<Pair> { | 35 class Pair FINAL : public RefCounted<Pair> { |
36 public: | 36 public: |
37 enum IdenticalValuesPolicy { DropIdenticalValues, KeepIdenticalValues }; | 37 enum IdenticalValuesPolicy { DropIdenticalValues, KeepIdenticalValues }; |
38 | 38 |
39 static PassRefPtr<Pair> create() | 39 static PassRefPtr<Pair> create() |
40 { | 40 { |
41 return adoptRef(new Pair); | 41 return adoptRef(new Pair); |
42 } | 42 } |
43 static PassRefPtr<Pair> create(PassRefPtr<CSSPrimitiveValue> first, PassRefP
tr<CSSPrimitiveValue> second, IdenticalValuesPolicy identicalValuesPolicy) | 43 static PassRefPtr<Pair> create(PassRefPtr<CSSPrimitiveValue> first, PassRefP
tr<CSSPrimitiveValue> second, IdenticalValuesPolicy identicalValuesPolicy) |
44 { | 44 { |
45 return adoptRef(new Pair(first, second, identicalValuesPolicy)); | 45 return adoptRef(new Pair(first, second, identicalValuesPolicy)); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 } | 94 } |
95 | 95 |
96 RefPtr<CSSPrimitiveValue> m_first; | 96 RefPtr<CSSPrimitiveValue> m_first; |
97 RefPtr<CSSPrimitiveValue> m_second; | 97 RefPtr<CSSPrimitiveValue> m_second; |
98 IdenticalValuesPolicy m_identicalValuesPolicy; | 98 IdenticalValuesPolicy m_identicalValuesPolicy; |
99 }; | 99 }; |
100 | 100 |
101 } // namespace | 101 } // namespace |
102 | 102 |
103 #endif | 103 #endif |
OLD | NEW |