| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 const VisibleSelectionInFlatTree& selectionInFlatTree) { | 201 const VisibleSelectionInFlatTree& selectionInFlatTree) { |
| 202 if (selectionInFlatTree.isNone()) { | 202 if (selectionInFlatTree.isNone()) { |
| 203 *selection = VisibleSelection(); | 203 *selection = VisibleSelection(); |
| 204 return; | 204 return; |
| 205 } | 205 } |
| 206 | 206 |
| 207 const Position& base = toPositionInDOMTree(selectionInFlatTree.base()); | 207 const Position& base = toPositionInDOMTree(selectionInFlatTree.base()); |
| 208 const Position& extent = toPositionInDOMTree(selectionInFlatTree.extent()); | 208 const Position& extent = toPositionInDOMTree(selectionInFlatTree.extent()); |
| 209 | 209 |
| 210 if (isCrossingShadowBoundaries(selectionInFlatTree)) { | 210 if (isCrossingShadowBoundaries(selectionInFlatTree)) { |
| 211 *selection = createVisibleSelection(base, extent); | 211 *selection = createVisibleSelectionDeprecated(base, extent); |
| 212 return; | 212 return; |
| 213 } | 213 } |
| 214 | 214 |
| 215 const Position& position1 = toPositionInDOMTree(selectionInFlatTree.start()); | 215 const Position& position1 = toPositionInDOMTree(selectionInFlatTree.start()); |
| 216 const Position& position2 = toPositionInDOMTree(selectionInFlatTree.end()); | 216 const Position& position2 = toPositionInDOMTree(selectionInFlatTree.end()); |
| 217 selection->m_base = base; | 217 selection->m_base = base; |
| 218 selection->m_extent = extent; | 218 selection->m_extent = extent; |
| 219 selection->m_affinity = selectionInFlatTree.m_affinity; | 219 selection->m_affinity = selectionInFlatTree.m_affinity; |
| 220 selection->m_isDirectional = selectionInFlatTree.m_isDirectional; | 220 selection->m_isDirectional = selectionInFlatTree.m_isDirectional; |
| 221 selection->m_granularity = selectionInFlatTree.m_granularity; | 221 selection->m_granularity = selectionInFlatTree.m_granularity; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 return; | 279 return; |
| 280 } | 280 } |
| 281 Node* const shadowHost = shadowHostEnd ? shadowHostEnd : shadowHostStart; | 281 Node* const shadowHost = shadowHostEnd ? shadowHostEnd : shadowHostStart; |
| 282 const PositionInFlatTree& newStart = | 282 const PositionInFlatTree& newStart = |
| 283 adjustPositionInFlatTreeForStart(selection->start(), shadowHost); | 283 adjustPositionInFlatTreeForStart(selection->start(), shadowHost); |
| 284 selection->m_extent = newStart; | 284 selection->m_extent = newStart; |
| 285 selection->m_start = newStart; | 285 selection->m_start = newStart; |
| 286 } | 286 } |
| 287 | 287 |
| 288 } // namespace blink | 288 } // namespace blink |
| OLD | NEW |