| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef PODInterval_h | 26 #ifndef PODInterval_h |
| 27 #define PODInterval_h | 27 #define PODInterval_h |
| 28 | 28 |
| 29 #include "platform/heap/Handle.h" | 29 #include "platform/heap/Handle.h" |
| 30 #ifndef NDEBUG | 30 #ifndef NDEBUG |
| 31 #include "wtf/text/StringBuilder.h" | 31 #include "platform/wtf/text/StringBuilder.h" |
| 32 #endif | 32 #endif |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 // Class representing a closed interval which can hold an arbitrary | 36 // Class representing a closed interval which can hold an arbitrary |
| 37 // Plain Old Datatype (POD) as its endpoints and a piece of user | 37 // Plain Old Datatype (POD) as its endpoints and a piece of user |
| 38 // data. An important characteristic for the algorithms we use is that | 38 // data. An important characteristic for the algorithms we use is that |
| 39 // if two intervals have identical endpoints but different user data, | 39 // if two intervals have identical endpoints but different user data, |
| 40 // they are not considered to be equal. This situation can arise when | 40 // they are not considered to be equal. This situation can arise when |
| 41 // representing the vertical extents of bounding boxes of overlapping | 41 // representing the vertical extents of bounding boxes of overlapping |
| (...skipping 22 matching lines...) Expand all Loading... |
| 64 // template<> struct ValueToString<T> { | 64 // template<> struct ValueToString<T> { |
| 65 // static String toString(const T& t); | 65 // static String toString(const T& t); |
| 66 // }; | 66 // }; |
| 67 // template<> struct ValueToString<UserData> { | 67 // template<> struct ValueToString<UserData> { |
| 68 // static String toString(const UserData& t); | 68 // static String toString(const UserData& t); |
| 69 // }; | 69 // }; |
| 70 // | 70 // |
| 71 // Note that this class requires a copy constructor and assignment | 71 // Note that this class requires a copy constructor and assignment |
| 72 // operator in order to be stored in the red-black tree. | 72 // operator in order to be stored in the red-black tree. |
| 73 | 73 |
| 74 #include "wtf/Allocator.h" | 74 #include "platform/wtf/Allocator.h" |
| 75 | 75 |
| 76 #ifndef NDEBUG | 76 #ifndef NDEBUG |
| 77 template <class T> | 77 template <class T> |
| 78 struct ValueToString; | 78 struct ValueToString; |
| 79 #endif | 79 #endif |
| 80 | 80 |
| 81 template <class T, class UserData = void*> | 81 template <class T, class UserData = void*> |
| 82 class PODInterval { | 82 class PODInterval { |
| 83 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 83 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 84 | 84 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 T low_; | 144 T low_; |
| 145 T high_; | 145 T high_; |
| 146 GC_PLUGIN_IGNORE("crbug.com/513116") | 146 GC_PLUGIN_IGNORE("crbug.com/513116") |
| 147 UserData data_; | 147 UserData data_; |
| 148 T max_high_; | 148 T max_high_; |
| 149 }; | 149 }; |
| 150 | 150 |
| 151 } // namespace blink | 151 } // namespace blink |
| 152 | 152 |
| 153 #endif // PODInterval_h | 153 #endif // PODInterval_h |
| OLD | NEW |