OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, Opera Software ASA. All rights reserved. | 2 * Copyright (c) 2013, Opera Software ASA. 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 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 } | 52 } |
53 | 53 |
54 bool isNumber() const { return m_length.isRelative(); } | 54 bool isNumber() const { return m_length.isRelative(); } |
55 bool isLength() const { return !isNumber(); } | 55 bool isLength() const { return !isNumber(); } |
56 | 56 |
57 const Length& length() const { ASSERT(isLength()); return m_length; } | 57 const Length& length() const { ASSERT(isLength()); return m_length; } |
58 Length& length() { ASSERT(isLength()); return m_length; } | 58 Length& length() { ASSERT(isLength()); return m_length; } |
59 | 59 |
60 double number() const { ASSERT(isNumber()); return m_length.value(); } | 60 double number() const { ASSERT(isNumber()); return m_length.value(); } |
61 | 61 |
62 // FIXME: Remove when the conversion to LengthOrMultipleOfBorderWidthBox is
complete | |
63 Length deprecatedUnifiedLength() const { return m_length; } | |
64 | |
65 bool operator==(const BorderImageLength& o) const | 62 bool operator==(const BorderImageLength& o) const |
66 { | 63 { |
67 return m_length == o.m_length; | 64 return m_length == o.m_length; |
68 } | 65 } |
69 | 66 |
70 bool isZero() const | 67 bool isZero() const |
71 { | 68 { |
72 return m_length.isZero(); | 69 return m_length.isZero(); |
73 } | 70 } |
74 | 71 |
75 private: | 72 private: |
76 Length m_length; | 73 Length m_length; |
77 }; | 74 }; |
78 | 75 |
79 } // namespace WebCore | 76 } // namespace WebCore |
80 | 77 |
81 #endif // BorderImageLength_h | 78 #endif // BorderImageLength_h |
OLD | NEW |