Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: Source/platform/BorderImageLength.h

Issue 55813002: Convert animation and renderer code to know about BorderImageLength (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@length-relative-die-step-1-4
Patch Set: Rebased on top of patch set #2 of https://codereview.chromium.org/55783002/ Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698