| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * Portions Copyright (c) 2011 Motorola Mobility, Inc. All rights reserved. | 4 * Portions Copyright (c) 2011 Motorola Mobility, Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 VisiblePositionTemplate<Strategy> | 132 VisiblePositionTemplate<Strategy> |
| 133 VisiblePositionTemplate<Strategy>::InParentBeforeNode(const Node& node) { | 133 VisiblePositionTemplate<Strategy>::InParentBeforeNode(const Node& node) { |
| 134 return Create(PositionWithAffinityTemplate<Strategy>( | 134 return Create(PositionWithAffinityTemplate<Strategy>( |
| 135 PositionTemplate<Strategy>::InParentBeforeNode(node))); | 135 PositionTemplate<Strategy>::InParentBeforeNode(node))); |
| 136 } | 136 } |
| 137 | 137 |
| 138 template <typename Strategy> | 138 template <typename Strategy> |
| 139 VisiblePositionTemplate<Strategy> | 139 VisiblePositionTemplate<Strategy> |
| 140 VisiblePositionTemplate<Strategy>::LastPositionInNode(Node* node) { | 140 VisiblePositionTemplate<Strategy>::LastPositionInNode(Node* node) { |
| 141 return Create(PositionWithAffinityTemplate<Strategy>( | 141 return Create(PositionWithAffinityTemplate<Strategy>( |
| 142 PositionTemplate<Strategy>::LastPositionInNode(node))); | 142 PositionTemplate<Strategy>::LastPositionInNode(*node))); |
| 143 } | 143 } |
| 144 | 144 |
| 145 VisiblePosition CreateVisiblePosition(const Position& position, | 145 VisiblePosition CreateVisiblePosition(const Position& position, |
| 146 TextAffinity affinity) { | 146 TextAffinity affinity) { |
| 147 return VisiblePosition::Create(PositionWithAffinity(position, affinity)); | 147 return VisiblePosition::Create(PositionWithAffinity(position, affinity)); |
| 148 } | 148 } |
| 149 | 149 |
| 150 VisiblePosition CreateVisiblePosition( | 150 VisiblePosition CreateVisiblePosition( |
| 151 const PositionWithAffinity& position_with_affinity) { | 151 const PositionWithAffinity& position_with_affinity) { |
| 152 return VisiblePosition::Create(position_with_affinity); | 152 return VisiblePosition::Create(position_with_affinity); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 return; | 211 return; |
| 212 } | 212 } |
| 213 DVLOG(0) << "Cannot showTree for (nil) VisiblePosition."; | 213 DVLOG(0) << "Cannot showTree for (nil) VisiblePosition."; |
| 214 } | 214 } |
| 215 | 215 |
| 216 void showTree(const blink::VisiblePosition& vpos) { | 216 void showTree(const blink::VisiblePosition& vpos) { |
| 217 vpos.ShowTreeForThis(); | 217 vpos.ShowTreeForThis(); |
| 218 } | 218 } |
| 219 | 219 |
| 220 #endif | 220 #endif |
| OLD | NEW |