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

Side by Side Diff: Source/core/rendering/style/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 to latest master 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « Source/core/frame/animation/CSSPropertyAnimation.cpp ('k') | Source/core/rendering/style/BorderImageLengthBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698