| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 std::swap(normalizedStart, normalizedEnd); | 225 std::swap(normalizedStart, normalizedEnd); |
| 226 *outStart = normalizedStart.parentAnchoredEquivalent(); | 226 *outStart = normalizedStart.parentAnchoredEquivalent(); |
| 227 *outEnd = normalizedEnd.parentAnchoredEquivalent(); | 227 *outEnd = normalizedEnd.parentAnchoredEquivalent(); |
| 228 } | 228 } |
| 229 | 229 |
| 230 void VisibleSelection::normalizePositions(const Position& start, const Position&
end, Position* outStart, Position* outEnd) | 230 void VisibleSelection::normalizePositions(const Position& start, const Position&
end, Position* outStart, Position* outEnd) |
| 231 { | 231 { |
| 232 return normalizePositionsAlgorithm<Position>(start, end, outStart, outEnd); | 232 return normalizePositionsAlgorithm<Position>(start, end, outStart, outEnd); |
| 233 } | 233 } |
| 234 | 234 |
| 235 void VisibleSelection::normalizePositions(const PositionInComposedTree& start, c
onst PositionInComposedTree& end, PositionInComposedTree* outStart, PositionInCo
mposedTree* outEnd) |
| 236 { |
| 237 return normalizePositionsAlgorithm<PositionInComposedTree>(start, end, outSt
art, outEnd); |
| 238 } |
| 239 |
| 235 bool VisibleSelection::toNormalizedPositions(Position& start, Position& end) con
st | 240 bool VisibleSelection::toNormalizedPositions(Position& start, Position& end) con
st |
| 236 { | 241 { |
| 237 if (isNone()) | 242 if (isNone()) |
| 238 return false; | 243 return false; |
| 239 | 244 |
| 240 // Make sure we have an updated layout since this function is called | 245 // Make sure we have an updated layout since this function is called |
| 241 // in the course of running edit commands which modify the DOM. | 246 // in the course of running edit commands which modify the DOM. |
| 242 // Failing to call this can result in equivalentXXXPosition calls returning | 247 // Failing to call this can result in equivalentXXXPosition calls returning |
| 243 // incorrect results. | 248 // incorrect results. |
| 244 m_start.document()->updateLayout(); | 249 m_start.document()->updateLayout(); |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 sel.showTreeForThis(); | 945 sel.showTreeForThis(); |
| 941 } | 946 } |
| 942 | 947 |
| 943 void showTree(const blink::VisibleSelection* sel) | 948 void showTree(const blink::VisibleSelection* sel) |
| 944 { | 949 { |
| 945 if (sel) | 950 if (sel) |
| 946 sel->showTreeForThis(); | 951 sel->showTreeForThis(); |
| 947 } | 952 } |
| 948 | 953 |
| 949 #endif | 954 #endif |
| OLD | NEW |