| 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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 m_start = m_baseIsFirst ? m_base : m_extent; | 540 m_start = m_baseIsFirst ? m_base : m_extent; |
| 541 m_end = m_baseIsFirst ? m_extent : m_base; | 541 m_end = m_baseIsFirst ? m_extent : m_base; |
| 542 setStartRespectingGranularity(granularity); | 542 setStartRespectingGranularity(granularity); |
| 543 ASSERT(m_start.isNotNull()); | 543 ASSERT(m_start.isNotNull()); |
| 544 setEndRespectingGranularity(granularity); | 544 setEndRespectingGranularity(granularity); |
| 545 ASSERT(m_end.isNotNull()); | 545 ASSERT(m_end.isNotNull()); |
| 546 adjustSelectionToAvoidCrossingShadowBoundaries(); | 546 adjustSelectionToAvoidCrossingShadowBoundaries(); |
| 547 adjustSelectionToAvoidCrossingEditingBoundaries(); | 547 adjustSelectionToAvoidCrossingEditingBoundaries(); |
| 548 updateSelectionType(); | 548 updateSelectionType(); |
| 549 | 549 |
| 550 if (selectionType() == RangeSelection) { | 550 if (getSelectionType() == RangeSelection) { |
| 551 // "Constrain" the selection to be the smallest equivalent range of | 551 // "Constrain" the selection to be the smallest equivalent range of |
| 552 // nodes. This is a somewhat arbitrary choice, but experience shows that | 552 // nodes. This is a somewhat arbitrary choice, but experience shows that |
| 553 // it is useful to make to make the selection "canonical" (if only for | 553 // it is useful to make to make the selection "canonical" (if only for |
| 554 // purposes of comparing selections). This is an ideal point of the code | 554 // purposes of comparing selections). This is an ideal point of the code |
| 555 // to do this operation, since all selection changes that result in a | 555 // to do this operation, since all selection changes that result in a |
| 556 // RANGE come through here before anyone uses it. | 556 // RANGE come through here before anyone uses it. |
| 557 // TODO(yosin) Canonicalizing is good, but haven't we already done it | 557 // TODO(yosin) Canonicalizing is good, but haven't we already done it |
| 558 // (when we set these two positions to |VisiblePosition| | 558 // (when we set these two positions to |VisiblePosition| |
| 559 // |deepEquivalent()|s above)? | 559 // |deepEquivalent()|s above)? |
| 560 m_start = mostForwardCaretPosition(m_start); | 560 m_start = mostForwardCaretPosition(m_start); |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 { | 975 { |
| 976 sel.showTreeForThis(); | 976 sel.showTreeForThis(); |
| 977 } | 977 } |
| 978 | 978 |
| 979 void showTree(const blink::VisibleSelectionInFlatTree* sel) | 979 void showTree(const blink::VisibleSelectionInFlatTree* sel) |
| 980 { | 980 { |
| 981 if (sel) | 981 if (sel) |
| 982 sel->showTreeForThis(); | 982 sel->showTreeForThis(); |
| 983 } | 983 } |
| 984 #endif | 984 #endif |
| OLD | NEW |