| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 3 * Portions Copyright (c) 2011 Motorola Mobility, Inc. All rights reserved. | 3 * Portions Copyright (c) 2011 Motorola Mobility, Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 } | 127 } |
| 128 | 128 |
| 129 VisiblePositionInFlatTree createVisiblePosition(const PositionInFlatTreeWithAffi
nity& positionWithAffinity) | 129 VisiblePositionInFlatTree createVisiblePosition(const PositionInFlatTreeWithAffi
nity& positionWithAffinity) |
| 130 { | 130 { |
| 131 return VisiblePositionInFlatTree::create(positionWithAffinity); | 131 return VisiblePositionInFlatTree::create(positionWithAffinity); |
| 132 } | 132 } |
| 133 | 133 |
| 134 #ifndef NDEBUG | 134 #ifndef NDEBUG |
| 135 | 135 |
| 136 template<typename Strategy> | 136 template<typename Strategy> |
| 137 void VisiblePositionTemplate<Strategy>::debugPosition(const char* msg) const | |
| 138 { | |
| 139 if (isNull()) { | |
| 140 fprintf(stderr, "Position [%s]: null\n", msg); | |
| 141 return; | |
| 142 } | |
| 143 deepEquivalent().debugPosition(msg); | |
| 144 } | |
| 145 | |
| 146 template<typename Strategy> | |
| 147 void VisiblePositionTemplate<Strategy>::showTreeForThis() const | 137 void VisiblePositionTemplate<Strategy>::showTreeForThis() const |
| 148 { | 138 { |
| 149 deepEquivalent().showTreeForThis(); | 139 deepEquivalent().showTreeForThis(); |
| 150 } | 140 } |
| 151 | 141 |
| 152 #endif | 142 #endif |
| 153 | 143 |
| 154 template class CORE_TEMPLATE_EXPORT VisiblePositionTemplate<EditingStrategy>; | 144 template class CORE_TEMPLATE_EXPORT VisiblePositionTemplate<EditingStrategy>; |
| 155 template class CORE_TEMPLATE_EXPORT VisiblePositionTemplate<EditingInFlatTreeStr
ategy>; | 145 template class CORE_TEMPLATE_EXPORT VisiblePositionTemplate<EditingInFlatTreeStr
ategy>; |
| 156 | 146 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 176 } | 166 } |
| 177 DVLOG(0) << "Cannot showTree for (nil) VisiblePosition."; | 167 DVLOG(0) << "Cannot showTree for (nil) VisiblePosition."; |
| 178 } | 168 } |
| 179 | 169 |
| 180 void showTree(const blink::VisiblePosition& vpos) | 170 void showTree(const blink::VisiblePosition& vpos) |
| 181 { | 171 { |
| 182 vpos.showTreeForThis(); | 172 vpos.showTreeForThis(); |
| 183 } | 173 } |
| 184 | 174 |
| 185 #endif | 175 #endif |
| OLD | NEW |