| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 } | 56 } |
| 57 | 57 |
| 58 bool isNumber() const { return m_length.isRelative(); } | 58 bool isNumber() const { return m_length.isRelative(); } |
| 59 bool isLength() const { return !isNumber(); } | 59 bool isLength() const { return !isNumber(); } |
| 60 | 60 |
| 61 const Length& length() const { ASSERT(isLength()); return m_length; } | 61 const Length& length() const { ASSERT(isLength()); return m_length; } |
| 62 Length& length() { ASSERT(isLength()); return m_length; } | 62 Length& length() { ASSERT(isLength()); return m_length; } |
| 63 | 63 |
| 64 double number() const { ASSERT(isNumber()); return m_length.value(); } | 64 double number() const { ASSERT(isNumber()); return m_length.value(); } |
| 65 | 65 |
| 66 // FIXME: Remove when the conversion to LengthOrMultipleOfBorderWidthBox is
complete. | |
| 67 Length deprecatedUnifiedLength() const { return m_length; } | |
| 68 | |
| 69 bool operator==(const BorderImageLength& other) const | 66 bool operator==(const BorderImageLength& other) const |
| 70 { | 67 { |
| 71 return m_length == other.m_length; | 68 return m_length == other.m_length; |
| 72 } | 69 } |
| 73 | 70 |
| 74 bool isZero() const | 71 bool isZero() const |
| 75 { | 72 { |
| 76 return m_length.isZero(); | 73 return m_length.isZero(); |
| 77 } | 74 } |
| 78 | 75 |
| 79 private: | 76 private: |
| 80 Length m_length; | 77 Length m_length; |
| 81 }; | 78 }; |
| 82 | 79 |
| 83 } // namespace WebCore | 80 } // namespace WebCore |
| 84 | 81 |
| 85 #endif // BorderImageLength_h | 82 #endif // BorderImageLength_h |
| OLD | NEW |